Skip to content

[CSS-align][CSSOM] New attribute for block level vertical centering the content #2017

@Nadya678

Description

@Nadya678

It is easy for me to define:

html
{
   display:table;
   width:100%;
   border:none;
   border-spacing: 0px;
   height:100%;
}
body
{
   display:table-cell;
   vertical-align:middle; 
   /* here add padding to make area for fixed-positioned elements like menu, nav-bar*/
}

but centering of content inside other elements is hard. There is no ideal solution.

Can you add style:
display: block-cell (and probably inline-block-cell)?
Display like block but with working: vertical-align:bottom and vertical-align:middle;

I know, I can use flexbox but... I must add additional container to do it and flexbox has additional adverse effects for elements inside it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions