Home > Web Front-end > HTML Tutorial > Form checkbox and radio text alignment code display

Form checkbox and radio text alignment code display

伊谢尔伦
Release: 2017-06-16 11:06:56
Original
2022 people have browsed it
Webpage production cnn6 article introduction: Form element input, text perfect vertical center alignment method.

Alignment issues like type="radio" and type="checkbox", test browser: ie7+/firefox8.0

Principle: Set the first font in font-family Verdana font

The test code is as follows:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>表单元素input、文字完美垂直居中对齐方法-技术之家cnn6.net??</title>
<style type="text/css">
body {font:12px/24px verdana;}
ul {list-style:none;}
input,label { vertical-align:middle;}
</style>
</head>
<body>
<ul>
<li><input type="radio" /><label>为受益人的合同</label></li>
<li><input type="checkbox" /><label>为受益人的合同</label></li>
<li><input type="radio" /><label>Microsoft</label></li>
<li><input type="checkbox" /><label>Microsoft</label></li>
</ul>
</body>
</html>
Copy after login

The above is the detailed content of Form checkbox and radio text alignment code display. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template