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

Vue Basics Listener Detailed Explanation

Table of contents What is a listener in vue Usage...

5 Tips for Protecting Your MySQL Data Warehouse

Aggregating data from various sources allows the ...

React realizes the whole process of page watermark effect

Table of contents Preface 1. Usage examples 2. Im...

Zen coding for editplus example code description

For example, he enters: XML/HTML Code div#page>...

Vue parent component calls child component function implementation

Vue parent component calls the function of the ch...

Detailed explanation of linux crm deployment code

Linux basic configuration Compile and install pyt...

HTML web page hyperlink tag

HTML web page hyperlink tag learning tutorial lin...

How to build and deploy Node project with Docker

Table of contents What is Docker Client-side Dock...

How to Find the Execution Time of a Command or Process in Linux

On Unix-like systems, you may know when a command...

Detailed explanation of Angular data binding and its implementation

Table of contents Preface What is data binding? T...

CSS3 achieves cool 3D rotation perspective effect

CSS3 achieves cool 3D rotation perspective 3D ani...

How to use Nexus to add jar packages to private servers

Why do we need to build a nexus private server? T...