It is necessary to orient the large block in the center using only css.

I tried Vertical-align and float + marigne auto - nothing works, padding-left and margin-left are not suitable.

  • Vertical-align works oddly at all. Like it is necessary to give the display unit: table-cell; and then the vertical Align, but now something just works for me through it) - metazet

1 answer 1

width: 246px; height: 324px; left: 50%; magin-left: -123px; top: 50%; margin-top: -162px; position: absolute; 

vertical-align is designed to align inline elements. Alignment in height of rubber content only supports items with

 display: table-cell; 

... if cross-browser.

  • helped, thank you - Happy_Cougar
  • one
    To accept the answer, you can click the check mark on the left - knes
  • In this way, by the way, it is convenient to create fully centered sites by creating a #center div with width = height = 1px and then adding elements positioned by margins there. In this case, we must not forget to put overflow: show ;, for IE. - Sh4dow