Does anyone know a reliable way of doing this?
| SitePoint Sponsor |
Does anyone know a reliable way of doing this?




can you expand or post a link with the problem?
"There's no justice like angry mob justice!" --Seymour Skinner
Well it isn't a problem as such. I usually find a way of getting the desired result, even if it means using <center> tags, but I'm sure it must be possible to do it in CSS. After all, that's what style sheets are for!




www.alistapart.com This weeks artical should help, plus there are loads of css links to keep you busy![]()


<center> still holds well, but css can do so to.
<div style="text-align:center"><img src="yourpic.gif"></div>




Actually I believe <center> has been deprecated. The recommended way (without CSS) is to use <div align="center"></div>


Hmmm....
You're right. Center is deprecated. But align seems to be on the list too...
http://www.w3.org/TR/html4/present/g....html#h-15.1.2
Transition into the future is not an easy path is it?![]()
You have to use <div>? That seems barmy.


Inline didn't want to work in img tag.
Embedded class didn't want to work in img tag.
Span using either inline or embedded class didn't want to work.
So far, DIV seems to be the workable one.
This is using IE5.5.
Perhaps since the centered items will be an area upon themselves (not surrounded by other elements) then div is the usable and obvious choice.
Bookmarks