Epson Stylus Photo Printer - Debt Help - Locate Vets - Cell Phone - Free Ringtones

PDA

View Full Version : Space between links on a horozontal line question


jawinn
Jun 28th 2006, 1:31 pm
I'm trying to add more space between links on a horozontal line than just a single space. Two or three spaces would be great. For example:

I have
link link link link

I want to have
link.....link......link.....link (imagine this w/out dots, DP won't let me put in a bunch of spaces)

This is the code I'm using:
<a href="http://www.site.com/link">link</a> <a href="http://www.site.com/link">link</a> <a href="http://www.site.com/link">link</a> <a href="http://www.site.com/link">link</a>

Is there a basic way to do this without using tables?

PFCritics
Jun 28th 2006, 5:02 pm
I think I know what you're trying to do.

&nbsp; = a blank space

So, try something like this:

<a href="link">link</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="nextlink">nextlink</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="etc">...

That should be a fairly basic way. Alternatively, you may be able to add right-padding to each link via css.

jawinn
Jun 28th 2006, 5:43 pm
Perfect!! I knew it was something basic like that. Thanks a ton.

kk5st
Jun 29th 2006, 10:00 pm
Naw, that's a very bad way to do it. One should not let presentation intrude into the structure. A more correct way to do it would use left and right padding or margin.
a {
padding: 0 10px;
}

or

a {
margin: 0 10px;
}cheers,

gary

brian394
Jul 1st 2006, 1:20 am
One thing you can do to ensure you always have an equal amount of spacing in between links (without having to worry about how many &nbsp;'s to use) is to use an unordered list like so...


<style type="text/css">
ul.links {
list-style-type: none;
}
ul.links li {
display: inline;
margin-right: 5em;
}
</style>

<ul class="links">
<li><a href="">link 1</a></li>
<li><a href="">link 2</a></li>
<li><a href="">link 3</a></li>
</ul>

And, of course, you can change the margin-right property to whatever you want.