On 26 mar, 20:19, Gary <gs...@yahoo.co mwrote:
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
Regards, Gérard
--
Internet Explorer 7 bugs
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>
>
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.
Interactive demo on CSS horizontal alignment and horizontal formating
when to use margin-left, margin-right and when to use text-align
Regards, Gérard
--
Internet Explorer 7 bugs