svp28
asked on
Extending Sidebar with CSS
I have a page with a wrapper div. In the wrapper I have a sidebar div for the left side navigation and a main div for the content. I am can not figure out how to make the side bar stay even in length with the main page. Right now the sidebar is floating next to the main div.
Things I have tried;
placed the main div inside the sidebar div
set sidebar height to 100% - thought I could extend it to height of the wrapper div.
Any suggestions or code improvements would be appreciated.
Things I have tried;
placed the main div inside the sidebar div
set sidebar height to 100% - thought I could extend it to height of the wrapper div.
Any suggestions or code improvements would be appreciated.
#main {
float:right;
background:#272727;
margin:0 auto;
width:671px;
border: Solid 1px red;
}
#main H1
{
display: block;
font-family: verdana;
font-size: 20px;
color: #fff;
}
#sidebar {
height: 514px;
width:174px;
background: black;
background-image: url(images/leftnavguitar.JPG);
background-repeat: no-repeat;
background-position: 0% 100%;
margin: 0px;
Padding: 0px;
border: Solid 1px yellow;
}
#sidebar ul
{
list-style-type: none;
padding: 0px;
margin: 0px;
border: Solid 1px green;
}
#sidebar li
{
background-image: url(images/nav_arrow.gif);
background-repeat: no-repeat;
background-position: 1% 50%;
margin: 3px 0px 3px 0px;
padding: 0px 0px 0px 14px;
font-family: verdana;
font-size: .75em;
border: Solid 1px yellow;
}
#sidebar li A:link{text-decoration: none; color:#fff;}
#sidebar li A:hover {text-decoration: underline; color: #E7B33B;}
ASKER
The following work
#Container {
border: solid 3px blue;
overflow: auto;
width: 100%
height: 100%;
}
please close this question as I soved the question myself.
#Container {
border: solid 3px blue;
overflow: auto;
width: 100%
height: 100%;
}
please close this question as I soved the question myself.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window