At 4/28/2010 11:06 AM, Climis, Tim wrote:
> > Would the block center vertically if the containing block had a declared
> > height, or does that not matter either?
>
>It would not.
>
> > Thoughts?
>
>If you're in a position be able to specify height on both the block
>and it's container, then this
Jess Jacobs wrote:
> This might be a stupid question, but here goes:
>
> I have a div. I can set a width on that div and set margin: 0 auto; and have
> the thing centered horizontally.
>
> If I instead set a height on the same div, and then set margin: auto 0; it
> does not center horizontally.
>
>
> If I instead set a height on the same div, and then set margin: auto 0; it
> does not center horizontally.
I'm going to assume that you really meant vertically.
> Why? why why why?
Because the definition of "auto" states that if auto is the same for
margin-left and margin-right, then they wil
On Wed, Apr 28, 2010 at 1:40 PM, Jess Jacobs wrote:
> This might be a stupid question, but here goes:
>
> I have a div. I can set a width on that div and set margin: 0 auto; and
> have
> the thing centered horizontally.
>
> If I instead set a height on the same div, and then set margin: auto 0; it
This might be a stupid question, but here goes:
I have a div. I can set a width on that div and set margin: 0 auto; and have
the thing centered horizontally.
If I instead set a height on the same div, and then set margin: auto 0; it
does not center horizontally.
Why? why why why?
Would the bloc