SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Guru
    Join Date
    Feb 2006
    Location
    Chepstow, South Wales
    Posts
    915
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Strange fixed:position issue in IE

    I have narrowed it down to the position:fixed in my css file for my header, which basically goes right across the top of the screen.

    But what seems to be happening in IE is that after the page loads there a delay of a couple of seconds, and then the header moves to the right for no reason.

    Its supposed to be fixed at the top so the website runs underneath it, which it does but this odd issue that after a little while the header slides to the right is very strange indeed.

    Code:
    #header { width: 100%; height: 84px; background: #1A99D5; position: fixed; z-index: 99999; border-bottom:#fff dotted 1px;}
    Here is the site:

    http://www.nicesocks.co.uk/

    It could also be some other of the code Im using, so will keep on looking.

  2. #2
    SitePoint Mentor bronze trophy
    ronpat's Avatar
    Join Date
    Jun 2012
    Location
    NJ, USA
    Posts
    2,608
    Mentioned
    65 Post(s)
    Tagged
    2 Thread(s)
    multichild,

    Whenever you mention seeing a problem in IE, you need to also mention the version of IE in which the problem appears, and whether or not the issue has been tested in other browsers, too.

    I do not see a problem with the header in IE8. Perhaps you have already found a solution.

  3. #3
    SitePoint Guru
    Join Date
    Feb 2006
    Location
    Chepstow, South Wales
    Posts
    915
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi ronpat,

    Sorry for the delay in getting back to you.

    I checked it ah home last night on IE8 and it was fine, so thought it must be me, but have just checked in work and on IE9 its still doing it.

    Basically the 100% width bar across the top holding the nav for some reason moves to the right, but seems fine in the other browsers.

    I checked twice over to make sure I wasnt going mad, as sometimes it doesnt happen on load, it seems to move after 10 seconds.

    Thanks for getting back to me though.

    OK a quick note, I just clicked the 'compatability button' and it seemed to fix it, but thats not the answer is it?

  4. #4
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,526
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    I couldn't see the issue you mentioned in IE10 (or IE10 in IE9 mode) but as a rule of thumb older versions of IE like co-ordinates for fixed positioned elements (unless you need auto positioning specifically).

    Try adding top:0;left:0; to #header just in case the menu is being auto positioned incorrectly. Without a left position explicitly defined the left position will be an auto position which means that if the layout is centred then auto could be offset in some way. This of course may have nothing to do with your issue as I couldn't see it happening.


Bookmarks

Posting Permissions

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