September 2, 201114 yr Hi, and thank you for checking out my thread. I want to have just a plain #FFF Header with a width of 965px and a height of 155px. Empty Header I guess is what I should say. And right under the Header I want a simple Black Nav Bar that width is 100% and height is 39px. Question is, would I use margin: 0 auto to center the Header and glue it to the top of the HTML document? And also, because I want the Nav Bar to span the width of ones monitor I would not be using a Wrapper, am I correct? And how would I position the Nav Bar to glue to bottom of the Header? The NAV BAR is not inside the header, it's right below it. Thank you
September 2, 201114 yr margin: 0 auto, will take into consideration of the space 'automatically' left on the right/left side of the div and divide it equally to center your div. Nav bar to bottom of header? Just use divs.. <div id='header'>content bla bla</div><div id='nav'></div> The nav div must come after the header. Generally it may not display exactly under the header div due to browser styles. so it's always a good idea to reset your browser styles and style it how you wish. e.g div { margin: 0; padding: 0;
September 2, 201114 yr Put your header, main content and footer DIVs into a DIV with an id "wrapper" Then put a margin: 0 auto; on the wrapper div. As long as the header div comes before the rest of the content it will be at the top.
September 6, 201114 yr Hi MartyBoi, You should try using clear:both.It would simply position your nav below the header. Thanking You, Futureistic Team.
Create an account or sign in to comment