Your example seems to work fine, copying this into your page should get a result.
An iframe will copy the resulting html (from the link) into an element.
this works fine, just remove the // from your link.
Problem :
I am creating an ecommerce store that sells coffee using amazon affiliate links. I want to use the premade links that amazon gives you.
I’ve tried the obvious solution of copying and pasting the code into my HTML, but nothing appears when I copy the element into my index.html
All the tutorials I’ve found are for how to use amazon links in wordpress or youtube but I am creating my own website from scratch, so can put it in my portfolio and get hired.
I haven’t worked with iframe before, but I tried changing iframe to div and that didn’t fix it.
Comments
Comment posted by putvande
Divs can’t load other HTML in this way. So you just want to use iframes for now. Does the URL in the
Comment posted by games247
I copy pasted the URL into google and it took me to the properly styled product link. When I click refresh on my html page it attempts to load the image but it briefly shows the sad paper icon.
Comment posted by jsfiddle.net/putvande/w8xodpgy
Works fine here actually:
Comment posted by Tyler Edwards
When I removed the ‘//’ at the beginning of the url, it seemed to display just fine.
Comment posted by games247
I tried fiddle and it doesn’t work for me, the styled link doesn’t appear… Maybe there’s something different about my computer? I’m using chrome what browser are you using?
Comment posted by games247
Okay this question prompted me to think outside the box. I’ve turned off adblock on my index.html and now the link appears…………… So that raises the question, How do I make sure other people can see the link if they have adblock on?
Comment posted by Rimble
I’m pretty sure if you would figure that out you would make literal billions.
Comment posted by putvande
Why would it be a link? Its a page OP wants to show, to link to it.
Comment posted by games247
The amazon links I want to use have more than just an image. I don’t want to restyle all the text, borders and such.
Comment posted by hedgethe
Sorry I was confused I thought you wanted to style it yourself, see the edit above. Just remove // for your link.