Reputation: 3122
I have this HTML:
<ul>
<li>content <span>more</span></li>
</ul>
and this is my CSS:
li{
padding: 30px;
}
span{
padding-top: -20px;
}
the padding on the span
does not take effect. I could work around it by changing the HTML, but now that I was faced with this, I wanted to learn whether there is a work around or not.
Upvotes: 1
Views: 66
Reputation: 1746
padding-top
on inline element wouldn't work! Use block element, or set span { display:block }
.
Upvotes: 2