Hi, I know that this is old, but I was wondering, why put the class in the ul as opposed to putting it in the input as so:
ul input.classname { foo: bar; bar: foo; } Cheers, Piluso. Christian Kirchhoff a écrit : > The html code defining a checkbox should be similar to '<input > type="checkbox" ...>' > >> Thus the tag name itself is input, and not checkbox. So a css selector >> for checkbox won't influence the checkbox. Input elements have an >> attribute named "type" which can have different values like "text", >> "radio", "checkbox", "image". >> >> CSS 2.1 allows for attribute selectors: >> http://www.w3.org/TR/CSS21/selector.html#attribute-selectors >> >> So >> >> input[type="checkbox"] { >> margin-right:40px; >> padding-right:40px; >> } >> >> might work for browsers supporting CSS 2.1. >> >> Regards, >> >> Christian Kirchhoff >> *Directmedia Publishing GmbH* · Möckernstraße 68 · 10965 Berlin >> www.digitale-bibliothek.de >> AG Berlin-Charlottenburg · HR B 58002 · USt.Id. DE173211737 >> Geschäftsführer: Ralf Szymanski · Erwin Jurschitza >> >> >> Daniel Kessler schrieb: >> >>> I'm trying to set it up so that all checkboxes on my site have a >>> margin or padding to the right. In my main css, I thought I could >>> address the element and tried: >>> checkbox {margin-right:40px; padding-right:40px;} >>> >>> It didn't work. If I made it into a class, it then worked but I >>> would have to insert it into each checkbox rather than doing one >>> sitewide setup. >>> >>> So how would I get that to work? And if not, do I actually have to >>> put a class on every single checkbox? I currently have it in a ul/li >>> but I removed it from there and still couldn't get it to work. >>> >>> thank you. >>> >>> >>> > ______________________________________________________________________ > css-discuss [EMAIL PROTECTED] > http://www.css-discuss.org/mailman/listinfo/css-d > List wiki/FAQ -- http://css-discuss.incutio.com/ > List policies -- http://css-discuss.org/policies.html > Supported by evolt.org -- http://www.evolt.org/help_support_evolt/ > > ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/