Home  >  Article  >  Web Front-end  >  Compilation of solutions to small css problems_html/css_WEB-ITnose

Compilation of solutions to small css problems_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:55:461286browse

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.


Statement:
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