|
|
#1 (permalink) |
|
Phantom's Freak
|
I haven't done web design in a long time and I just started working on this website... well anyways this is my problem.
I have a div tag for the content of the site then three sections like so; <div id="main"> <div id="menu"> </div> <div id="content"> </div> <div id="sidebar"> </div> </div> Code:
#main {
width: 922px;
background: #8dac83;
margin: 0 auto;
}
/* Menu */
#menu {
float: left;
width: 202px;
}
/* Sidebar */
#sidebar {
float: left;
width: 160px;
}
/* Content */
#content {
float: left;
width: 558px;
background: #FFFFFF;
! Am I going to have to assign it a certain amount of pixels for height or can I stretch it without having anything else besides the nested divs??
__________________
|
|
|
|
|
#2 (permalink) |
|
Pikachu's Flea Collar
Join Date: Oct 2008
Location: California
Posts: 50
Reputation: 10
|
By "stretch" I'm inferring you want to make the height fill the parent element. Or order to do so, most people would have tried:
height: 100%; But that alone is not enough because if it has 100% height, what is it 100% of? In order to accomplish this task, you'll need to have a parent element with a set height. Essentially, you'll also need another "height: 100%;" (for example, your body) for your parent element. However, I was not able to see that you had provided a parent element for your "main" div. If, however, I did not understand your question correctly, I apologize.
__________________
Scientia sapientiaque et veritas te liberabunt.
|
|
|
| Thread Tools | |
| Display Modes | |
|
|