When I enclose my checkbox in a css class, it becomes automatically checked. How can I stop this?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>website</title>
<style type="text/css">
.checkbox0 {
position:fixed;
margin-left:137px;
margin-top:119px;
font-family:Segoe UI;
font-size:9px;
font-weight:normal;
}
</style>
</head>
<body>
<div class="checkbox0"><input type="checkbox" />s</input></div>
</body>
</html>
If we remove the <div class="checkbox0"> and the </div> we will see that it works normally however when it is with the css, it will auto check.
I have a sneaking feeling it’s not your code but your browser cache. 😉 Try deleting your browser cache and see if it fixes it.