SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: Breaking layout

  1. #1
    SitePoint Addict vflytrap's Avatar
    Join Date
    Aug 2003
    Location
    Twighlight Zone
    Posts
    206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Breaking layout

    Okay - this seems to be a question that a few people have asked (ie http://sitepointforums.com/showthrea...ht=window+size) but no one has answered completely.

    I have an image based navigation. It is approx. 800px wide. When the browser window is resized to smaller than 800px, the layout of images (with in a div) breaks and begins to wrap. I have tried giving it specific width (the div) and such, and still no avail.

    Current Code:
    #nav {
    margin-top: 0;
    margin-left: 25px;
    padding: 0;
    border: 0;
    display: inline;
    background: transparent;
    color: #d9e1ef;
    width: 840px;
    voice-family: "\"}\"";
    voice-family:inherit;
    width: 815px;
    }

    I need to know the one thing that will stop the div from breaking (wrapping?) regardless of window size. I've been working on this for too long now - and seriously need help. Can someone help me?


    Thank you... in advance before I start chewing on the keyboard

    _________________________________________
    Rockin' in the free world...
    brilliant nonsensical ramblings

  2. #2
    SitePoint Addict Knightime's Avatar
    Join Date
    Jan 2003
    Location
    USA
    Posts
    376
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by vflytrap

    Current Code:
    #nav {
    margin-top: 0;
    margin-left: 25px;
    padding: 0;
    border: 0;
    display: inline;
    background: transparent;
    color: #d9e1ef;
    width: 840px;
    voice-family: "\"}\"";
    voice-family:inherit;
    width: 815px;
    }
    Why do you have two widths?
    Troy

  3. #3
    SitePoint Addict vflytrap's Avatar
    Join Date
    Aug 2003
    Location
    Twighlight Zone
    Posts
    206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's the box model hack - for IE versus "standards" browsers. The first is the one IE will read and apply properly because it will be stopped by the voice tags - then the 2nd width is the one that "compliant" browsers will display...
    _________________________________________
    Rockin' in the free world...
    brilliant nonsensical ramblings

  4. #4
    SitePoint Addict vflytrap's Avatar
    Join Date
    Aug 2003
    Location
    Twighlight Zone
    Posts
    206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay - I think I figured it out -

    When building the XHTML page - the entire thing (content-wise) has to be contained in a div with a set pixel width. That div holds nothing but the rest of the divs from the page. If that is there, the layout won't break.

    for example:
    #bigholderdiv {width: 800px}
    #littledivIdon'twanttobreak {whatever styles}

    <div id="bigholderdiv">
    <div id="littledivIdon'twanttobreak">
    Content
    </div>
    </div>

    That is what I "think" is making it work. So yeah - nevermind, I FINALLY figured it out. woot.
    _________________________________________
    Rockin' in the free world...
    brilliant nonsensical ramblings


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
  •