input control please enlighten me! _html/css_WEB-ITnose
How can I center the text in the input control vertically? I have tried a lot of attributes but it doesn’t work. It is also possible to stick to the bottom border if it cannot be centered. Please come up with a solution! ! Thank you
Reply to the discussion (solution)
1: Stick to the lower border
Adjust font-size: 14px; or line-height: 20px, etc.
2: Try centering the text vertically. To achieve this, you may need multiple attributes together
style="text-align:center; vertical-align:middle;line -height:20px;height:20px;"
3: Reference
input ::-moz-focus-inner{ border: 0;padding: 0;}/*For Firefox*/
.comment_btn{
height:26px;
line-height:22px;/*For IE */
width:68px;
}
<div class="search" style="font-size: 12px;text-align: center;height:30px"><input type="text" name="q" class="searcht" style="background-image: url('images/4.jpg');font-size: 18px;vertical-align:middle;"/><input type="submit" class="searchb" style='vertical-align:middle;' value="搜索"/><i style='vertical-align:middle;display:inline-block;height:100%;width:0;overflow:hidden'></i></div>
input setting padding
set css height line- If the two heights are consistent, they will be vertically centered

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Preparation Use vuecreateexample to create a project. The parameters are roughly as follows: use native input. Native input is mainly value and change. The data needs to be synchronized when changing. App.tsx is as follows: import{ref}from'vue';exportdefault{setup(){//username is the data constusername=ref('Zhang San');//When the input box changes, synchronize the data constonInput=;return( )=>({

How to implement the laravel input hidden field: 1. Find and open the Blade template file; 2. Use the method_field method in the Blade template to create a hidden field. The creation syntax is "{{ method_field('DELETE') }}".

Solutions for clicking the input box without a cursor: 1. Confirm the focus of the input box; 2. Clear the browser cache; 3. Update the browser; 4. Use JavaScript; 5. Check the hardware device; 6. Check the input box properties; 7. Debug JavaScript code; 8. Check other elements of the page; 9. Consider browser compatibility.

With the popularity of web applications, rich text editors have become an indispensable tool in web development. When using Go language for web development, we also need to choose a suitable rich text editor control to enrich our websites and applications. In this article, we will discuss common rich text editor controls in Go language web development. FroalaEditorFroalaEditor is a popular rich text editor control that is widely used in web development. it has modernity

Vue.js is a lightweight JavaScript framework that is easy to use, efficient and flexible. It is one of the most popular front-end frameworks currently. In Vue.js, input box binding events are a very common requirement. This article will introduce the input box binding events in the Vue document in detail. 1. Basic concepts In Vue.js, the input box binding event refers to binding the value of the input box to the data object of the Vue instance, thereby achieving two-way binding of input and response. In Vue.j

Vue is a popular JavaScript front-end framework with a responsive data binding and component system at its core. In Vue applications, the input box is one of the most commonly used UI elements. When the user enters text, we hope to listen for the carriage return event and validate the input before submitting. This article will introduce the input box enter event and verification function usage in the Vue document. 1. The carriage return event of the input box in Vue. Monitoring the carriage return event of the input box in Vue is very simple.

Speaking of windows system, I believe many people are familiar with it. Many of us are now using windows system, and windows contains multiple system versions, including win7 and win8.1. Some netizens don’t know whether to choose win7 or 8.1 system. Which one is better, win7 or 8.1? The master will tell you the differences and choices between win7 and win8.1. Windows8.1 has a gorgeous interface. But the improvements are greater, and the shortcomings are also greater. The more obvious ones include blurred game fonts and insufficient memory bugs. No matter how large the memory is, when running some games, it will prompt that the memory is insufficient and needs to be closed. In fact, during the inspection, the memory was normal. One is that there is a problem with the memory management mechanism, and the other is that

When we use the excel office software, if we can use some controls skillfully, it can help us create more professional effects in the excel form. For example, adding selection controls can make the form filler easily complete the form. Below, we will demonstrate how to make an excel selection control. We hope it will be helpful to you! 1. First, we create and open a blank excel table. 2. Add the "Development Tools" tab, click the file button on the upper left side, and find "Excel Options". After that, we find the development tools in the options of the custom ribbon and check it so that a check mark appears in front of it. 3. Return to the Excel work interface and you can see the "Development Tools" tab. Generally speaking, it is not
