473,597 Members | 2,238 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1890
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******** ***********@new s.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
4193
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
2233
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 http://www.ryanwsims.com/sd.php everything's fine (i.e. centered)
14
3410
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 images consistently reconstitute themselves as centered rows with the maximum number of images on each row. I've made a test page at http://www.americanstate.org/test/gal01/ that illustrates what I'm aiming for and how close I've gotten. I've...
1
1529
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"> function reloadImage() { var now = new Date(); if (document.images) {
6
2305
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 OR have the text appear on top of the image. But in the second case, the image and text aren't centered properly. Any help is appreciated... Jerry
3
4196
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 top level <divthen I can place it with CSS attribute 'left:', but this is a fixed offset. Is it possible to have a <divcentered in the browser window? 2. Verticle centering in <div>
3
3661
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 there is a little JavaScript that doesn't work correctly after I center it. I have tried to realign the page with either <centertag or align="left" attribute, but the pictures displayed with the JavaScript get messed up with everything I've...
2
3039
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 and the number of them can vary greatly. They are all contained within a parent table cell, which is centred on the page. But I am unable to find a way of centering these table cells within the parent cell.
0
1079
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 represent the coordinates of where the first character begins. But if there are new lines under it, I need to adjust that x and y by a certain amount. What to do? - Dave
0
7970
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8274
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8381
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
6695
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5847
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5434
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3886
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3930
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1241
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.