Alignment property proposal

Problem:
Allow centering of content within a containing block. Today, we only have text-align: center available that only applies to text and inline elements. This makes general centering of elements (like images) really difficult.

Proposal:
It would actually be better to create a new property called:

' alignment'
Value:                                   left |center | right | inherit
Initial:                                    left
Applies to:                          All elements
Inherited:                            Yes
Percentages:                     N/A
Media:                                  visual
Computed value:             as specified

This property describes how the content boxes of the element are aligned. This property does not change the way text will align within an element. For text alignment see 'text-align'. Values have the following meaning:

left
                Aligned all element boxes to the left

center
                Center aligns all element boxes

right
                Aligns all element boxes to the right

Cheers
-- Markus

Received on Tuesday, 6 November 2007 15:16:10 UTC