How do you make banner ad responsive?

Hi there -- 

My banner ad used to be responsive but for some reason it no longer is (it looks fine on desktop but doesn't shrink to fit on iPhone).  What should I do differently? 

This is what I have in the header/subheader "extra" portion: 

<a href="http://www.charmcitychocolate.com/" target="_blank"><img class="scale-with-grid" src="http://towsonflyer.com/wp-content/uploads/2016/10/ccc-banner-600-100-border.jpg" alt="" /></a>

and I have custom CSS to make the banner ad larger: 

.header-magazine #Top_bar .banner_wrapper { width: 600px !important; }
.header-magazine #Top_bar .banner_wrapper img { max-height: 118px !important; }

Thank you!
towsonflyer.com

Comments

  • Hi,

    to make the banner responsive, please remove below custom css line:
    .header-magazine #Top_bar .banner_wrapper { width: 600px !important; }
  • I just added that line, with Muffin Group's help, to make it appear larger. But why can't it still be responsive? Is there a different change I can make? 
    thanks!
  • Hi,

    Remove the custom css line:
    .header-magazine #Top_bar .banner_wrapper { width: 600px !important; }
  • Right, that's what you said before. But I'm saying that I recently added 

    .header-magazine #Top_bar .banner_wrapper { width: 600px !important; }

    because I wanted the banner ad to appear larger on the site (on desktops). So if I remove the line, it won't appear larger. But I'd still like it to be responsive so it shrinks on tablets or phones. How can I do that? 

    Thanks! 
  • Try this then:


    .header-magazine #Top_bar .banner_wrapper {
    width: 100%;
    max-width: 600px;
    }
  • That worked - thanks! I have another quick question: What is the best way to do a search? If I want to find something about banner size and I type "banner size" into the search box, I get all past discussions that contain banner OR size. How do I narrow it down to only discussions that have both words? Thanks!
  • I'm happy it helped. Search functionality is wordpress default. You cannot narrow it down so easily.  
Sign In or Register to comment.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.