Use vertical-align to align input and img

Use vertical-align to align input and img
Putting input and img on the same line, the img tag is always one head higher than the input, which is very ugly. I have tried many methods before, but none of them worked. Later, the most common solution I found on the website was to add an align="absmiddle" attribute to img. This method does seem to be feasible, but it does not comply with HTML standards. Later I accidentally discovered that adding vertical-align:middle to both input and img would work:


Copy code
The code is as follows:

input,img{vertical-align:middle;}

This way the code will be aligned horizontally.

<<:  Implementation steps for installing FTP server in Ubuntu 14.04

>>:  Page Refactoring Skills - Content

Recommend

Installation process of zabbix-agent on Kylin V10

1. Download the installation package Download add...

Ant Design Blazor component library's routing reuse multi-tab function

Recently, there has been a growing demand for imp...

CSS3 click button circular progress tick effect implementation code

Table of contents 8. CSS3 click button circular p...

Flex layout allows subitems to maintain their own height

When using Flex layout, you will find that when a...

Analysis of permissions required to run docker

Running Docker requires root privileges. To solve...

Specific implementation methods of MySQL table sharding and partitioning

Vertical table Vertical table splitting means spl...

MySql COALESCE function usage code example

COALESCE is a function that refers to each parame...

How to install iso file in Linux system

How to install iso files under Linux system? Inst...

jQuery uses the canvas tag to draw the verification code

The <canvas> element is designed for client...

How to use Vue to develop public account web pages

Table of contents Project Background start Create...

Mysql join table and id auto-increment example analysis

How to write join If you use left join, is the ta...

JavaScript removes unnecessary properties of an object

Table of contents Example Method 1: delete Method...