please help, simple HTML problem

PixelPusher

Super Moderator
Staff member
It s block level element and when you decrease the top value all other elements below will adjust accordingly. It's called document flow. If you want to keep the div below in the same location try adding a bottom margin. Also the heading element is bold by default so there is no need to declare this in the css rule.

For example:
Code:
div#products {
margin:-20px 5px 30px;
font-size: 24px;
color: red;
}
Alternatively, you could also try using the css properties "height" and "line-height".
 
Top