trying to get to grips with CSS positioning. I've included the css and html below. My questions are 1. why is the nav wrap div not wholly contained within the header wrap div and sitting to the right of the logo at the same height? and 2. why is the footer list not contained within the footer div? Thanks
<div id="navWrap"><p>Nav Wrap</p> <ul id="nav"> Nav List <li><a href="about.html">about</a></li> <li><a href="portfolio.html">portfolio</a></li> <li><a href="technical.html">contact</a></li> </ul> </div><!-- end navWrap div --> </div><!-- end headerWrap div -->
1) the navwrap is a float and so is allowed to 'hang' outside of its parent. There are a number of ways to make the parent contain the float - the simplest is to add overflow: hidden to the parent (headerwrap). The logo is a block level element and the navwrap, even though its floating, starts after the logo in the source and hence it starts below the logo. You would either need to a) float the logo as well (or instead of) as navwrap; or b) place navwrap before logo in the source.
html
css
2) same as above