I have a qoute at the top of my page and the name after the qoute needs to be aligned right.
Using external css:
.qoutename { text-align: right; }
then html
<span class="qoutename"> Toni Robbins </span>
This lookes ok, but as soon as i preview it site over to the left again....WHY
geoff
seanbun
6:41 am on Nov 7, 2006 (gmt 0)
It is hard to tell by this incomplete code. but I suggest you can put a 1px border on the span container and you can see the width of your span container whether take all the space of the parent container's width.
I think you'll find that "text-align" rules apply to block level elements, but "span" is an inline element. If you use a block level element for the text you want to align to the right, such as <div class="qoutename"> it should work.
<added> While using a block element such as <p> or <div> may give the results that you want, the full story is actually a bit more complex than that. See: [w3.org...] </added>
Geoffrey james
3:00 pm on Nov 7, 2006 (gmt 0)
hi tedster,
Thanks for that. we are all stupid sometimes i suppose and remember hard coding, but forget some very basic rules of CSS.