Box model and IE

Discussion in 'HTML' started by David Graham, Dec 17, 2003.

  1. David Graham

    David Graham Guest

    Hi
    I have been to a website were I got the following advice

    "Borders and Margins are supposed to be measured *outside* the box. IE 5.x
    for Windows messes this up by saying that if you have a 500 x 200 box, and
    you add 10px padding, 10px margin, and 2px border, the content inside will
    only have 458x158 to squeeze into"


    I think the margin is irrelevant - IE 5.x puts the border and padding within
    the box, therefore the available space for the content would be:

    500 - 2(- 10 -2) = 500 - 24 = 476px width

    200 - 2(-10 -2) = 200 - 24 = 176px height

    Do I have this correct, or do I need to think again about this issue

    thanks
    David
     
    David Graham, Dec 17, 2003
    #1
    1. Advertising

  2. David Graham

    Steve Pugh Guest

    "David Graham" <> wrote:

    >I have been to a website were I got the following advice
    >
    >"Borders and Margins are supposed to be measured *outside* the box. IE 5.x
    >for Windows messes this up by saying that if you have a 500 x 200 box, and
    >you add 10px padding, 10px margin, and 2px border, the content inside will
    >only have 458x158 to squeeze into"
    >
    >I think the margin is irrelevant - IE 5.x puts the border and padding within
    >the box, therefore the available space for the content would be:
    >
    >500 - 2(- 10 -2) = 500 - 24 = 476px width
    >
    >200 - 2(-10 -2) = 200 - 24 = 176px height
    >
    >Do I have this correct, or do I need to think again about this issue


    That's correct. Windows IE 4 - 5.5 (and 6 in quirks mode) includes
    padding and border inside the width but not margin.

    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
     
    Steve Pugh, Dec 17, 2003
    #2
    1. Advertising

  3. David Graham

    David Graham Guest

    "Steve Pugh" <> wrote in message
    news:...
    > "David Graham" <> wrote:
    >
    > >I have been to a website were I got the following advice
    > >
    > >"Borders and Margins are supposed to be measured *outside* the box. IE

    5.x
    > >for Windows messes this up by saying that if you have a 500 x 200 box,

    and
    > >you add 10px padding, 10px margin, and 2px border, the content inside

    will
    > >only have 458x158 to squeeze into"
    > >
    > >I think the margin is irrelevant - IE 5.x puts the border and padding

    within
    > >the box, therefore the available space for the content would be:
    > >
    > >500 - 2(- 10 -2) = 500 - 24 = 476px width
    > >
    > >200 - 2(-10 -2) = 200 - 24 = 176px height
    > >
    > >Do I have this correct, or do I need to think again about this issue

    >
    > That's correct. Windows IE 4 - 5.5 (and 6 in quirks mode) includes
    > padding and border inside the width but not margin.
    >
    > Steve
    >
    > --
    > "My theories appal you, my heresies outrage you,
    > I never answer letters and you don't like my tie." - The Doctor
    >
    > Steve Pugh <> <http://steve.pugh.net/>


    Thanks Steve - I thought I was correct but it helps to have it confirmed. I
    will go back to Ryan Parman and tell him. He is the guy offering mutiple IE
    installation. I'm surprised that such a clued up person should make such a
    fundermental gaff. I can't even see how he come up with his figures, he has
    subtracted 42 for some reason.
    thanks
    David

    thanks
    David
     
    David Graham, Dec 17, 2003
    #3
    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. =?Utf-8?B?UGlrb2xvIE1vbmRv?=

    model dialog box keeps refreshing its parent window.

    =?Utf-8?B?UGlrb2xvIE1vbmRv?=, Jun 9, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    2,020
    Trevor Benedict R
    Jun 9, 2004
  2. Gnarlodious
    Replies:
    4
    Views:
    17,712
    elizas
    May 5, 2010
  3. Replies:
    1
    Views:
    517
    Andreas Wollschlaeger
    Oct 6, 2006
  4. mark4asp
    Replies:
    5
    Views:
    361
    David Dorward
    Mar 31, 2007
  5. John Nagle
    Replies:
    3
    Views:
    144
    Thomas 'PointedEars' Lahn
    Mar 3, 2008
Loading...

Share This Page