-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue using AMP #750
Comments
hi @miguelcolomer so assigning a see https://github.com/ampproject/amphtml/blob/master/spec/amp-html-layout.md for further layout attributes and properties. 😸 |
btw @miguelcolomer if you could repost your code samples (it doesn't look like its showing), we'd be able to help you out more if you still need it. thanks |
Ok, i've added the kayout=responsive but it's not working with my header logo. I'm using this css to my header inner: And then i'm usign this code to use the amp-img tag: This works ok but it's not responsive: div id='header-inner'> This is with layout=responsive option... but that doesn't work: div id='header-inner'> Is this sufficient to help me or you would need all my code? (it's a lot of Blogger's XHTML code). i've deleted the "<" markup because if i don't do that i can post the source code. Sorry i'm newbie and i don't know how to work well in this forum, i'm trying to use amp with my blogger code and try to explain it for people in my country. Thank you very much for your work and patience! |
@miguelcolomer np, thank you for your patience as well. so i don't see your code still (github must be doing some sort of escaping) could you go to http://codepen.io/anon/pen/Qjmvmv?editors=100, fork it and then add the problematic scenario you're running into? Thanks again! |
Ok, how can i save my code to explain it there?, i have to sign there and then give you a link? or can i wirite there directly my problematic code? Thanks again! |
@miguelcolomer so you need to fork the code (theres a fork button at the top), add your code (css and problematic markup/am-img scenario) and just press save again, grab the new link from the url and send me the link here so we can investigate. 😸 Thanks! |
Ok, i've done it!: https://gist.github.com/anonymous/6f70e57b681b2c15479a Please review lines 2909 to 2912. If i include "layout=responsive" it not works and i have to add manually the value for widht and height due to amp img specification. I need that image to be responsive. What can i do? Thank you very much again!!!! |
@miguelcolomer so having the also make sure to close the wrong: <amp img src="" /> correct: <amp-img src=""></amp-img> and then remove the inline style as they are not allowed. |
@miguelcolomer another easy way for us to advise you on this is if you can send us a link to a working (though assuming incorrectly working) page. That way we can dig through it using devtools. |
Ok, i've add the the closing markup for
Now the image it's correct for resolutions for more than 637p but if i try to make the image for resolutions lower than 637p the logo it doesn't fit the container and i have to use @media query instead "layout=responsive". When i add the layout=responsive code to the amp-img, the image doesn't work.
Take into account that i have to represent the sourcecode in HTML for you because it's Blogger and it's done with XHTML. Anyway, if you find the problem i can change it in HTML withou any problems. You can see what i said in my page http://www.diariosdelanube.com , if you press F12 and add layout='responsive' in the HTML code you'll see how the logo disappear. What can i do?. |
Hi again, Anything you need to discover the problem, please, let me know. I'll continue applying amp with the Ads in my blog. Let's continue with this issue opened until we found a fix for this. Thank you! |
Let me isolate the problem making a summary: Issues detected in Blogger when trying to use amp-img:
This "Blogger's code" (XHTML) display the logo for my header-inner's page:
This is the HTML code for the previous Blogger's code:
NOTE: if i don't change expr:height='data:height' and expr:width='data:width' with expr:height='42' and ' expr:width='180' the AMP .js show in the Chrome's Developer console an error because needs those values to show the image.
I have to fix the problem using media queries instead of layout= responsive.
Thank you very much!. |
@miguelcolomer I see the issue. The problem is with this definition:
The I'm not sure exactly why |
Great!, i'll do that and i'll update here my results. Thank you very much!!! |
Hi,
i have a Blogger's page and i'm trying to use it with AMP. This is the problem that i have and the steps:
I've included the <script async='true' src="https://cdn.ampproject.org/v0.js"></script> before the
When i'm using the code, i have to use the width and the height. But those values are "calculated" and they are responsive.
I get obviusly the error in my Chrome's developer console: "Expected width to be available and be an integer/length value: 180px; "
But my image needs to be responsive and i can't use it with those fixed values, what can i do?
The text was updated successfully, but these errors were encountered: