Skip to content Skip to sidebar Skip to footer

Html Width Issue. Is It Related To Colspan? How?

My width seems to be ignored for some reason related to the tabledatas above it since if I remove all rows except the row that seems to be having the issue, it then work

Solution 1:

To set the widths of table columns that have colspans, the most reliable method is to set the width for each column explicitly using <col> elements. That way, the browser will know from the start which column has which width, and also how many columns there actually are!

This method also has the advantage that you won't need to specify the width in each and every table cell, so it's more efficient in terms of bytes, and less error-prone in terms of typos.

<tableborder="1"cellspacing="0"cellpadding="0"><colwidth="145"><colwidth="97"><colwidth="170"><colwidth="188"><tr><tdid="IX991PI1"colspan="3"height="81"></td><tdid="OW6DMR2F"height="81"></td></tr><tr><tdid="RU5UW85Z"colspan="3"height="66"></td><tdid="RGPQDOYK"rowspan="2"height="204"></td></tr><tr><tdid="67JXVSFB"colspan="3"height="138"></td></tr><tr><tdid="AB6FD7D5"height="67"></td><tdid="RU0G6BL8"colspan="3"height="67"></td></tr><tr><tdid="0B0D4ZVN"colspan="4"height="29"></td></tr><!-- the no longer problematic row --><tr><tdid="V4GHN5BW"colspan="2"height="100"></td><tdid="CK3PB3OT"colspan="2"height="100"></td></tr></table>

I also took the liberty of removing all colspan=1 and rowspan=1 attributes, since those are not necessary. And the width attribute on the table itself was also superfluous.

Tested in Chrome and Mozilla, and it looks good in Thunderbird too.

Solution 2:

Try to remove the width in your td in row problematic tag. This sets the maximum width for its child.

<!-- the problematic row --><tr><tdid="V4GHN5BW"rowspan="1"colspan="2"height="100" ></td><tdid="CK3PB3OT"rowspan="1"colspan="2"height="100" ></td></tr>

Post a Comment for "Html Width Issue. Is It Related To Colspan? How?"