Current location: Hot Scripts Forums » General Web Coding » CSS » Changing alignment halfway through a line of text


Changing alignment halfway through a line of text

Reply
  #1 (permalink)  
Old 01-18-07, 06:40 PM
greymoose greymoose is offline
Newbie Coder
 
Join Date: May 2006
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Changing alignment halfway through a line of text

Hi all,

I'm trying to set up a price list with the service (e.g. Website Backups) on the left hand side and the price (e.g. from $20) on the right with this code:

Code:
print "<p class = 'svc'>";
			print	$url;
			print "<span class = 'price'>".@svcprice[$k]."</span>";			
			print	"</p>";
Where $url is the service and svcprice[$k] is the price. I end up with the 'from $20' appearing on the right but one line below the 'Website Backups'.

My CSS for the class 'price' is:

Code:
.price{
	float: right;
}
I tried text-align too but the text runs together.

I'm beginning to think of using a table but if I can use CSS it makes the code a lot tidier for maintenance purposes. Does anyone have any suggestion as to how I might get this to work?

Thanks.
Reply With Quote
  #2 (permalink)  
Old 01-19-07, 01:40 AM
Vicious's Avatar
Vicious Vicious is offline
Community VIP
 
Join Date: Jan 2007
Location: Belgium
Posts: 584
Thanks: 0
Thanked 0 Times in 0 Posts
try adding a span around your $url (like you wrap around your price), but there you set
Code:
float:left;
That worked here.
__________________
Jack Bauer makes Chuck Norris cry
Reply With Quote
  #3 (permalink)  
Old 01-19-07, 01:27 PM
greymoose greymoose is offline
Newbie Coder
 
Join Date: May 2006
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Exactly what it needed.

Thanks a heap.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
No error message... stormshadow PHP 3 12-11-06 06:31 PM
Redirection back to a page from form submit DAL Perl 11 03-21-05 02:45 PM
I most definately suggest DevelopingCentral.com For Any Website Design/Development! Salty777 General Advertisements 2 10-01-04 04:27 AM
asp-iis-Server error nsuresh_rasr ASP.NET 3 02-08-04 12:47 AM
picking random entries with a filter... Double selection problem dsumpter PHP 7 11-16-03 07:19 PM


All times are GMT -5. The time now is 01:59 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.