{"id":17,"date":"2009-07-31T18:30:15","date_gmt":"2009-07-31T18:30:15","guid":{"rendered":"http:\/\/www.bacondrivencoding.com\/2008\/2009\/07\/why-does-layout-change-in-ie-when-ul-is-alone-in-a-td\/"},"modified":"2026-11-15T22:49:48","modified_gmt":"2026-11-15T22:49:48","slug":"why-does-layout-change-in-ie-when-ul-is-alone-in-a-td","status":"publish","type":"post","link":"https:\/\/www.bacondrivencoding.com\/2008\/2009\/07\/why-does-layout-change-in-ie-when-ul-is-alone-in-a-td\/","title":{"rendered":"Why does layout change in IE when UL is alone in a TD vs having an extra empty DIV?"},"content":{"rendered":"<p>I&#8217;m trying to find an answer to my layout question &#8212; I posted it to stack overflow:<a href=\"https:\/\/stackoverflow.com\/questions\/1212860\/why-does-layout-change-in-ie-when-ul-is-alone-in-a-td-vs-having-an-extra-empty-di\">Why does layout change in IE when UL is alone in a TD vs having an extra empty DIV?<\/a>. I&#8217;m posting it here as well, so I can upload a screenshot.<\/p>\n<p><strong>Update:<\/strong> There is now an answer on the stackoverflow question; One of the css rules makes the li tag white &#8212; it doesn&#8217;t have to, because the a is white. IE takes the spaces between the lis, and puts them in the enclusing td. This pushes the li down, causing it to overlap the border line.<\/p>\n<hr \/>\n<p>I&#8217;m adding css-based tab navigation to a site that is still using table-based layout. When I place my tab list inside a td, there is a visual &#8220;gap&#8221; that you can see. If I put an empty div with &#8220;width: 100%&#8221; in the td, then my tab list displays correctly. (It also works fine outside the table.)Why does the div make the tabs lay out correctly, and is there a better way to make them do so without adding a content-free div?Here&#8217;s my test case: <a title=\"Test Case: Why does layout change in IE when UL is alone in a TD vs having an extra empty DIV?\" href=\"\/\/www.bacondrivencoding.com\/2008\/wp-content\/uploads\/2009\/07\/testcase.html\">Test Case: Why does layout change in IE when UL is alone in a TD vs having an extra empty DIV?<\/a>And a Screen Shot:<\/p>\n<p><a title=\"Screen shot of the error in IE 7\" href=\"\/\/www.bacondrivencoding.com\/2008\/wp-content\/uploads\/2009\/07\/ie7.PNG\"><img decoding=\"async\" src=\"\/\/www.bacondrivencoding.com\/2008\/wp-content\/uploads\/2009\/07\/ie7.PNG\" alt=\"Screen shot of the error in IE 7\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m trying to find an answer to my layout question &#8212; I posted it to stack overflow:Why does layout change in IE when UL is alone in a TD vs having an extra empty DIV?. I&#8217;m posting it here as well, so I can upload a screenshot. Update: There is now an answer on the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-17","post","type-post","status-publish","format-standard","hentry","category-code"],"_links":{"self":[{"href":"https:\/\/www.bacondrivencoding.com\/2008\/wp-json\/wp\/v2\/posts\/17","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bacondrivencoding.com\/2008\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bacondrivencoding.com\/2008\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bacondrivencoding.com\/2008\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bacondrivencoding.com\/2008\/wp-json\/wp\/v2\/comments?post=17"}],"version-history":[{"count":3,"href":"https:\/\/www.bacondrivencoding.com\/2008\/wp-json\/wp\/v2\/posts\/17\/revisions"}],"predecessor-version":[{"id":154,"href":"https:\/\/www.bacondrivencoding.com\/2008\/wp-json\/wp\/v2\/posts\/17\/revisions\/154"}],"wp:attachment":[{"href":"https:\/\/www.bacondrivencoding.com\/2008\/wp-json\/wp\/v2\/media?parent=17"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bacondrivencoding.com\/2008\/wp-json\/wp\/v2\/categories?post=17"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bacondrivencoding.com\/2008\/wp-json\/wp\/v2\/tags?post=17"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}