...

View Full Version : Nesting DIVs



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

http://www4.ncsu.edu/~mpborkow/test.html

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?

-Matt

_Aerospace_Eng_
07-15-2005, 03: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;
margin-left:1%;
background: url("graphics/cutecolorsbearbg2.gif");
align: center;
}
And then float the nav

.navigation {margin-left: 5px;
margin-top: 5px;
margin-bottom: 5px;
width: 200px;
float:left;
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum