MSIE % Margin problem.

Discussion in 'HTML' started by dlychowyd, Nov 28, 2004.

  1. dlychowyd

    dlychowyd Guest

    I've been having some problems with a particular layout i've been
    working on. http://darren.lychowyd.com/mono/ It works as I expect it to
    in FireFox but it doesn't load properly in MSIE. When the page first
    loads there is extra marging between my h1 and my 2 floating divs. When
    you hover your mouse over one of the list-item links the margin
    disappears and moves everything up to where I hoped it would be in the
    first place. Can anyone explain this? Can anyone give me a solution to
    my problem?
     
    dlychowyd, Nov 28, 2004
    #1
    1. Advertising

  2. dlychowyd

    rf Guest

    dlychowyd wrote:

    > I've been having some problems with a particular layout i've been
    > working on. http://darren.lychowyd.com/mono/ It works as I expect it to
    > in FireFox but it doesn't load properly in MSIE. When the page first
    > loads there is extra marging between my h1 and my 2 floating divs. When
    > you hover your mouse over one of the list-item links the margin
    > disappears and moves everything up to where I hoped it would be in the
    > first place. Can anyone explain this? Can anyone give me a solution to
    > my problem?


    Short answer:

    You are specifying top margin in percentage for those divs. Don't.

    Long answer:

    Percent of what? The viewport presumably, however IE actually uses the width
    of the viewport not, as you might expect, the height. You can verify this by
    draging the right border of your window around. As the width changes then so
    does the gap above the divs.

    Guesswork:

    When IE first lays out the page (on reload, or on change of window size)
    uses the width of the viewport, that is the entire width of the browsers.

    Now, roll over something. Things have changed so IE does a new layout.
    However, this time the page has already been layed out. So, it sort of does
    a re-layout. This time however it uses the width of the viewport minus a
    possible scroll bar. Slightly smaller than before. You get that small
    movement.

    So, don't use % for that margin. Use em or px or furlongs or something
    actual.

    --
    Cheers
    Richard.
     
    rf, Nov 28, 2004
    #2
    1. Advertising

  3. dlychowyd

    kchayka Guest

    On 27 Nov 2004 18:34:42 -0800, "dlychowyd" <> wrote:

    > http://darren.lychowyd.com/mono/
    > When
    > you hover your mouse over one of the list-item links the margin
    > disappears and moves everything up to where I hoped it would be in the
    > first place. Can anyone explain this?


    <URL:http://www.positioniseverything.net/explorer.html>

    Lots of weird IE bugs to choose from. ;)
     
    kchayka, Nov 28, 2004
    #3
  4. dlychowyd

    dlychowyd Guest

    Thanks Richard, it helped and thanks for the bug list it will help to
    avoid similar IE problems. I got another question. Is it possible to
    get something like min-width to work in IE?
     
    dlychowyd, Nov 28, 2004
    #4
  5. dlychowyd

    rf Guest

    dlychowyd wrote:

    > Thanks Richard, it helped and thanks for the bug list it will help to
    > avoid similar IE problems. I got another question. Is it possible to
    > get something like min-width to work in IE?


    Several hacks, most of them involving a bit of content as wide as the
    requried minimum width. A div with width set to minwidth would do.

    --
    Cheers
    Richard.
     
    rf, Nov 28, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Charlie
    Replies:
    0
    Views:
    450
    Charlie
    Aug 11, 2003
  2. Cal Who
    Replies:
    1
    Views:
    433
    Alexey Smirnov
    May 16, 2010
  3. Cal Who
    Replies:
    4
    Views:
    580
    Cal Who
    May 17, 2010
  4. Francis Hwang
    Replies:
    3
    Views:
    239
    Patrick May
    Sep 14, 2004
  5. Soren Vejrum
    Replies:
    4
    Views:
    630
    Lasse Reichstein Nielsen
    Jul 5, 2003
Loading...

Share This Page