Vertically Align A Div
Does anyone have reliable markup/ CSS that vertically align a div across all browsers? Can ge开发者_开发问答t the following working in Firefox but not others..
.parent { display: table; }
.child { display: table-cell; } /* this panel is to align vertically in the middle*/
if you are vertical aligning simple text you can do:
.container { height:300px; line-height:300px }
If you want to vertical aligng a div then you will need to use some javascript in order to make it work in all browsers.
精彩评论