Table With Colspan Problems - HTML & CSS - SitePoint Forums

Hello, I’m currently having problems with tables and putting a COLSPAN=“3” on a TD. I put a picture and the code below.

My problem is when I put the code below it acts as if the colspan=3 is not working because it makes the left side of the table smaller and the right side bigger. It did work for the small text at the top of the table, it didn’t make either side change, worked fine.

[COLOR=Red]<td colspan="3"><div align="left">[/COLOR] <textarea name="fs" cols="70" rows="10" class="box" id="fs" tabindex="24"></textarea> </div></td>

The top portion of the picture is the HTML code without the colspan=3. The bottom half includes the colspan=3 with the textarea and it gets messed up.

Here is the full code:

<table width="450" border="1" cellpadding="0" cellspacing="0"> <tr> <td colspan="3"><div align="center"><span class="smallGreyText">Fields marked with an asterisk <span class="star">*</span> are required.</span></div><br /></td> </tr> <tr> <td width="155"><div align="right"><label for="username"><span class="star">* </span>Username:</label></div></td> <td width="20"></td> <td width="275"><div align="left"> text here </div></td> </tr> <tr> [COLOR=Red]<td colspan="3"><div align="left">[/COLOR] <textarea name="fs" cols="70" rows="10" class="box" id="fs" tabindex="24"></textarea> </div></td> </tr> </table>

Also, here is the a picture of the bottom of the table where the actual TEXTAREA and colspan=3 are. You can see the COLSPAN looks like it worked fine but it still messes up the rest of the table.

Please help, thanks.

EDIT: It does seem to load fine in FIREFOX but in Internet Explorer it doesn’t. I don’t think it’s browser related though.

Từ khóa » Html Colspan Align Center