sphinx Posted March 27, 2014 Share Posted March 27, 2014 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. Quote Link to comment Share on other sites More sharing options...
OrionSuperman Posted March 27, 2014 Share Posted March 27, 2014 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. Quote Link to comment Share on other sites More sharing options...
sphinx Posted March 27, 2014 Author Share Posted March 27, 2014 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. Quote Link to comment Share on other sites More sharing options...
Strider64 Posted March 28, 2014 Share Posted March 28, 2014 (edited) .content-wrap { box-sizing: border-box; /* more code here... */ } Maybe doing something like this? Though looking at the problem again probably not. Edited March 28, 2014 by Strider64 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.