?
Solved

Right justify last line of text?

Posted on 2006-11-13
6
Medium Priority
?
184 Views
Last Modified: 2006-11-18

My html code consists of a table.  In some of the cells I have text which almost takes up the whole cell.  I would like to add a link to the end of the text justified to the right on the same line as the last line of the text.

So it will be something like this:
text text texttext vtexttext text text v textvtext text v v vtext
texttex texxt                                                             link

I tried puting the link in a div with the display set to inline but I can't give it width.  The only way I made it work is by adding a bunch of  .

Any ideas?

Rick
0
Comment
Question by:boricua1213
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 19

Expert Comment

by:VoteyDisciple
ID: 17934848
Try...

text text text text text
text text text <div style="float: right;">link</div>
0
 
LVL 2

Author Comment

by:boricua1213
ID: 17934865
That does not keep the link on the same line as the last line of the text.  It makes a new line.
0
 
LVL 19

Expert Comment

by:VoteyDisciple
ID: 17934889
Ah, right, sorry:
<span style="float: right;">link</div>
0
Basic Security of Your VPC

So, you’ve got this shiny new VPC and a fancy new application configured on your EC2 servers ready to go. This application is only accessible from your computer, which is great for security, but you need your users to be able to access it! So, what’s the easiest way to do this?

 
LVL 2

Author Comment

by:boricua1213
ID: 17934904
Nope same thing
0
 
LVL 19

Accepted Solution

by:
VoteyDisciple earned 2000 total points
ID: 17934962
Ahhh, I see what's going on, sure.

I've just tried this out and it works ok:

text text text
<span width="3em"></span> <!-- a span the width of your link text -->
<span style="float: right; margin-top: -1em;">link</span>


This explicitly moves the link up one line, but to make sure it won't end up overlapping other text at the end of the line there's explicitly a chunk of empty space at the end of the line.
0
 
LVL 2

Author Comment

by:boricua1213
ID: 17935080
OK that worked had to play around with the margin-top value to get it to lineup with the rest of the text.  Otherwise it did the job.

Thanks.
0

Featured Post

WordPress Tutorial 2: Terminology

An important part of learning any new piece of software is understanding the terminology it uses. Thankfully WordPress uses fairly simple names for everything that make it easy to start using the software.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question