javascript - Vertical aligning in CSS? -
so I vertical-align: center; And I know everything about people in different ways have been used for vertical aligning elements in CSS. But I did not find anybody who works for me to work for it.
Actually in my page, just one & lt; Div & gt; , which I want is the center of the page, both horizontally and vertically, the horizontal part is easy, but I'm being hung on the vertical part. My problem is that & lt; Div & gt; The height of is unknown; The content changes, so I can not specify the height for it.
Anyone have any suggestions for me? I'm ready to use javascript if needed, thanks!
Long story short, you get CSS to get vertical centering only.
With Javascript, you can, though.
Comments
Post a Comment