SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Dec 2003
    Location
    Denver, CO
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Positioning Problem -- IE vs. Mozilla

    Hello,

    I'm working on a new design for a new personal site, and am having some positioning problems in IE.

    Here is the page itself: http://devnulled.com/index2.html (which validates correctly)

    Here is the CSS: http://devnulled.com/css/devnulled-red.css

    Notice the gap difference in the first silver "content" box on the left hand side of the screen? IE is pushing it out for some reason... I've been looking all over the net for a solution, and have tried different things, but nothing has worked. Any suggesstions?

    Thanks,

    - Brandon

  2. #2
    SitePoint Enthusiast Gamblingharry's Avatar
    Join Date
    Apr 2003
    Location
    UK
    Posts
    83
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think this is cos IE does the box model differently to how it should. If you are setting a width to a div, it is best to avoid setting padding too. IE

    Heres a good article on it: boxmodelhack.html, that probably explains better!

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,556
    Mentioned
    183 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    If you are talking about the larger left margin on the main content then this is a known problem with the left margin of the float nearest the left windows edge (or the right margin of a float near the right windows edge).

    In these cases IE for some reason gets the margins wrong and almost doubles the margin. Subsequent floats and margins are ok.

    The solution I use is to give ie a different margin to compensate although you will need to fiddle with it to get it exact.
    Code:
    * html #contentMain {margin-left:10px}
    Only ie will get the above style and even things out.

    Hope that helps.

    Paul

  4. #4
    Pointiest Petitions carrotflowers's Avatar
    Join Date
    Jul 2003
    Location
    Suburbs of DC (MD)
    Posts
    595
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Because of the asterix, right?

  5. #5
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,556
    Mentioned
    183 Post(s)
    Tagged
    6 Thread(s)
    Because of the asterix, right?
    The universal selctor bug known as the star selector bug:

    More info here:
    http://www.info.com.ph/~etan/w3panth...ifiedsbmh.html

    Paul

  6. #6
    SitePoint Member
    Join Date
    Dec 2003
    Location
    Denver, CO
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a lot guys.. that did the trick!


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
  •