how to set ad box width with non google ads

Posted in: Newspaper
Post count: 16

Hi,

I run a newspaper theme site svetohled.cz and I need to ask how do I set the ad width to 100 percent? When I tried to do this in the CSS settings, the ad doesn’t display in full even when I set the width to 100 percent. This is an ad I always have below the article and as it loads there in various forms, sometimes it needs to be wider. This happens in the case of displaying ads from Seznam.cz, which I work with – their ads are displayed only when you come to the site from the seznam.cz search engine (you can see it, if You click on any of the first three links on this page, all of which lead to svetohled.cz and ensure that Seznam.cz’s ads are displayed)

Example of broken ad:

I’m also wondering if there is any way to set the non google mobile ad at 480×480 so that it fits the page exactly across the screen. Even though I set the margins, I couldn’t figure out how to display it all the way through.

Like you can see here:

I would like it to display similar to this ad from google:

Thanks in advance for any advice

Post count: 35449

Hello,
It looks that this is the way that the add you are using is injected. The theme allows it to be on full width, but this is coming at a 300px width -> https://i.imgur.com/9GgdHtp.png What I can suggest is a custom css like this one:
.single .td-pb-span8 .td-visible-desktop{
width: 100%;
}

The code should apply for the ads inside the posts.
About the ads that are not adjusted on mobile, it is because those ads do not have a css for the responsive version. Please let me know where I can check one.
Thank you!

Post count: 16

Hello Calin,

thanks a lot for your advice, it works like a charm!

The badly displayed mobile ads are only visible on mobile when coming from the seznam.cz browser. It is ad behind the first thaw and an ad in front of the footer.

For both, the ad is cut off a bit. These ads are displayed only when you click through from seznam.cz. If you click on this link on your mobile phone and visit any article on svetohled.cz, you will see the badly displayed ads.

Post count: 35449

Hi,
For the mobile version, I see that on the provided link it is an amp version, so the ads are set in those places -> https://i.imgur.com/nZhGHtV.png now, normally those should auto resized if the code do not have a fixed width, for example, 640px or 480px
Thank you!

Post count: 16

Well, it has fixed width to 480px, so it could not auto resized. Is there any solution for fixed width?

Post count: 35449

Maybe only if you for it with a css, maybe you can change that 480px with in width: auto or width:100%

Post count: 16

I tried to do that, but in both settings ads are still cut a little bit

Post count: 27744

Hi,
If the ads are still cut a little bit, I recommend setting the ad dimension smaller for example if it is 480px please set it to 360 and see if it is fully displayed, also setting the left and right margins to auto should center the ad.
I hope this will help you!

Viewing 8 posts - 1 through 8 (of 8 total)
The forum ‘Newspaper’ is closed to new topics and replies.