Re: centering images in CSS

by "Kehvan M. Zydhek" <kehvan(at)zydhek.net>

 Date:  Thu, 13 Jul 2000 18:07:33 -0700
 To:  "Rebecca Jean Pedersen" <rjp(at)mail.tele.dk>,
<hwg-techniques(at)mail.hwg.org>
 References:  tele
  todo: View Thread, Original
Rebecca,

To center an image in CSS, try placing it in a <div
align="center"><img...></div>. Works for me. Of course, I also detect
whether the browser visiting my pages can run CSS properly (for the most
part) by detecting the DOM (document.getElementById or document.all) and
sending ONLY those browsers to CSS-enabled pages, sending the rest to
HTML3.2 pages (mainly because Netscape (not including v6) cannot support
those DOMs, and it also cannot properly support a lot of CSS).

Hope this helps.
Kehvan

----- Original Message -----
From: "Rebecca Jean Pedersen" <rjp(at)mail.tele.dk>
To: <hwg-techniques(at)mail.hwg.org>
Sent: Wednesday, July 12, 2000 14:20
Subject: centering images in CSS


| i know it seems like a stupid simple question, but is it even possible
| to center images using CSS or do i have to go back to the old CENTER
| /CENTER tags in HTML?  text-aign: center doesnt work.  align: center
| doesnt work.  (they dont work in netscape anyway) float only has left,
| right, and none as values.
| help?
| thanks.
| rjp
|

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA