Page is a not externally linkable
- Code, Content, and Presentation
-- CSS
---- multiple alignments in one paragraph


penders - 7:08 pm on Nov 30, 2011 (gmt 0)


text-align only applies to block level elements and aligns text within that element, so in your example, the span would need to take up the remaining width of the paragraph, which it clearly doesn't.

Why does it need to be in the same paragraph? Is it still to be read like a paragraph of text?

One way you could perhaps achieve this, although it would very much depend on the quantity of text you have, would be to absolutely position the inner span to the top/right of the relatively positioned paragraph...

HTML:
<p class="container">text on the left <span>text on the right</span></p>


CSS:
.container { 
position: relative; /* Reqd to pos absolute within */
text-align: left;
background-color: #fee; /* Demo only */
}
.container span {
position: absolute;
top: 0;
right: 0;
}


Thread source:: http://www.webmasterworld.com/css/4392568.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com