Forum Moderators: not2easy
li {
font-size : 14px;
margin-top : 7px;
margin-bottom : 7px;
}
Should work. I wonder why it's invalid though - I was under the impression you could specify the same value for multiple properties by separating them with a comma? Hmm...
I was under the assumption that you can only use the comma for what you are assigning it to, like
Yes, that's right. It's called grouping [w3.org]. That's where the small confusion came from I think ;)
Nick
margin: 7px 0;
The first sets the top & bottom and the second does the left & right values.
While on the topic of list spacing, does anyone know of any research on how much spacing should be used between list items in relation to the text size? How about indenting for multiple levels?
There are four ways to specify the top, left, bottom, right values for the border/margin/padding properties:
(from CSS2 section 8.3)
BODY { margin: 2em } /* all margins set to 2em */
BODY { margin: 1em 2em } /* top & bottom = 1em, right & left = 2em */
BODY { margin: 1em 2em 3em } /* top=1em, right=2em, bottom=3em, left=2em */
and of course:
BODY { margin: 1em 2em 3em 4em } /* top=1em, left=2em, bottom=3em, right=4em */