SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast mrvnsk9's Avatar
    Join Date
    Sep 2003
    Location
    Tulsa, OK USA
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    text not wrapping in div

    I am working on a website for the company I work for. The page is a two column layout with a static left column and a dynamic right column. For some reason text in the right hand column is not wrapping. The div just expands to the right. Can someone help me fix this?

    <-- CSS -->

    #container {
    background: #fff;
    margin: 0px;
    padding: 0px;
    }
    #level1 {
    background: #fff;
    margin-left: 180px;
    border-left: 1px solid #999;
    }
    #content {
    /*width: 100%;*/
    }
    #menu {
    position: absolute;
    left: 0px;
    width: 180px;
    border-bottom: 1px solid #999;
    padding-bottom: 2%;
    background: #fff;
    }
    #main {
    color:#333;
    background: #fff;
    margin:0px;
    padding:25px 25px;
    cursor:default;
    }
    #footer {
    visibility: hidden;
    }
    .smbox {
    text-align: left;
    width: 40%
    }
    .smboxhead {
    width: 100%;
    background: url(../images/top_bg_main.gif) repeat-x;
    margin:0;
    padding:0;
    }
    .smboxfoot {
    width: 100%;
    background: url(../images/footer_bg_main.gif) repeat-x;
    margin:0;
    padding:0;
    }
    .smboxbody-l {
    width:100%;
    margin:0;
    padding:0;
    background: url(../images/left_bg_main.gif) repeat-y left;
    }
    .smboxbody-r {
    width:100%;
    margin:0;
    padding:0;
    background: url(../images/right_bg_main.gif) repeat-y right;
    }
    .smboxbody {
    margin: 0px 13px 0px 13px;
    padding: 0;
    }


    <-- HTML -->

    <div id="container">
    <div id="level1">
    <div id="content">
    <div id="main">
    <div style="text-align:center;vertical:align:center;margin-top:8%;margin-bottom:8%;">
    <div class="smbox">
    <div class="smboxhead">
    <img alt="topleft_main (1K)" src="images/topleft_main.gif" height="13" width="13" class="float-l" />
    <img alt="topright_main (1K)" src="images/topright_main.gif" height="13" width="13" class="float-r" />
    </div>
    <div class="smboxbody-l">
    <div class="smboxbody-r">
    <div class="smboxbody">
    <h5>User Login/h5>
    <div class="line">&nbsp;</div>
    <p>;lasfjl;kasjdfl;aksjdf;lkajsdfl;kjasdl;fkjasldkfjal;skdjfl;kasjfl;kasjdflk;jasl;fkjsal;dkjflsa;dkjflsdjaflk;jsdlj</p>
    </div>
    </div>
    </div>
    <div class="smboxfoot">
    <img alt="botleft_main (1K)" src="images/botleft_main.gif" height="13" width="13" class="float-l" />
    <img alt="botright_main (1K)" src="images/botright_main.gif" height="13" width="13" class="float-r" />
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>


    Any help would be appreciated! Thanks!
    --Mrvnsk9

  2. #2
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's because this:

    <p>;lasfjl;kasjdfl;aksjdf;lkajsdfl;kjasdl;fkjasldkfjal;skdjfl;kasjfl;kasjdflk;jas l;fkjsal;dkjflsa;dkjflsdjaflk;jsdlj</p>

    doesn't have any breaks in it! Try using some proper words instead of just hammering on the keyboard for 30 seconds (www.lipsum.com).


  3. #3
    SitePoint Enthusiast mrvnsk9's Avatar
    Join Date
    Sep 2003
    Location
    Tulsa, OK USA
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok i feel like an idiot. i didn't know text worked like that. i was just throwing some stuff out there to see what it looked like. didn't realize it wouldn't wrap without breaks. i never really thought about it before.

    thx for the link too. i wondered where you could get some latin.

    Thanks!

    --Mrvnsk9

  4. #4
    SitePoint Wizard
    Join Date
    Jul 2003
    Location
    Kent
    Posts
    1,921
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mrvnsk9
    ok i feel like an idiot. i didn't know text worked like that. i was just throwing some stuff out there to see what it looked like. didn't realize it wouldn't wrap without breaks. i never really thought about it before.

    thx for the link too. i wondered where you could get some latin.

    Thanks!

    --Mrvnsk9
    It's a single word if there are no breaks in it. A word is something with white space either side of it. So it. at the end of the previous sentance is a word, as is the last word here.....


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
  •