Archived topic
Do Elements have default margins or padding
3 replies · Started by Marco Di Fresco on June 9, 2020
Hello,
I am trying to add a native ad code inside the page using Elements (on after_entry_content).
The ad code is set as "fluid" so it should take all the available width, but it get compressed to a square with ample unused space on the left; the image used in the creative is wide enough to use all the space (it is 1200 pixel wide).
You can find the example at this link; the ad is at the bottom after the 'previous' post link after the post content.
I have dobulechecked the Ad Unit settings on my adserver and there is no setting there that justify this behavior.
How can I solve?
Thank in advance
Hi there,
No - elements don't add any default padding and margin.
Looks like this CSS is causing the issue which isn't something from the theme. Looks like it's from the ad itself:
https://www.screencast.com/t/nUZK7M34zWx
Hi Leo,
thanks for the quick reply.
I investigated your point and I found that ... I am dumb: before setting up that manual G Suite creative that I am displaying now, my Google Ad Manager account was falling back to AdSense (configured so to cover for when I don't have a campaign) who in turn was serving a fixed 320x50.
Since the AdSense ad was a fixed size and not automatically centered, I was experimenting with the CSS to force it centered. When I finally got that GSuite fluid native creative, I forgot about the experimentation and the relative CSS code. :D
Thank you very much.
No problem :)