Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML

Putting spaces between advertisements

Hey!

So I run a website called www.jsjoneswriter.com. Recently, I put up two advertisements through GoDaddy Affiliates. The problem is, two of my banners are too close to each other.

What I don't want:

Banner 1 Banner 2

When I want

Banner 1 (__(Add a bunch of space, here)________________________________) Banner 2

Sorry! This discussion wouldn't let me just space Banner 1 & Banner 2 apart. Just pretend there's no (____) but just a lot of space. That's what I do want to have on my site :)

I'm trying to figure out in html how to space them further apart. Below is the html. Any advice helps.

Thanks!

<a href="http://www.kqzyfj.com/click-9186187-11319155" target="_top"> <img src="http://www.tqlkg.com/image-9186187-11319155" width="468" height="60" alt="" border="0"/></a> <hr> <a href="http://www.anrdoezrs.net/click-9186187-12217501?cm_mmc=CJ-_-5325136-_-9186187-_-Marine%20Corps%20Pride%20Reversible%20Camouflage%20Men's%20Jacket" target="_top"> <img src="http://www.ftjcfx.com/image-9186187-12217501" width="150" height="150" alt="Marine Corps Pride Reversible Camouflage Men's Jacket" border="0"/></a>

<a href="http://www.dpbolvw.net/click-9186187-11337760" target="_top">

<img src="http://www.awltovhc.com/image-9186187-11337760" width="728" height="90" alt="" border="0"/></a>

1 Answer

Hi Jeff, I guess you are looking for a quick answer? You'll need to change you inline anchor ( <a> ) elements to inline-block anchor elements. then you can add margins. Try adding a style property to the first advert.

<a href="*" style="display: inline-block; margin-right: 30px;"/>

You can adjust the gap by increasing or decreasing the margin pixel ( px ) amount. Remember to test this on mobile as your customers may be viewing your site from a phone.

Thanks, Phil! Helpful