Text overflows column 1 of a two column CSS layout

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jimchapuk
    New Member
    • Aug 2007
    • 9

    Text overflows column 1 of a two column CSS layout

    I created a two column CSS layout by
    floating the columns left and right respectively.

    When I put text into the first column (via HTML) it continues in
    a straight line through the second column and beyond
    instead of going onto a new line within the first
    column when it reaches the right hand edge of the
    first column.

    The code is below. Main is the name of the left hand
    column and ads is the name of the right hand column.

    If you've got the time, have you any idea what is
    wrong.

    Regards

    Jim Walsh


    [code=css]
    body
    {margin:0;
    padding:0;
    background-color:#0000cc;
    min-width:750px;
    }
    div.wrap
    {background-color:#cc0000;
    margin:0 auto; padding:0;
    width:750px;
    }
    div.header
    {background-color:#ddd; margin:0; padding:5px;
    text-align:center;
    }
    div.links1{
    background-color:#c99; padding:5px;
    }
    div.links2{
    background-color:#cc9; padding:5px;
    }




    div.main{float: left;
    background-color:#cc0000;
    width:500px;pad ding:0 10px;;
    }
    div.ads{
    background-color:#c9c;
    float:right;
    width:210px;pad ding:0 10px;
    }





    div.links1 ul{
    margin:0;
    padding:0;
    list-style:none;
    }[/code]
  • drhowarddrfine
    Recognized Expert Expert
    • Sep 2006
    • 7434

    #2
    Please do not post in the Articles section.
    Also, please use code tags.

    I don't see the problem. We need to see the html, too.

    Comment

    Working...