Reputation: 1085
I am trying to learn a little bit about rewrite my CSS code. I think I am stuck on some old happits I am having. So can this CSS code be written more nice that this?
<style>
.result-cols ul.items li.add-item .item {
padding: 0px 0px 10px 0px;
}
.result-cols ul.items li.add-item {
width: 15%;
}
.result-cols ul.items li.add-item .desc:after {
background: none;
}
.result-cols ul.items li.add-item .desc {
height: 30px !important;
}
.result-cols ul.items li.add-item a.button-add {
display:none;
</style>
Best regards
Upvotes: 0
Views: 46
Reputation: 6368
Each of your style rules start the same, with .result-cols ul.items li.add-item
. If you won't have elements with the class add-item
elsewhere on the page you could just remove .result-cols ul.items li
and start your rules with .add-item
Upvotes: 1