When the height attribute of Text is defined, the text entered in the Text is not vertically centered. However, you can add CSS to control it and make the entered text vertically centered to make the web page more perfect. Copy code The code is as follows:<html> <head> <style type="text/css"> #text { height:20px; vertical-align:middle; line-height:20px; /*line-height must be equal to height*/ } </style> </head> <body> <table> <input type="text" id="text"> </table> </body> </html> After adding the two attributes of verticla-align and line-height, the text in the text box is vertically centered in the text box. It should be noted that line-height must be equal to height. |
>>: Detailed explanation of JavaScript's built-in Date object
1.html <div class="loginbody"> &l...
This article shares the specific code of canvas t...
Table of contents 1 Install Docker 2 Configuring ...
To draw a table in HTML, use the table tag tr me...
1. Create users and authorize Creating users and ...
1. First, generate the public key and private key...
The previous article introduced several methods f...
I installed MySQL on Windows by unzipping the com...
1. Accessing literals and local variables is the ...
Recently, new projects have used springcloud and ...
Table of contents background Provide / Inject Ext...
1. CSS element hiding <br />In CSS, there ar...
Open the cpanel management backend, under the &qu...
Copy code The code is as follows: a:link { font-s...
Table of contents 1. useState hook 2. useRef hook...