Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Nov 2006
    Location
    Bristol, UK
    Posts
    85
    Thanks
    6
    Thanked 6 Times in 6 Posts

    Moving menu (in IE, not Firefox)

    Hi,
    I've scoured the forums and either I'm using the wrong search terms or this problem has arisen before, so here goes...

    Please see www.littlefishbristol.com/_index.htm for the offending page. It works fine in Firefox, but I'm obviously in need of some kind of hack for IE.

    The page looks near enough how I want it to, but when you resize the window in IE, the menu stays where it was in the previsouly sized screen until you mouseover it... Make sense? This doesn't happen in Firefox, it all just plays happily as it should.

    Any suggestions would be greatly appreciated. I've used someone elses menu so wondering if it's some kind of clash between their CSS and mine.

    Thanks in advance.

    Glenn
    Never argue with an idiot... they'll bring you down to their level and beat you with experience...

  • #2
    Senior Coder koyama's Avatar
    Join Date
    Dec 2006
    Location
    Copenhagen, Denmark
    Posts
    1,246
    Thanks
    1
    Thanked 5 Times in 5 Posts
    That's an IE bug (at least IE6 and IE7 affected). Loosely stated, any relative or absolutely positioned element behaves as if it is fixed with respect to the html element unless there is some positioned element between them.

    Emil Stenström has reporten the bug here in its simplest form: http://friendlybit.com/css/ie6-resize-bug/
    It also contains the fix which is to use body {position: relative}

    Although I wouldn't recommend using the method, the bug has been exploited by Stu Nicholls to emulate fixed positioning in IE6: http://www.cssplay.co.uk/layouts/fixed.html

  • #3
    New Coder
    Join Date
    Nov 2006
    Location
    Bristol, UK
    Posts
    85
    Thanks
    6
    Thanked 6 Times in 6 Posts
    Perfect, just added position:relative to the body tag and it fixed it straight away. Great tip, thanks.
    Never argue with an idiot... they'll bring you down to their level and beat you with experience...


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •