I created a navigation bar for my school project (I’m doing basic design, then we’re adding the mysql database), and the bar works great, but it does not extend to the bottom of the page, it’s just a little box right now.
Here’s my style script
style type='text/css'>
#navigation {
display:block;
width:150px;
float:left;
margin-left:7px;
margin-right6px;
margin:5px;
border-style:solid;
}
#navhead {
text-align:center;
margin-left:7px;
margin-right:6px;
}
#links {
display:block;
width:60px;
}
</style>
Am I missing any attributes that say ‘extend to bottom of frame?’
Thanks!
You need to use the
heightproperty. You can set theheightto 100% (the height of this parent, so the<body>) but it will looks weird, because it will render the height + the padding + border + margin.You need to use the
border-boxproperty with the height. It allows you to define if the padding and/or border (or none, by default) are count in theheightandwidthproperties. You also needs to kill themargin-topandmargin-bottom.After those changes, here what your CSS should look like :