css - How to align a div vertically on full unknown width? -
this question has answer here:
i mean, if have div, 200px of height , 200px of width, , want align vertically (i can align horizontaly "margin: auto", but, there way align vertically without knowking height of screen?
thanks , sory english, it's not native language
edit: height of screen
here's example, fiddle
div { position: absolute; width: 200px; height: 200px; top: 50%; left: 50%; margin-top: -100px; margin-left: -100px; }
Comments
Post a Comment