Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the Vertical Center of form elements in web

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

Editor to share with you how to solve the vertical center of form elements in web, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

The code is as follows:

The form element is perfectly centered vertically

* {padding:0; margin:0;}

Body {font:14px/1.231 Tahoma, Geneva, sans-serif; background-color:#D1D5E7;}

Label {cursor:pointer; vertical-align:middle;}

Input {vertical-align:middle; margin:5px;}

.warp {margin:100px 350px;}

Span {vertical-align:middle; text-decoration:underline;}

Img {vertical-align:middle; border:1px solid # CCF;_margin-bottom:1px;}

P {font-size:14px;}

H3 {font-size:16px;}

The area of checkboxes and check boxes is very small and not easy to click, causing trouble for many users and poor user experience.

Look at the perfect solution:

Perfect vertical center, click the text optional, shortcut keys optional, the mouse displays the hand shape on the text (hint can be clicked)

X x I am the perfect check box

I support keyboard Alt+2 selection (2)

X x I am the perfect checkbox

X x I am the perfect text box

The picture can also be centered.

The above is all the content of the article "how to solve the vertical center of form elements in web". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report