View Full Version : Nesting DIVs

07-15-2005, 03:55 AM
I'm a beginner with all this HTML/CSS stuff, sorry if this is a straightforward question.


Basically, I want the "Main text will go here" box to be aligned at the top of the page. Instead no matter what I do it begins below my navigation bar instead. How can I fix that?


07-15-2005, 04:45 AM
Lose the absolute position here

#inset {position: absolute;
width: 99%;
left: 1%;
top: 10px;
background: url("graphics/cutecolorsbearbg2.gif");
align: center;
You should be able to use margins and padding instead, also you need to float the nav to the left and there is no such thing as float:top. Only float:left; float:right; or float:none;

#inset {margin-top: 10px;
background: url("graphics/cutecolorsbearbg2.gif");
align: center;
And then float the nav

.navigation {margin-left: 5px;
margin-top: 5px;
margin-bottom: 5px;
width: 200px;
background: url("graphics/cutecolorsbearbg3.gif");
text-align: center;
Your content should now move up by itself. You'll need to give a margin-left to the content to clear the width of the nav.