Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
How to display a word on the last line, but on the right?
Old 07-23-2009, 07:53 AM How to display a word on the last line, but on the right?
Skilled Talker

Posts: 83
Trades: 0
Hello,

Sorry if the title was not clear, but i didnt know how to exactly describe this:

I am having a piece of text of about 3 lines, this is displayed in a table cell. Text is aligned left. On the last line, i would like to display a text "read more", but not right next to the last word, but on the right side of the table cell. How would i do this? A SPAN displays next to the last word, a DIV displays below the last textline, and if i give it a relative position and top: -15px, then my table cell displays 15px of empty space at the bottom.

Any ideas?

Thanks!

Matt
killerwhale65 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-23-2009, 07:57 AM Re: How to display a word on the last line, but on the right?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
use float:right on a div element with a fixed width
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-23-2009, 08:04 AM Re: How to display a word on the last line, but on the right?
Skilled Talker

Posts: 83
Trades: 0
ok thanks!
killerwhale65 is offline
Reply With Quote
View Public Profile
 
Old 07-23-2009, 10:37 AM Re: How to display a word on the last line, but on the right?
Junior Talker

Posts: 4
Trades: 0
Or use a span for the word and give it a
position: absolute;
bottom: 0px;
right: 0px;


So you will have the span always at the bottom of your text-box.
__________________

Please login or register to view this content. Registration is FREE
Pixel King is offline
Reply With Quote
View Public Profile Visit Pixel King's homepage!
 
Old 07-24-2009, 03:25 PM Re: How to display a word on the last line, but on the right?
Super Talker

Posts: 144
Name: Nick Mallare
Location: Olathe, KS
Trades: 0
Quote:
Originally Posted by Pixel King View Post
Or use a span for the word and give it a
position: absolute;
bottom: 0px;
right: 0px;


So you will have the span always at the bottom of your text-box.
I am relatively sure this only works if the parent element [i.e. - <div>] has position: relative;.

Nick
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
nmallare is offline
Reply With Quote
View Public Profile Visit nmallare's homepage!
 
Old 07-24-2009, 03:32 PM Re: How to display a word on the last line, but on the right?
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Quote:
I am relatively sure this only works if the parent element [i.e. - <div>] has position: relative;.
Well, you're half right, the parent element has to be positioned, either relative or absolute, otherwise it will position it relative to the BODY and not the div you want it in/near.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 07-24-2009, 10:12 PM Re: How to display a word on the last line, but on the right?
Super Talker

Posts: 144
Name: Nick Mallare
Location: Olathe, KS
Trades: 0
Quote:
Originally Posted by LadynRed View Post
Well, you're half right, the parent element has to be positioned, either relative or absolute, otherwise it will position it relative to the BODY and not the div you want it in/near.
You are absolutely correct, and that was a good idea clarifying.

I guess I was focusing more on the issue at hand, which would be making the parent element have relative positioning. Which is true, because they probably do not want the parent, again in this case, to have absolute positioning.

Nick
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
nmallare is offline
Reply With Quote
View Public Profile Visit nmallare's homepage!
 
Reply     « Reply to How to display a word on the last line, but on the right?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.28633 seconds with 12 queries