Padding-top problem

http://webs.ashlandctc.org/csimmons/sites/actctlc/pages/index_beta2.htm

Trying to redesign this site because it was hideous…

Any idea why when I add “padding-top:5px;” to #links it spaces my next div??

Of course :slight_smile:
Here is the css
http://webs.ashlandctc.org/csimmons/sites/actctlc/pages/tlccss2.css

your unordered list has default styling, ie: big margins and padding

that is why



#links ul {
margin: 0;
padding: 0;
}

ALSO

since your #links has a defined height of 28px to match the background image, any padding you add, adds to the height… rewrite it as 23px if you add 5px top padding.

[quote=fasterthanlight™;2332405]your unordered list has default styling, ie: big margins and padding

that is why



#links ul {
margin: 0;
padding: 0;
}

ALSO

since your #links has a defined height of 28px to match the background image, any padding you add, adds to the height… rewrite it as 23px if you add 5px top padding.[/quote]

The list was just some crap I was fooling around with. I should really stop posting links to stuff I’m in the middle of working on and start posting code within the thread.

However, the latter point was dead on. Thank you so much. :smiley:

Hahah yea, i wrote the second part after i figured out that the real problem was the padding/height thing…

but your unordered list will still break it i think if you don’t reset its margins

[quote=fasterthanlight™;2332410]Hahah yea, i wrote the second part after i figured out that the real problem was the padding/height thing…

but your unordered list will still break it i think if you don’t reset its margins[/quote]

Even if I don’t use them now, I’ll remember that.
You just saved the forum another question from me. :slight_smile:

Note: that only really applies to a div that has a height setting.

Ah, this little tidbit has already helped me several times.