Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with aligning links

Status
Not open for further replies.

DataSpy

Technical User
Nov 15, 2002
39
0
0
US
I'm trying to make it so that I have a link at the left side of a page then 3 more in the middle except I want them to be inline.

Example:

link link link link

I'm using a table and I put align="center" for the center links but I'm not sure how to make the other link align to the left of the table cell.

Code:
<tr valign="bottom" align="center">
   <td colspan="9">
   <a href="link1">left link</a> <== I want this to align left corner of the cell
   <a href="link2">center link</a>
   <a href="link3">center link</a>
   <a href="link4">center link</a>
   </td>
</tr>

I've already tried to use absolute position in css but it doesn't work out the way I want it. Any help would be greatly appretiated, thanx in advance!
 
Hey

I don't think the align="center" and valign="bottom" in your tr tag will help things - probably best to move them the td tag

Try putting the the left hand link in a div and set the style to style="float:left;"

And then with the other 3 links put them in a div and set the style to style="float:right;"

I did a quick test and it seemed to work

Cheers

Nigel Wilson
Christchurch Web Design
 
Code:
<tr valign="bottom" align="center">
   <td colspan="9">
      <div style="float:left;">
         <a href="link1">left link</a>
      </div>
      <div style="text-align:center;">
         <a href="link2">center link</a>
         <a href="link3">center link</a>
         <a href="link4">center link</a>
      </div>
   </td>
</tr>

-kaht

How much you wanna make a bet I can throw a football over them mountains?
sheepico.jpg
 
Thanx for all advice!!! It's working now :)
 
DataSpy - why are you trying to do this?

It's an 'unusual' design - it looks like a slice from a larger design, which might be better done another way.

For example, if you have this design:[tt][COLOR=white purple]
[COLOR=white grey] > menu 1[/color] linkA linkB linkC
[COLOR=white grey] > menu 2[/color]
[COLOR=white grey] > menu 3[/color]
[COLOR=white grey] > menu 4[/color] [/color][/tt]

There's a better way to achieve this.

---
Marcus
better questions get better answers - faq581-3339
accessible web design - zioncore.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top