I'm trying to develop a standard 2 column layout by floating a navigation bar to the left of the main content (which has a left margin the same width as the navigation bar). It's sandwiched between header and footer divs, all contained within a container div to center the layout.
I'm using strict XHTML, and I've validated both CSS and XHTML at W3C. I've tried reading other posts and linked articles about floating divs and margin/spacing issues, but my particular issue doesn't seem to be solved by any of the items I've read.
My problem is this:
In IE 7 (WIN), my navigation bar seems to have a space (what I thought at first was some default margin) between the top of the div and the beginning of the content. The content is meant to flush to the top of the div, directly beneath the header image. It looks exactly how it should in Firefox, and since I've validated (without a single warning!) I think this is likely an IE issue.
I can't figure out what element is causing that space. I've used the universal selector to get rid of all margins and padding, and then even went into individual elements to remove margins and padding (though I think this is redundant if I've universally turned off margins and padding).
I've tried using "display: inline;" for both the navigation div and the class within that div that holds the content. That didn't work, either.
I'm really stuck: I've been working on this and trying to find a tutorial or forum post all over the web that addresses this problem, but to no avail.
The page is located at: http://www.empirecovers.com/test/templatetest/default_template_1.html
The stylesheet is at: http://www.empirecovers.com/test/templatetest/css/twoColFixLtHdr.css
I sincerely hope that I don't waste your time and that there isn't some glaring mistake I've overlooked. Your help is greatly appreciated.
I combed through my code, and I feel incredibly stupid. I had some inline style in the html document between comment tags that was meant to fix an IE bug, and I had forgotten to adjust the dimensions to reflect the layout changes I had made. I changed that and now everything works perfectly!
I'm happy I found this site, however: what a knowledgeable community! Thanks anyway!
Thanks for letting us know
Thanks for letting us know you fixed it