468,780 Members | 2,268 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,780 developers. It's quick & easy.

Centering and image according to standards

I normally centre an image using a <p align="center"> ... </p> format, but I
understand that this is "deprecated" in the latest standard in favour of styles.
The problem is that I cannot find a style that will centre an image,
"text-align" doesn't work and probably shouldn't.

So what is the "standards-correct" method of centering an image?

TIA

.... Greg Shannan
Jul 20 '05 #1
2 1693
Greg Shannan wrote:
I normally centre an image using a <p align="center"> ... </p> format,
Your image constitutes an entire paragraph? <div> is likely to be more
apropriate.
but I understand that this is "deprecated" in the latest standard in
There's nothing in the word deprecated that makes it worthy of recieving
quote marks in the above.
favour of styles. The problem is that I cannot find a style that will
centre an image, "text-align" doesn't work
text-align does work, you just have to use it in the right place
and probably shouldn't.
It is badly named. inline-align might be better.
So what is the "standards-correct" method of centering an image?


http://dorward.me.uk/www/centre/#inline

--
David Dorward http://dorward.me.uk/
Jul 20 '05 #2
Thanks, the div suggestion does seem to work.

Sorry for the quote marks.

.... Greg Shannan

"David Dorward" <do*****@yahoo.com> wrote in message
news:bn*******************@news.demon.co.uk...
Greg Shannan wrote:
I normally centre an image using a <p align="center"> ... </p> format,


Your image constitutes an entire paragraph? <div> is likely to be more
apropriate.
but I understand that this is "deprecated" in the latest standard in


There's nothing in the word deprecated that makes it worthy of recieving
quote marks in the above.
favour of styles. The problem is that I cannot find a style that will
centre an image, "text-align" doesn't work


text-align does work, you just have to use it in the right place
and probably shouldn't.


It is badly named. inline-align might be better.
So what is the "standards-correct" method of centering an image?


http://dorward.me.uk/www/centre/#inline

--
David Dorward http://dorward.me.uk/

Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

18 posts views Thread by Heath | last post: by
2 posts views Thread by Ryan W Sims | last post: by
1 post views Thread by John Leeke | last post: by
6 posts views Thread by Jerry Camel | last post: by
3 posts views Thread by John Pote | last post: by
reply views Thread by laredotornado | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
2 posts views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.