SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member Trep's Avatar
    Join Date
    Jan 2006
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Weird variant of the double margin bug?

    Hello to the Forum. This is my first post, and I'm relatively new to CSS, so I guess I won't be able not to make a fool of myself Be gentle

    Ok, I was messing around trying to get a "sticky" javascript menu to work on a CSS layout (I'm not going to really use it, so it's just for the sake of academia.)

    Before going on with trying to explain the problem, I've prepared a nearly-minimal test page and I've put it there:

    http://www.polysemant.it/mistery.html

    If you open it with Firefox, everything will work (well, apart from an ugly space under the main column...) The "menu", here a green box, will slide down next to the main content when you scroll the page up or down. The menu is both floated and relatively positioned.

    If you open it with IE6, the menu will be initially positioned in the right place (5px from its container edge.) But just hover the mouse over the link to switch on a border and background effect and -bing- the menu's left margin will increase to 10px. If now you scroll down the page, the menu will move back to its original, 5px-margin position - at least until you hover over the link again.

    These days I'm finally acknowledging the harsh reality and starting to learn about IE peculiarities. This one seems a strange hybrid of what they call guillotine bug (hovered link + border and background effect trigger a strange behaviour) and the double margin bug.

    Also note: if I give the floated menu's div the "display: inline" property, then the menu will start with a 0px left margin and will get a 5px margin when you hover on the link inside it.

    I don't really need a way to fix it (I have one actually: forget the margin and wrap the menu in a left-padded extra div), but I'd love to have half a clue about what is going on.

    Thanks in advance!

  2. #2
    SitePoint Member Trep's Avatar
    Join Date
    Jan 2006
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Trep
    (well, apart from an ugly space under the main column...)
    Just to say... I solved this one about the stray space at the bottom, it was a stupid bottom margin I had added to the box enclosing the text. Silly me. Just ignore that sentence.

    The main mistery is still there


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
  •