SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast Dabrowski's Avatar
    Join Date
    Apr 2006
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Width percentage in FF and IE

    I have a div with, say, an 90% width. It seems a little bigger in FF than in IE.

    If you go to http://www.w3schools.com/html/tryit....=tryhtml_basic and test <div style="width: 90%; height: 50px; border: 1px #000 solid"></div>
    , flick back and forth between them and the div takes up different widths. What's the deal?

  2. #2
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    They've got no doctype on their page which means IE is in quirks (broken box) model mode. With the correct box model, total width = width + margin + padding + border. With the broken box model, width = width only.

  3. #3
    SitePoint Enthusiast Dabrowski's Avatar
    Join Date
    Apr 2006
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Tyssen
    They've got no doctype on their page which means IE is in quirks (broken box) model mode. With the correct box model, total width = width + margin + padding + border. With the broken box model, width = width only.
    Thanks.


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
  •