[css-position]Implement position: center

NEW
Unassigned

Status

()

Core
CSS Parsing and Computation
--
enhancement
4 years ago
2 years ago

People

(Reporter: yiorsi, Unassigned)

Tracking

({css3, dev-doc-needed})

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

4 years ago
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.
(Reporter)

Updated

4 years ago
Component: General → Layout
OS: Windows 7 → All
Hardware: x86 → All

Updated

4 years ago
Severity: normal → enhancement
Keywords: css3
Version: 29 Branch → unspecified

Updated

4 years ago
Status: UNCONFIRMED → NEW
Component: Layout → CSS Parsing and Computation
Ever confirmed: true
Keywords: dev-doc-needed
You need to log in before you can comment on or make changes to this bug.