On 2006-07-14, Hymer <ergobob@sonicwrote:
Hello,
I have a paragraph where I want to add one word at the end. I want this word
to be aligned right but I want it to appear on the same line as the last
line of the paragraph. So I don't want to use <p align="right"because that
drops it down to the next line. Also, I am modifying an online third party
html so I can't use CSS.
Is there an html solution to right justifying one word on the same line as
the last line of a paragraph?
What you need ideally here is a float. Before the days of CSS, tables
(and not much else) floated, so you could try:
<table align="right">
<td>word</td>
</table>
in the last line of your paragraph. Might work, depending on what
particular combination of bugs your browser(s) has/have.
Otherwise, when you say you can't use CSS, do you just mean you can't
add a stylesheet? If you can do inline styles just do:
<span style="float: right">word</span>
On the last word.
It should appear on the same line as the last line of text; but if there
isn't room for it, it will bump down to the next line. Firefox will
currently put it on the next line anyway even if there is room (this is
a known bug).