Compilation of solutions to small css problems_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:55:46
Original
1285 people have browsed it

1, the image is vertically centered:

Set the div containing the image: height=20px; line-height=20px. Just set image vertical-align: middle.

2. The inline block element has a 3px bug, which can be solved by setting it to a block element. Typical elements: img input

Inline elements: The content expands the width and height. The width and height change with the change of the content. The width and height cannot be controlled. It is used to control fonts and colors. Line-height can be set

Block-level elements: Default is full line, can be set.

Block-level elements can include inline elements and block-level elements. Inline elements cannot contain block-level elements.


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