XHTML Strict

TargetZion's picture

He has: 76 posts

Joined: Mar 2004

I'm starting to move to XHTML strict, but I'm having trouble with a few things... Apparently, the 'align' attribute is deprecated, but I've been unable to find a suitbal replacement, or any replacement to be precise... The CSS attribute 'text-align' works alright for text, but i'm trying to maintain my image alignment, while keeping the text surrounding it... Any help?

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

Float or margin depending.

You might want to look into some solid books on the topic by sitepoint or Eric Meyers.

For images, float is generally what you need, though it doesn't work in the same way and will pop things out because floating is literally, well, floating.

For block level elements, float for left/right or margin: auto; will work for centering, except in IE which is bloody annoying but a little minor trickery in the CSS file will adjust for that.

Renegade's picture

He has: 3,022 posts

Joined: Oct 2002

The "margin:0 auto;" works only in IE6 but with a doctype and meta charset tag but not in lower versions.

TargetZion's picture

He has: 76 posts

Joined: Mar 2004

Thankee Sai...

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.