473,394 Members | 1,658 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 1877
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: Heath | last post by:
Is it proper to center images in a <div> by using the text-align: center property? Or is there a better way?
2
by: Ryan W Sims | last post by:
I'm having trouble with centering in IE... http://www.ryanwsims.com/koh/ The image should center over the text. It does in Firebird, but not in IE for some reason. If you look at ...
14
by: Filippo Giarratano | last post by:
Hi -- I'm trying to figure out how to make a photo thumbnail gallery page using CSS and no tables that (1) has a caption below each image and (2) is centered -- so that as browser width changes the...
1
by: John Leeke | last post by:
How are images positioned on a page? In particular, how do I adapt the following javascript code: ********** <img src="officecam0000.jpg" name="myImageName"> <script language="JavaScript">...
6
by: Jerry Camel | last post by:
I want to center an image on the screen and have text centered over the image. What's the best way to do this? I've been playing with style tags and I can get the stuff to center automatically...
3
by: John Pote | last post by:
1. Horizontal centering a <divin browser window. The current trend seems to be to place page content in a fixed width area in the middle of the browser window. How is this achieved? If I use a...
3
by: BT | last post by:
I have taken over the support of an existing webpage and I need to revise the page so that it is centered (left and right) on the screen instead of aligned on the left. I can do this easily, but...
2
by: rudicheow | last post by:
SHORT VERSION ============= I have a bunch of identical fixed-size single-celled tables that rest against each other horizontally thanks to "float:left". These tables are dynamically generated...
0
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4. I have GD and freetype libraries. How do I center text within an image if that text contains new lines? According to the imagettftext docs, the x and y specified...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.