Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Margin only takes effect through IE Developer Toolbar

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #23581
    daGUY
    Member

    Yet another very bizarre issue with IE6. My page has a footer and I want to give it a margin-top of -6px:

    Code:
    div#footer {margin-top: -6px;}
    Code:

    For some reason, the margin-top doesn’t take effect – the footer stays in the exact same position. Yet when I inspect the footer through the IE Developer Toolbar, it shows "margin-top: -6px" as an applied style. If I then add "margin-top: -6px" to the footer through the toolbar – the same value for margin-top that’s already there – then it moves up 6px.

    No matter what I do, I cannot get the -6px to apply without adding it manually through the toolbar. I specified it in an external stylesheet, an internal stylesheet, and even inline in the footer div. I added !important to the declaration everywhere that I tried it – no good.

    The strangest thing of all – if I add "margin-top: -6px" inline, and then delete that declaration through the toolbar, THEN the footer moves up 6px. In other words, when I use the toolbar to remove the margin that I specified, the footer then moves into the position that it should have been in when the margin was there!

    ?!?!!?!

    #51122
    Jonz
    Member

    You gotta assign a height to it.

    #51115
    Jonz
    Member

    Ok I made this example here.

    It seems to work properly for me if you still having trouble after you look at the source paste the whole css for the container and footer so I can see.

    Edit: Tested in:

    • IE 5.01[/*:m]
    • IE 5.5[/*:m]
    • IE 6[/*:m]
    • IE 7[/*:m]
    • FireFox 3.0.4[/*:m][/list:u]
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.