I want to position a (or a
) element at the center of the screen irrespective of screen size. In other words, the space le
-
2020-11-28 19:05
try this:
width:360px;
height:360px;
top: 50%; left: 50%;
margin-top: -160px; /* ( ( width / 2 ) * -1 ) */
margin-left: -160px; /* ( ( height / 2 ) * -1 ) */
position:absolute;