IE & CSS positioning

  • 14 years ago

    Hello!  I'm having some problems with IE and the positioning of a DIV on a layout I'm working for.

    The URL is http://www.cobnut.net/dylans

    What's happening is that the menu in the left hand content area is dropping down to the base of the page on a seemingly random basis.  If you resize the page it flicks between being in the right place (next to the content on the right) and down the bottom, without any apparent logic.  It's as though it's sometimes clashing with the images but not always.  The images on the left are floated with an absolute position and in theory shouldn't be interacting with the mainNav div at all.  It's weird that when it does work it works perfectly, with even a very small screen size showing the menu items overlapping the images and respecting the z-index.

    This doesn't happen in Firefox but does in both IE6 and IE7.

    Can anyone offer any ideas?  I can't understand why it's so random.  Could it be a load order issue?  The mainNav is loaded last (to make the pages better for readers).

    Jon

  • 14 years ago

    OK, solved now.  It was pretty simple, thankfully, I had two 'halves' of the site defined as being 50% each within a main wrapper and it appears that IE was randomly working 50+50 out to be more than 100, making the left-hand one (loaded second) drop down.  Changing the two values to be less than 100% (49.5% and 50%) works fine.  Weird.

    As it happens, this also meant I could dump some padding info so the CSS file actually shrank a little :)

    Jon

  • 14 years ago

    yep, that's to do with the bug in IE6 which renders the box model incorrectly.

    if you're ever having difficulty sleeping one night, Google "IE6 box model bug and hack" and have a good read. you'll be snoring in no time Wink [;)]

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“In order to understand recursion, one must first understand recursion.”