A while back I rigged up a little ad server to serve Amazon “ads” to our web sites. I wrote it up so that I could easily reuse it for different projects and have a central location for managing it rather than write the code, duplicate it across projects and then have to maintain it all.
Amazon has an affiliate program
which earns you from 4% to 10% commissions on purchases done from traffic you drive to Amazon’s web site. You earn money on sales made during a shopping session that weren’t on the item you linked to, too. Like most affiliate programs, the more you sell in a given month, the higher your percentage commission.
My blogs and the web sites I’m working on are all focussed on particular areas. So, for Apocalypse Blog, I put together a list of apocalyptic media available via Amazon and use my ad server to display a random item on each pageview of the blog.

The problem? I embed the ad by using an HTML iframe to contain it. Unfortunately, its positioning is a bit off. As you may be able to tell, the iframe is shifted down and to the right just a bit.
(more…)
Tags: ads, affiliate program, amazon, amazon associates, associates, css, iframe, margin, marginheight, marginwidth