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
Table of contents 1. Through HBuilderX visual int...
Copy code The code is as follows: <html xmlns=...
Table of contents 1. Use the withRouter component...
MySQL is a relational database management system ...
RDF and OWL are two important semantic web techno...
1. Location regular expression Let's take a l...
Table of contents 1. Concept 2. Environmental Des...
When newbies develop div+css, they need to name t...
Therefore, we made a selection of 30 combinations ...
<!--[if IE 6]> Only IE6 can recognize <![...
Introduction MySQL provides an EXPLAIN command th...
Preface This article mainly summarizes some of th...
Preface Let me explain here first. Many people on...
Summary of common operators and operators in java...
Table of contents DOM node Element node: Text nod...