Home > Web Front-end > HTML Tutorial > Use vertical-align to align input and img_HTML/Xhtml_Web page production

Use vertical-align to align input and img_HTML/Xhtml_Web page production

WBOY
Release: 2016-05-16 16:36:45
Original
1235 people have browsed it

Put input and img on the same line. The img tag is always higher than the input, which is very ugly. I have tried many methods before, but none of them work. Later, the most searched thing on the website was to add an align="absmiddle" attribute to img. This method seems feasible, but it does not comply with HTML standards. Later, I accidentally discovered that adding vertical-align:middle to input and img at the same time is enough:


Copy code
Code As follows:

input,img{vertical-align:middle;}

In this way, the code will be aligned horizontally.
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