2 replies [Last post]
enave
Offline
Enthusiast
Last seen: 14 years 33 weeks ago
Joined: 2004-10-29
Posts: 86
Points: 0

In the code shown below, the h2 tag is not visible in IE6 or IE7. It shows up normally in the other browsers that I've checked.

This is just 28 lines of HTML, and it validates. There are only four styles. If you remove any of the styles, the h2 will show up. I think this is related to the adjacent float bug. I'd appreciate any comments/suggestions. Since, as you can see, I've tracked the problem down, I know how to fix it. What I'd really like is to be able to learn from it.

thanks.


Disappearing Text


div#pagecontainer {background-color:#eee;}
div.content {float:left;}
div#footer {width:600px;clear:both;}

this is the header - THIS TEXT IS INVISIBLE IN IE



this is page content


DanA
DanA's picture
Offline
Elder
Last seen: 12 years 21 weeks ago
Timezone: GMT+2
Joined: 2004-08-14
Posts: 1087
Points: 2

As usual, this is a

As usual, this is a hasLayout problem.
Add
#pagecontainer h2{height:1%;}

enave
Offline
Enthusiast
Last seen: 14 years 33 weeks ago
Joined: 2004-10-29
Posts: 86
Points: 0

yes, I think you're right.

yes, I think you're right. Thanks. That's exactly what I was looking for!