Sent by Dougal Campbell on 8 February 2002 17:05
On Fri, 8 Feb 2002, Michael Collins wrote:
>
> Simple question (I hope). I want some text to align to the right side
> of a line but remain on the same line as the text on the left side.
> The following approach puts the two bits of text on separate lines:
>
> (defined in an external stylesheet:)
> .title { font-weight:bold;color:#606; }
>
> <p class="title">Michael Collins<span style="float:right;"><a
> href="default.html">Return to Home</a></span>
>
> How to accomplish this?
>
> In the past I have used a table with a align="right" for the cell
> that contains the text to be positioned to the right.
I don't think you can float inline elements like span. This is a slight
hack, but how about:
<p class="title">Michael Collins</p>
<p style="float:right;"><a href="default.html>Back to Home</a></p>
<div class="clear:both;"></div>
....the rest of the content....
Of course, instead of an inline style for the empty div, you might want
to declare a class for it, and set line-height or margins for it.d
--
Ernest MacDougal Campbell III, MCP+I, MCSE [EMAIL-REMOVED]>
http://dougal.gunters.org/ http://spam.gunters.org/
Web Design & Development: http://www.mentalcollective.com/
This message is guaranteed to be 100% eror frea!