Skip to content Skip to sidebar Skip to footer

3 Column Html Template - Content Overflows Though There Is Clear Both And Height Is 100%

I have 3 divs within a wrapper:
Lorem ipsum dolar sit amet
Lorem ipsum

Solution 1:

Add overflow:auto to #textcontent and remove height:100% form #textcontent and #maincontent

Solution 2:

As you edited your question, I just came to know how it was overflowing, it is because you are using height: 100%;, so your div wont exceed the viewport, so use height: auto; instead and also use overflow: auto; for #textcontent instead of clear: both; as Musa told you to do..(Checked with firebug)

Solution 3:

This is the css file with some minor additions:

  • Text-align for your bar's
  • Width in the wrapper was set to 1000px so all the px were distributed equally among the bar's.
#wrapper {
width: 1000px;
height: auto;
margin:auto;
padding: 30px;
margin-top: 40px;
background-color:#FFF;
color:#000;
border: 2px solid #828fc4;
clear:both;
overflow:auto;
}
#leftbar {
float:left;
width: 250px;
padding: 5px;
text-align:center;
}

#middle {
float:left;
width: 400px;
padding-left: 20px;
padding-right: 20px;
border-right: 1px dotted #2B308C;
border-left: 1px dotted #2B308C;
text-align: center;
}

#rightbar {
float:right;
width: 250px;
padding: 5px;
text-align:center;
}

Just my two cents

Solution 4:

If you need that for text only, try using CSS3 column.

Solution 5:

Add overflow property and change height to auto.

#wrapper {
    width: 1000px;
    height: auto;
    margin:auto;
    padding: 30px;
    margin-top: 40px;
    background-color:#FFF;
    color:#000;
    border: 2px solid #828fc4;
    clear:both;
    overflow:hidden;
}
#middle {
    float:left;
    width: 580px;
    padding-left: 20px;
    padding-right: 20px;
    border-right: 1px dotted #2B308C;
    border-left: 1px dotted #2B308C;
}

Post a Comment for "3 Column Html Template - Content Overflows Though There Is Clear Both And Height Is 100%"