amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

amp-ad not centering with multi-size and layout=responsive

Open walia opened this issue 10 years ago • 6 comments

Short description of your issue:

Having an issue with 300x250 ad not centering when within a multi-size ad. 300x250

How do we reproduce the issue?

code snippet: http://jsbin.com/yacejajume/edit?html,console,output

What browsers are affected?

all

Which AMP version is affected?

Version 1475106123549

walia avatar Oct 06 '16 18:10 walia

@walia I can't seem to reproduce it consistently. Works every time on my end. What device and browser are you using?

screen shot 2016-10-06 at 2 52 46 pm

@glevitzky @lannka FYI

jasti avatar Oct 06 '16 18:10 jasti

I have adjusted the code snippet. It needed more text so that the ad is below the viewport and can resize. I am using chrome on iOS.

image

walia avatar Oct 06 '16 19:10 walia

This is WAI. layout= responsive will always align the creative left to right. It expects a responsive image, but what's returned is a fixed size image. Why not just center align the ad all the time? http://jsbin.com/suhebuyoxo

jasti avatar Oct 06 '16 19:10 jasti

The <center> element is a deprecated tag. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/center.

walia avatar Oct 06 '16 19:10 walia

Was talking Brian Anderson on Slack. We think this can work with DFP creative wrappers. Good luck!

jasti avatar Oct 06 '16 21:10 jasti

Thanks for the support @jasti !

banderson623 avatar Oct 06 '16 22:10 banderson623