At 4/27/2007 03:28 PM, Lori Lay wrote:
>I would like to vertically align and centre some text at the bottom of a
>division.
...
><div id="footer">
> <div id="footwrap">
> <p>Here is the text I want to centre on the bottom</p>
> </div>
></div>
>
>CSS:
>
>#footer {
> text-align: center;
> position: relative;
> width: 100%;
> height: 50px;
> clear: both; }
>
>#footwrap {
> position: absolute;
> bottom: 0; }
>
>Here's the problem: the text is properly aligned at the bottom of the
>footer, but only the start of the paragraph is horizontally centred. As
>you can see, I am using text-align: center to centre the text. This
>doesn't work in this case (in IE 6 only). The start of the paragraph is
>correctly centred, but not the whole thing. So in my example above, the
>word Here seems to be centred, but not the entire line.
According to the spec [1] text-align should be inherited, so perhaps
you've stumbled across one of the many spots where IE6 drifts away
from the spec either deliberately or buggily.
I would try applying centering to the paragraph itself with #footwrap
p { text-align: center; }
You might also be able to diagnose the problem more clearly if you
apply a background-color to the paragraph. Does that show that the
first line is centered and the others are flush-left?
[1] CSS 2.1 Specification : 16 Text : 16.2 Alignment: the 'text-align' property
http://www.w3.org/TR/CSS21/text.html#alignment-prop
Regards,
Paul
__________________________
Paul Novitski
Juniper Webcraft Ltd.
http://juniperwebcraft.com
______________________________________________________________________
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/