By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,287 Members | 1,668 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,287 IT Pros & Developers. It's quick & easy.

Re: Centering again

P: n/a
On 26 mar, 20:19, Gary <gs...@yahoo.comwrote:

The big thing in this group is give a URL not code.

I am new at CSS but what I have done is

<div style="margin: 0 auto; width: 10em;">
<img src="/img/image.gif" alt="image">
</div>

Gary,
your code snippet will center the div within its containing block but
it will not center the image within that div.

More on this:

Interactive demo on CSS horizontal alignment and horizontal formating
when to use margin-left, margin-right and when to use text-align
http://www.gtalbot.org/NvuSection/Nv...Alignment.html

Regards, Gérard
--
Internet Explorer 7 bugs
http://www.gtalbot.org/BrowserBugsSection/MSIE7Bugs/
Jun 27 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.