In script-home.com, a large number of articles that knowledge is introduced. At the time of cooperation with others, the adaptability of your code will need to do good to the greatest extent. When doing your own web page may be able to ensure that is centered on the vision, but if you make this element, or his parent, you can guarantee in the middle?

vertical - align is a good properties, but at first, this property is in view of the table cell. Although, of course, this attribute for block-level element doesn't work, but for inline elements such as span still has a role (at that time, this property is set to a negative value element content is down, positive upward).

here are more professional centered vertically concentrated solution. Record, in order to refer to.

1, the vertical center line
2, layer level center
3, layer level of text in the center
4, div layer vertical center
5, div layer vertical horizontal center, English very long line
6, vertical scrolling div
7, vertical center, and use the text - align horizontal center
8, vertical center and use the margin level center
#0 - #


This concludes the body part