Posts [ 2 ]

Topic: CSS IE problem has defeated me

I've banged my head against this one just too long!

You may be familiar with the LayoutGala site (http://blog.html.it/layoutgala/), a set of very simple CSS layouts that can be applied to the same DIV markup. I thought I'd extend this by adding eight more which have horizontal navigation about the main content area. Here's one (but look at it with Firefox!).

As the navigation DIV comes after the content DIV, I tried using absolute positioning. In Firefox, this works fine but in IE6 the navigation DIV vanishes. I've tried the holly hack but it makes no difference.

Re: CSS IE problem has defeated me

Chris..S at csscreator.com solved this one. In IE (6 and 7), you need to have some normal (in flow, ie. not floated, not position:absolute) content in the container immediately before the absolutely positioned element. Something as simple as a &nbsp; will do the trick.

I've fixed the page on the link above and adjusted the CSS slightly to bring the third div up to the right position. No CSS hacks are needed for this.