Open Bug 948257 Opened 10 years ago Updated 2 years ago

[css-position]Implement position: center

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement

Tracking

()

People

(Reporter: yiorsi, Unassigned)

References

()

Details

(Keywords: css3, dev-doc-needed)

User Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36

Steps to reproduce:

div{
     position: center;
}


Actual results:

Not supported


Expected results:

The div should be centered both horizontally and vertically


Usually a dialog need to do, a height: auto, width: auto vertical and horizontal elements are centered want to present is very difficult, but this is a very common scenario.

Described in the specification:

The box's position (and possibly size) is specified with the ‘top’, ‘right’, ‘bottom’, and ‘left’ properties. The box is vertically and horizontally centered within its containing block and these properties specify offsets with respect to the box's centered position within its containing block. Center positioned boxes are taken out of the normal flow. This means they have no impact on the layout of later siblings. Though center positioned boxes may have margins, those margins do not collapse with any other margins.
Component: General → Layout
OS: Windows 7 → All
Hardware: x86 → All
Severity: normal → enhancement
Keywords: css3
Version: 29 Branch → unspecified
Status: UNCONFIRMED → NEW
Component: Layout → CSS Parsing and Computation
Ever confirmed: true
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.