Thanks.

Good thought and I will try it on some other work. For this instance, I have 
just this one item - not a list.

----- Original Message ----- 
From: "jennifer ham" <[EMAIL PROTECTED]>
To: <css-d@lists.css-discuss.org>
Sent: Monday, September 25, 2006 12:54 PM
Subject: Re: [css-d] text on one line, left and right justify


> On 9/22/06, ~davidLaakso <[EMAIL PROTECTED]> wrote:
>> Tracey Zellmann wrote:
>> > Probably a beginner question.
>> >
>> > I have one line of text containing two elements. I want one to be 
>> > left-justified and one to be right-justified.
>> > Something like this:
>> >
>> > JAMES W. JACOBS, 
>> > Proprietor
>> >
>> > I am not sure how to accomplish this.
>
>> CSS
>> span {float: right;}
>> HTML (the right-float comes first in the source-- the opposite of what
>> one might think)
>>  <p><span>Proprietor</span> JAMES W. JACOBS,<p>
>
> While that will work, I think this is an awesome opportunity to use a
> definition list, especially if you're going to be mentioning other
> people and their titles.
>
> Example:
> HTML:
> <dl>
> <dt>JAMES W. JACOBS</dt>
> <dd>Proprietor</dd>
> </dl>
>
> CSS:
> dt { width: 60%; float:left; clear:left; }
> dd { width:35%; float:left; text-align:right; }
>
> Adjust widths to taste. The clear:left is on the dt in the event you
> want to add more names/titles.
>
> Cheers!
> j
> ______________________________________________________________________
> css-discuss [EMAIL PROTECTED]
> http://www.css-discuss.org/mailman/listinfo/css-d
> IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
> List wiki/FAQ -- http://css-discuss.incutio.com/
> Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
> 


______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to