Home > Article > Web Front-end > Form checkbox and radio text alignment code display
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>
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!