Home > Web Front-end > HTML Tutorial > CSS DIV image vertical center_html/css_WEB-ITnose

CSS DIV image vertical center_html/css_WEB-ITnose

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-24 12:32:20
Original
1055 people have browsed it

1.





To make the picture in the DIV vertically centered, in a standard browser, set display:table for the parent container; and set display:table-cell; for the child element, so that it can be vertically centered, as shown in the figure above.

2. When position: absolute, I originally thought that when top is not set, it is equivalent to top: 0px. But later I found that when it is not set, the element does not change its position.

Related labels:
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