Andrea Posted November 7, 2009 Report Posted November 7, 2009 (edited) This is downright embarrassing, but I cannot figure out what's going on here: http://tiny.cc/lw7DK I am trying to move the h1 in the header down a bit - but every time I add a margin top to my #header h1 CSS, the ENTIRE header moves down - it's putting the margin to the #header, not just the #header h1. I know I'm a bit rusty, but this is ridiculous. I've checked everything and see nothing wrong. #header h1 --- as far as I know, should ONLY affect the h1 inside my header div and NOTHING else. And strangely enough - adding margin-top to my #header h2 only affects the h2 inside the header and NOT the entire header... and btw - this is a work in progress - I'm working on the formatting as we speak. EDIT I've added padding-top and that works - but I'd still like to know what's going on with the margin-top. Edited November 7, 2009 by Andrea
jlhaslip Posted November 7, 2009 Report Posted November 7, 2009 The #header div has a set height of 200px and giving the h1 too much margin-top will force the h1 margin above the overall height allowed for the #header div. The #header cannot contain all the stuff you have added, (img, h1, h2, etc), so it expands upwards.
Andrea Posted November 7, 2009 Author Report Posted November 7, 2009 Of course it had to be something simple... Thanks.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now