On 1/12/07 3:23 PM, "Gunlaug Sørtun" <[EMAIL PROTECTED]> wrote:

> Note that text-align: center should not be targeting the image.
> Instead: target the container - the div, p or other block-element - and
> text and images /inside/ the container will be centered.
> 
> You can also center images directly with auto-margins.
> 
> I've added a couple of examples to your test page here...
> http://www.gunlaug.no/tos/alien/test_07_1560.html
> ...so you can see how it works.

OK, now I have another question...

If I don't want all my images to be centered, should I use a class for
centering or a style like your example

 #test2 img {
display: block; margin: 0 auto;
}

The majority of the images on the site will be centered while a few will be
wrapped in a paragraph.

I tried a class, but this did not work.
<http://www.test.entourage.mvps.org/atest/image_center.html>

.img_center {margin: 0 auto;
    }


I hate to put a different topic in a thread, but in your example you used:

div {border-bottom: solid 1px #777;}

I'm having a big problem using <hr /> in the #main content area. After an
<hr /> the text gets thrown way down the screen. At first I thought it was
erasing the text which made no sense until I scrolled down to see it. I
really don't want to have to make divs every where I want to use a
separation line. 

On this page, the <hr /> under the A, pushes text down where it does not
under B and C.

<http://www.test.entourage.mvps.org/atest/>

<div id="abc">
    
<h2><a id="A" name="A"></a>A</h2>

<hr />
            
<p><a title="AOL Mail with Entourage"
href="../accounts/aol.html">AOL</a></p>


My css:
hr {
clear: both;
color: #ccc;
height: 1px;
}
> 
>> Why are these simple things so hard for a newbie? <sigh>
> 
> Probably so we who are slightly more experienced, can brag about it ;-)

It's humbling, I must say.

-- 
Diane 


______________________________________________________________________
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/

Reply via email to