My forehead is bruised due to disappointment on this issue. In standards-compliant browsers, my layout looks great, but of course IE7 and IE6 love to do their best. I am trying to make a simple heading that has text on the left and a form in the line on the right. The title is 835 pixels wide and centered using automatic margins. Here is my code:
<div id="header">
<span>Some Text</span>
<div style="display: inline; float: right; margin-top: 6px; position: relative;">
Jump to: <form ... style="display: inline;"> blah blah </form>
</div>
</div>
As far as I can tell, IE6 / 7 handle a div containing a form as a block element. It displays correctly to the right of the div header, but it is discarded. I tried to give the inner div the width and absolute position, but to no avail. I would really like to avoid absolute positioning, as well as conditional statements, if possible. There must be something I'm missing. Any suggestions?
UPDATE: here is a screenshot from IE7
alt text http://vincentalcivar.com/ie7.png
source
share