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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

css left and right align on one row

Status
Not open for further replies.

PeDa

Technical User
Oct 10, 2002
227
NL
Struggling to achieve the following using CSS:

Code:
<table>
<tr>
<td><img src='gif/bullet.gif' alt='*'><a href='index.htm'>Home</a><img src='gif/bullet.gif' alt='*'></td>
<td align=right><img src='gif/bullet.gif' alt='*'><a href='search.htm'> Search this site </a><img src='gif/bullet.gif' alt='*'></td>
</tr>
</table>

On one line:
- against the left margin: * Home *
- against the right margin: * Search this site *
Table width variable

 
Thank you. It does seem that CSS is rather convoluted here.

Peter
 
Not necessarily convoluted, just more than one way to skin the proverbial cat.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
With a table? Or some other markup?

You may find that a float should work in most circumstances though.

HTML:
<div id="container"><p class="right"><img src='gif/bullet.gif' alt='*'><a href='search.htm'> Search this site </a><img src='gif/bullet.gif' alt='*'></p><p class="left"><img src='gif/bullet.gif' alt='*'><a href='index.htm'>Home</a><img src='gif/bullet.gif' alt='*'></p></div>

CSS:
div#container
{
[indent]overflow:hidden;[/indent]
}
div#container p.right
{
[indent]float:right;[/indent]
}

div#container p.left
{
[indent]float:left;[/indent]
}

----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top