Wrox Programmer Forums
|
CSS Cascading Style Sheets All issues relating to Cascading Style Sheets (CSS).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the CSS Cascading Style Sheets section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 8th, 2005, 07:44 AM
Authorized User
 
Join Date: Nov 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default CSS Text Align

is there a way to align text in diffrent places on the same line

i.e.

.ltest {text-align: left}
.rtest {text-align: right}
.ctest {text-align: center}

then

<div class="ltest"><a href="#">Link</a></div>
<div class="ctest">Text</div>
<div class="rtest">Text2</div>

because it dosent work, it ends up putting all 3 on diffrent lines and alighing them ok, i want them all on the same line

 
Old December 8th, 2005, 08:20 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
Default

You could float ltext and rtest left and right. That requires that both come before ctest in the source. Maybe you don't want that?

Something like this.

.ltest,.rtest { width: 30% }
.ltest { float: left; text-align: left }
.rtest { float: right; text-align: right }
 ctest { text-align: center}

<div class="ltest"><a href="#">Link</a></div>
<div class="rtest">Text2</div>
<div class="ctest">Text</div>

--
http://yupapa.com
 
Old December 8th, 2005, 08:50 AM
Authorized User
 
Join Date: Nov 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

that is . . . . . absoutily perfect

thank you for your help!

 
Old December 8th, 2005, 01:19 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Glad it worked. :)

--
http://yupapa.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Help With CSS "Align" Property TheSchwa Other Programming Languages 1 October 22nd, 2007 03:38 PM
align="center" in CSS crmpicco CSS Cascading Style Sheets 5 February 21st, 2006 09:31 AM
Align text in textarea crmpicco HTML Code Clinic 27 June 14th, 2005 08:26 AM
Align IMG with text Snib HTML Code Clinic 12 April 8th, 2004 10:16 AM
Align text acko ASP.NET 1.x and 2.0 Application Design 2 January 9th, 2004 10:21 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.