Is it possible to do with CSS something like this:
CSS:
#right div.item-page, #right .newsflashlatest_news {
padding: 0 133px 0 50px;
text-align: justify;
}
#right .item-page h1, #right .newsflashlatest_news h1 {
padding: 0 !important;
}
#right {
float: left;
width: 755px;
}
HTML:
<div id="right">
fsfds
<div class="item-page" style="background: blue;">
<h1>Home</h1>
<p>Pri iisque malorum ei, est te suavitate mediocritatem, facer molestie explicari vix ne. </p>
</div>
</div>
I need to apply the rules above to all elements in div.itemp-page except h1 element. Basically this means that all elements would have padding except h1 element.
Simply adding "#right div.item-page h1" somehow doesn't work for my case (see here: http://jsfiddle.net/Pr47M/)
You can do something like this
#right div.item-page {
padding: 0 133px 0 50px;
text-align:justify;
}
#right div.item-page h1 {
padding: 0;
text-align:left;
}
Alternatively you can also do this
#right div.item-page *:not(h1) {
padding: 0 133px 0 50px;
text-align:justify;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With