Code for aligning form checkbox and radio text

Code for aligning form checkbox and radio text
Alignment issues like type="radio" and type="checkbox", tested browser: ie7+/firefox8.0
Principle: Set the first font in font-family to Verdana font. The test code is as follows:

Copy code
The 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>Method for perfect vertical center alignment of form element input and text-123WORDPRESS.COMwebjx.com</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>Contract for the Beneficiary</label></li>
<li><input type="checkbox" /><label>Contract for beneficiary</label></li>
<li><input type="radio" /><label>Microsoft</label></li>
<li><input type="checkbox" /><label>Microsoft</label></li>
</ul>
</body>
</html>

<<:  CSS scroll bar style modification code

>>:  Refs and Ref Details in Vue3

Recommend

Two ways to achieve horizontal arrangement of ul and li using CSS

Because li is a block-level element and occupies ...

Share 8 very useful CSS development tools

CSS3 Patterns Gallery This CSS3 pattern library s...

How to use CSS to center a box horizontally and vertically (8 methods)

Original code: center.html : <!DOCTYPE html>...

Steps for Vue3 to use mitt for component communication

Table of contents 1. Installation 2. Import into ...

Example of nginx ip blacklist dynamic ban

When a website is maliciously requested, blacklis...

How to install and configure the supervisor daemon under centos7

Newbie, record it yourself 1. Install supervisor....

CSS to achieve scrolling image bar example code

On some websites, you can often see some pictures...

How to start a Vue.js project

Table of contents 1. Node.js and Vue 2. Run the f...

Some notes on modifying the innodb_data_file_path parameter of MySQL

Preface innodb_data_file_path is used to specify ...

Docker exposes port 2375, causing server attacks and solutions

I believe that students who have learned about th...