Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

QUICKIE: CSS h-align

Status
Not open for further replies.

TheConeHead

Programmer
Aug 14, 2002
2,106
US
How do I align right in a span with css?

[conehead]
 
You're right, they don't. Spans cannot have any alignment specified (unless of course you make their display block, but aren't you really dealing with a div then?).
 
You're not using a complete doctype.

1) span is an inline element, and therefore cannot have a width.
2) when declaring a width, units are required.
3) inline elements cannot have text-align style.

*cLFlaVA
----------------------------
[tt]tastes great, less filling.[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
That probably works with IE in quirks mode

inline elements do not take width or text-align (plus a few other properties). And there should be a type added to the value (890 what?)px|pt|em etc.

Chris.

Indifference will be the downfall of mankind, but who cares?
Woo Hoo! the cobblers kids get new shoes.
Nightclub counting systems

So long, and thanks for all the fish.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top