Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.