Is it possible to centre text vertically in a div? I have a header div and would like the text to have the same spacing above and below. I know I can do it with padding-top but is there a nice CSS command to do this automatically?
To do what you want in a div you would have to use padding-top and padding-bottom.
There is a CSS property "vertical-align" which has two meanings: On a table cell it will give the behaviour you describe. The other use is to adjust the position of inline elements up or down relative to the rest of the line.