I’ve run into an odd selector override problem. I’m trying to override the padding-left for the .request-desc-download class in the HTML/CSS below. Adding in additional classes doesn’t seem to help.
Doctyle
<!DOCTYPE html>
HTML
<ul class="letter-list">
<li>
<dl class="pers-data">
<dt>Person:</dt>
<dd>John Doe</dd>
</dl>
<span class="request-desc request-desc-download">
<a href="#">Download</a>
</span>
</li>
CSS:
.letter-list .request-desc{
padding-bottom: 12px;
padding-left: 25px;
background: url(../img/icons-request-desc.gif) no-repeat 0 5px;
}
.letter-list > li .request-desc-download{
background-position:0 -55px;
padding-left:18x !important;
}
Selectors I’ve tried:
.letter-list > li .request-desc-download
.letter-list li span.request-desc-download
body .letter-list .request-desc-download
None of them fix the padding to the left of the .request-desc-download class. Any thoughts? The only thing that seems to work is adding the padding-left into the style attribute of the actual span, which I’d prefer not to do.
You’ve written
18xinstead of18px!It works just fine: http://jsfiddle.net/Qcfah/