I'm trying to get labels by the checkboxs and cant seem to get it to work.. this is what I have
Code html4strict:<fieldset><legend>Property Type</legend> <div class="span-3"><div class="checkboxpad"><input type="checkbox" value="Residential" id="buyresidential" name="Type[]"><label for="buyresidential">Residential</label></div></div> <div class="span-3"><div class="checkboxpad"><input type="checkbox" value="Commercial" id="buycommercial" name="Type[]"><label for="buycommercial">Commercial</label></div></div> <div class="span-3"><div class="checkboxpad"><input type="checkbox" value="Land" id="buyland" name="Type[]"><label for="buyland">Land</label></div></div> <div class="span-3 last"><div class="checkboxpad"><input type="checkbox" value="Investment" id="buyinvestment" name="Type[]"><label for="buyinvestment">Investment</label></div></div> </fieldset>
and the css
Code css:input[type="checkbox"]{ top:0; } .checkboxpad{ background:#641318; padding:5px; border-radius: 2px; -moz-border-radius: 2px; -webkit-border-radius: 2px; } .checkboxpad label{ color:#fff; margin-bottom:0; }
Would this be the proper way to use labels in XHTML 1.0 Strict?








thanks!

Bookmarks