Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-23-2012, 03:04 PM   PM User | #1
donnysobonny
New Coder

 
Join Date: Jun 2012
Posts: 44
Thanks: 0
Thanked 8 Times in 8 Posts
donnysobonny is an unknown quantity at this point
Question Struggling with backgrounds

Hey guys,

Please take a look at a basic site that I am putting together

mahesh.testsitedomain.eu

I am really struggling to get my head around how to make the left side menu section background color extend when the content in the right populates further than it's default height. You will see that there is a gap between the bottom of the left side menu, and the top of the footer.

i've tried a few different things but simply cannot work out how to do it.

Many thanks in advance for any help.
donnysobonny is offline   Reply With Quote
Old 06-23-2012, 04:13 PM   PM User | #2
Lerura
Regular Coder

 
Lerura's Avatar
 
Join Date: Aug 2005
Location: Denmark
Posts: 869
Thanks: 0
Thanked 112 Times in 111 Posts
Lerura will become famous soon enough
In order to make height:100% active you need to set the height for body and html as well
Code:
html, body {height:100px;}
and you need to make #leftside position:absolute instead of position:relative;display:table;:
Code:
#leftside
{
    background: none repeat scroll 0 0 #31507A;
    position:absolute;
    height: 100%;
    width: 250px;
}
now that #leftside is invisible to #mainbody, you need to manually move #mainbody to the right equal to the width of #leftside:
Code:
#mainbody
{
    margin: 0;
    padding: 0 !important;
    position: relative;
    width: 1250px;
    margin-left:250px;
}
Lerura is offline   Reply With Quote
Old 06-23-2012, 04:40 PM   PM User | #3
donnysobonny
New Coder

 
Join Date: Jun 2012
Posts: 44
Thanks: 0
Thanked 8 Times in 8 Posts
donnysobonny is an unknown quantity at this point
Thumbs up

Thanks for the response.

That's it all sorted now!
donnysobonny is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:13 PM.


Advertisement
Log in to turn off these ads.