Topic: 5 centered Links with CSS (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=26646" title="Pages that link to Topic: 5 centered Links with CSS (Page 1 of 1)" rel="nofollow" >Topic: 5 centered Links with CSS <span class="small">(Page 1 of 1)</span>\

 
bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 09-15-2005 00:32

So I have this page

What I'm trying to do is get those 5 links to lineup, evenly spaced in that div. I'd like to just use the same class for all of them but whatever works would be okay I guess.

I'd like to keep them blocks for display purposes.

Any ideas?



.:[ Never resist a perfect moment ]:.

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 09-15-2005 01:40

#wrapper a {
display:block;
width:20%;
}

adjust for margins as needed (margins and padding can be set to % too)

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 09-15-2005 03:37

Hmm I was hoping to have those lined up horizontally?



.:[ Never resist a perfect moment ]:.

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 09-15-2005 03:49

right - forgot to add the 'float:left;' part

You could also, to avoid problems with border widths, put these links in a list (which would be a good choice semantically), and apply the width and float:left; to the li element, then set whatever padding/margin/border for the a element without affecting the % width of the li.

(Edited by DL-44 on 09-15-2005 03:52)



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu