Diane Ross wrote:
> I don't know what I'm doing wrong. When I want to center an image I can only
> get it to work if I select <div align="center">. If I use a class
>
> .txtcenter, .center { text-align: center; }
>
> Or #test img { text-align: center; } the image does not center.
Because an image is not text. To center an image, you need to set the
left and right margins to "auto" - #test img {margin: 0 auto 0 auto;}
> Here is my example:
>
> <http://www.test.entourage.mvps.org/faq/center_images.html>
>
> Why are these simple things so hard for a newbie? <sigh>
I don't know, I'm still trying to figure this stuff out, too. I do
sometimes wonder why CSS doesn't have a simple "align:center" setting!
--
David
[EMAIL PROTECTED]
authenticity, honesty, community
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/