Jump to content

Left-Sidebar overlaps on the content div


bugzy

Recommended Posts

Here's the problem

 

68917817.jpg

 

My CSS code

 

body{
margin:0;
}

#container{
width:100%;
height:auto;
background-color:#666;
padding: 20px 0 20px 0;
}


#header{
width:80%;
height:130px;
background-color:#FFF;
}


#navigation{
font-family:Tahoma, Geneva, sans-serif;
width:73%;
height:auto;
background-color:#CCC;
display:block;
text-align:left;
font-weight:bold;
font-size:16px;
text-transform: capitalize;
padding: 10px 30px 10px 5%;
margin: 10px 0 10px 0;
}




#left-sidebar{
width:15%;
height:auto;
float:left;
background-color:#CCC;
padding: 20px 20px 40px 30px;
margin:10px 30px 10px 150px;
text-align:left;
}


#content{
background-color:#FFF;
width:76%;
height:auto;
min-height:750px;
text-align:left;
padding: 10px 30px 0 30px;
}



#footer{
clear:both;
height:30px;
background-color:#CCC;
width:81%;
margin: 10px 0px 0px 10px;
}

 

 

What's seemed to be the problem guys?

Link to comment
Share on other sites

assuming the sidebar is a child of 'container', you'll need to clear your floats at the end of container. <div class="clear"></div> is how a lot of designers do it, or you can use an :after {content: ''; display: block; clear: both;} to be more semantic.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.