reluctantlyhuman
New member
I am trying to create an html calendar for an online class, and I cannot get the columns all the same width- I've tried every code combination in the book in every way I could (<tr width>, <td width>, <th width>, etc) and still can't get everything to fit equally- the word "Wednesday" keeps screwing everything up as it is longer than the other words-
Could someone please tell me what I'm doing wrong? I'm guessing it might have something to do with cell padding, but unfortunately my teacher doesn't include anything in our notes on anything relating to the assignment -.- (she's always too vague). I've attached the code below, but after six hours of trying and failing to get the columns right I've given up- any ideas?
-Thanks for your time; any help is appreciated.
<html>
<head>
<title>
Tables- Calendar
</title>
</head>
<body>
<body text= #330066 bgcolor= #6699CC>
<br>
<br>
<h2> <center> <div style= "font-family: ariel:"> My Calendar </div> </center> </h2>
<br>
<br>
<center>
<table class="calendar"; border="2"; cellspacing="5"; cellpadding="20"; width="85"; height="85">
<tr>
<caption> <th rowspan="1" colspan="7"> <font size=5> <b> <code> April </code> </b> </5> </th> </caption>
</tr>
<tr align="center">
<th width="95"> Monday </th>
<th width="95"> Tuesday </th>
<th width="95"> Wednesday </th>
<th width="95"> Thursday </th>
<th width="95"> Friday </th>
<th width="95"> Saturday </th>
<th width="95"> Sunday </th>
</tr>
<tr align="center">
<td> 1 </td>
<td> 2 </td>
<td> 3 </td>
<td> 4 </td>
<td> 5 </td>
<td> 6 </td>
<td> 7 </td>
</tr>
<tr align="center">
<td> 8 </td>
<td> 9 </td>
<td> 10 </td>
<td> 11 </td>
<td> 12 </td>
<td> 13 </td>
<td> 14 </td>
</tr>
<tr align="center">
<td> 15 </td>
<td> 16 </td>
<td> 17 </td>
<td> 18 </td>
<td> 19 </td>
<td> 20 </td>
<td> 21 </td>
</tr>
<tr align="center">
<td> 22 </td>
<td> 23 </td>
<td> 24 </td>
<td> 25 </td>
<td> 26 </td>
<td> 27 </td>
<td> 28 </td>
</tr>
<tr align="center">
<td> 29 </td>
<td> 30 </td>
</tr>
</colgroup>
</table>
</center>
</body>
</html>
EDIT: Sorry, forgot to add; my teacher wants the table to take up 85% of page space, with all cells the same size and shape. I also need to add some info. to certain dates while retaining that same size/shape (already done).
EDIT: I tried the codes Brisray suggested, and the border disappeared from the first table (
). My text book says to use elements like "width=35" rather than the CSS methods of "width:35px", and since everything I've learned is from the textbook I don't think I could change it by myself...
I tried messing around with it for another 3 hours, and only got the same results- thanks for your help, but I guess my computer just hates me...
Could someone please tell me what I'm doing wrong? I'm guessing it might have something to do with cell padding, but unfortunately my teacher doesn't include anything in our notes on anything relating to the assignment -.- (she's always too vague). I've attached the code below, but after six hours of trying and failing to get the columns right I've given up- any ideas?
-Thanks for your time; any help is appreciated.
<html>
<head>
<title>
Tables- Calendar
</title>
</head>
<body>
<body text= #330066 bgcolor= #6699CC>
<br>
<br>
<h2> <center> <div style= "font-family: ariel:"> My Calendar </div> </center> </h2>
<br>
<br>
<center>
<table class="calendar"; border="2"; cellspacing="5"; cellpadding="20"; width="85"; height="85">
<tr>
<caption> <th rowspan="1" colspan="7"> <font size=5> <b> <code> April </code> </b> </5> </th> </caption>
</tr>
<tr align="center">
<th width="95"> Monday </th>
<th width="95"> Tuesday </th>
<th width="95"> Wednesday </th>
<th width="95"> Thursday </th>
<th width="95"> Friday </th>
<th width="95"> Saturday </th>
<th width="95"> Sunday </th>
</tr>
<tr align="center">
<td> 1 </td>
<td> 2 </td>
<td> 3 </td>
<td> 4 </td>
<td> 5 </td>
<td> 6 </td>
<td> 7 </td>
</tr>
<tr align="center">
<td> 8 </td>
<td> 9 </td>
<td> 10 </td>
<td> 11 </td>
<td> 12 </td>
<td> 13 </td>
<td> 14 </td>
</tr>
<tr align="center">
<td> 15 </td>
<td> 16 </td>
<td> 17 </td>
<td> 18 </td>
<td> 19 </td>
<td> 20 </td>
<td> 21 </td>
</tr>
<tr align="center">
<td> 22 </td>
<td> 23 </td>
<td> 24 </td>
<td> 25 </td>
<td> 26 </td>
<td> 27 </td>
<td> 28 </td>
</tr>
<tr align="center">
<td> 29 </td>
<td> 30 </td>
</tr>
</colgroup>
</table>
</center>
</body>
</html>
EDIT: Sorry, forgot to add; my teacher wants the table to take up 85% of page space, with all cells the same size and shape. I also need to add some info. to certain dates while retaining that same size/shape (already done).
EDIT: I tried the codes Brisray suggested, and the border disappeared from the first table (

I tried messing around with it for another 3 hours, and only got the same results- thanks for your help, but I guess my computer just hates me...
