Solution to horizontal alignment of input labels and image buttons

Source: Internet
Author: User

In daily webpage creation, we may encounter the same line of input tag and image. At this time, you will find that, no matter how you write css, the input text box and the image link cannot be in the same horizontal line. Yesterday, friends of the fire editor came to consult and said that he also encountered this problem, and the use of Css syntax such as margin and padding was not solved.

The solution is actually very simple. We just need to addVertical-align: middleAttribute.

Let's look at the instance:

<Input name = "bkjia" type = "text" size = "28" value = "" style = "vertical-align: middle "/>  <br/> <center> if not, press Ctrl + F5 to refresh the page. For more webpage code: <a href = 'HTTP: // www.bkjia.com/'target = '_ blank'> http://www.bkjia.com/</a> </center>

Tip: the code can be modified before running!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.