SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Wizard jag5311's Avatar
    Join Date
    Jan 2003
    Location
    Somewhere in Indiana
    Posts
    3,082
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Ie 5.0 and 5.5 treating %width div weird

    On this page,
    http://www.btkdesigns.com/seemac/seemac.htm

    The center div does not stretch very far on IE 5.0 and 5.5. Everything looks fine on Mozilla, Firebird, and IE 6.0 and Opera.

    Any thoughts as to why it is doing this?

    Oh, and to top it off, if the center is a % width, why is it that when the window is shrunk enough, the NEWS div wants to overlap the center versus keeping the appropriate width?

    Thanks
    Bryan

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,855
    Mentioned
    159 Post(s)
    Tagged
    4 Thread(s)
    Hi,

    Why dont you get rid of the 60% width and avoid the problem altogether. Just give it a right margin as follows.
    Code:
    div#content {
    margin-left: 150px;
    padding-right: 20px;
    padding-bottom: 10px;
    margin-top: 35px;
    margin-right:200px;
    }
    Works in ie5+ ok now.

    Paul

  3. #3
    SitePoint Wizard jag5311's Avatar
    Join Date
    Jan 2003
    Location
    Somewhere in Indiana
    Posts
    3,082
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why dont you get rid of the 60% width and avoid the problem altogether
    Because I am an idiot and often feed myself more css trouble then needed

    Thanks

  4. #4
    SitePoint Wizard jag5311's Avatar
    Join Date
    Jan 2003
    Location
    Somewhere in Indiana
    Posts
    3,082
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Another question though,

    why does it have to be set based on the distance from the right side of the browser window vs. the distance from the NEWS div?

  5. #5
    SitePoint Wizard jag5311's Avatar
    Join Date
    Jan 2003
    Location
    Somewhere in Indiana
    Posts
    3,082
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh, and in IE 6.0, again, even with 200px of margin right, once I get it down to around 650 pixels, maybe even a little less, it throws down the CONTENT div

  6. #6
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,855
    Mentioned
    159 Post(s)
    Tagged
    4 Thread(s)
    why does it have to be set based on the distance from the right side of the browser window vs. the distance from the NEWS div?
    Because the news div is floated.

    Oh, and in IE 6.0, again, even with 200px of margin right, once I get it down to around 650 pixels, maybe even a little less, it throws down the CONTENT div
    It's because you have set the width on the #content h2 (about us). When the space is no longer wide enough the element drops below to make room. You could leave the width out and let the line be the same length as the content box and then it will scale with it (or give it a width of say 30%).

    Paul

  7. #7
    SitePoint Wizard jag5311's Avatar
    Join Date
    Jan 2003
    Location
    Somewhere in Indiana
    Posts
    3,082
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    got ya.

    Thanks Paul, I really appreciate it.

    <wish>Please pass on your wisdom of CSS into my brain via the snap of your fingers</wish>


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
  •