[thelist] right-align with right-edge padding

ben morrison morrison.ben at gmail.com
Tue Mar 7 08:55:05 CST 2006

> A quick CSS styling question: I would like to right-align some text
> within a "ribbon" as a page header; no problem using "width: 100%;"
> and "text-align: right;".  But I'd also like to buffer the text a
> specific distance (say, 30px) away from the right-hand edge of the
> page.  I have tried padding to the right, margin, even text-indent
> (which would work if the text were left-aligned; it doesn't seem to
> work "backwards"), but I can't get the text to budge away from that
> right-hand edge, at least not in IE6 or Firefox 1.5 on WinXP.

May help if you post some code/url as this should be straightforward,
inline example

<p style="width:100%;padding-right:30px;text-align:right;background:red">text


More information about the thelist mailing list