- This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Just playing here but, on my fiddle…
http://jsfiddle.net/stevedeer/3qK4f/
For my bold list item to have some padding above it, I have had to add ‘display:block;’ to the css…
li span {
display:block;
font-weight: bold;
padding-top: 10px;
But I am informed that li elements are already block level, so why do I have to add this css for it to work?
Thanks in advance
Steve
elements are inline elements which is why they don’t work with margins and padding by default.
Hi Sgt… but even when I change the span to a class and remove the ‘display:block;’ in the css, it doesn’t work
li .paddbold {
font-weight: bold;
padding-top: 10px;
the new fiddle shows it not working…
http://jsfiddle.net/stevedeer/CbZNk/
Steve
is it right for me to assume that it is the span tag that I have originally and rightly made block level for it to work?… just really confused.
solved it… I removed the space between li and .paddbold