Home > Web Front-end > HTML Tutorial > [Transfer] DIV CSS to center the text on the background image_html/css_WEB-ITnose

[Transfer] DIV CSS to center the text on the background image_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:31:00
Original
1429 people have browsed it





Complete centering example of CSS div of www.divcss5.com



I am a complete example of centering in css; my layout outer layer has a side of 1px  The image content is centered


Code description:

waicheng Just add the style line-height:120px;vertical-align:middle; to it. Note that the value of line-height: is consistent with height

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template