mikeage.net Logo
mikeage.net/2005/08/12/full-width-tables-in-ie6/

mikeage.net @ כ״ו מנחם אב תשע״ד

Full Width Tables in IE6

Quick Overview

Internet Explorer 6.0 (and possibly earlier) has a buggy CSS interperter. The biggest problem is the broken "box model", which is documented in enough other places. However, one other major problem is that tables do not inherit div's width. Thus, in my page, which has a left sidebar, if I declare a <table width="100%"> in the main window, it will make the table 100% of the full screen, which, since there's a sidebar, pushes it off the edge.

Correct In Mozilla (for this layout)

<div id="LeftMenu"">
...
</div>
<div id="Content">
<table width="100%">
...
</table>
</div>

This is exactly what we want. However, it fails in IE.

Correct In IE (for this layout)

<div id="LeftMenu">
...
</div>
<div id="Content">
<div style="width:100%">
<table width="100%">
...
</table>
</div>
</div>

Mozilla also renders this correctly.

Enjoy.

3 Responses to “Full Width Tables in IE6”

  1. Max says:

    Thank you thank you thank you. This definitely saved me some headache today!

  2. Kiran says:

    Thanks Dear, for this solutions of IE. Great. Keep it up

  3. Name says:

    posted 5 years ago and so very helpful! thank you!

    Lets all hope that in another 5 years IE6 will be gone and we can forget about this– unlikely though!

Leave a Reply

Quick Map
Content +
Personal +
Archives +
Site Stuff +
RBS Weather +
Search +
Recent Images
Visitors
Clustermap

Valid XHTML 1.1!
Printer Friendly Page
 

Last Modified: September 04, 2006 @ 02:11 CST

Memory(TRUE): 1572864/1572864
Memory(FALSE): 1459788/1483340