Jump to content

Ignore default padding rule on a class


sphinx

Recommended Posts

Hello.

 

My site mobile theme has a overall padding of 10px, however, this isn't displaying my mobile ads correctly. I have the advert codes wrapped like this:

<div class="googlead">
<!-- ad code here -->
</div>

This is the @media main css:

.content-wrap{
    line-height: 150%;
    font-size: 15px;
    padding: 10px;
    background-color: #ffffff;
}

Is it possible to make ".content-wrap{" ignore the googlead class so that I can specify a 0% padding as required.

 

Could I use :not in this instance?

 

Cheers.

 
Link to comment
https://forums.phpfreaks.com/topic/287341-ignore-default-padding-rule-on-a-class/
Share on other sites

I'm fairly new to HTML/CSS so if my solution is wrong I apologize.

 

Due to the order of precedence in CSS, why do you not just add another CSS tag specifically for .googlead and set its padding to 0px? That should over-ride any inherited padding it has acquired.  

I'm fairly new to HTML/CSS so if my solution is wrong I apologize.

 

Due to the order of precedence in CSS, why do you not just add another CSS tag specifically for .googlead and set its padding to 0px? That should over-ride any inherited padding it has acquired.  

 

This doesn't seem to address the issue. 

 

Thank you for trying anyhow.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.