Closed
Bug 345449
Opened 20 years ago
Closed 20 years ago
CSS :focus doesn't work for <input type=checkbox or radio>
Categories
(Core :: DOM: CSS Object Model, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 150176
People
(Reporter: timwi, Unassigned)
Details
(Keywords: testcase)
Attachments
(1 file)
|
994 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4
Consider the following CSS code:
form input:focus {
border: 2px solid red !important;
}
This works for buttons and textboxes (input type=submit, type=text, type=password) but not for radio buttons (type=radio) or checkboxes (type=checkbox).
Reproducible: Always
Actual Results:
CSS declaration is ignored.
Expected Results:
At least 'border', 'margin' and 'padding' delarations should be respected, although 'background-color' would be nice to have too.
Comment 1•20 years ago
|
||
This is a testcase showing the non-functioning radio button, checkbox and the correctly functioning textbox.
Updated•20 years ago
|
Updated•20 years ago
|
OS: Windows 2000 → All
Summary: :focus doesn't work for <input type=checkbox or radio> → CSS :focus doesn't work for <input type=checkbox or radio>
Comment 2•20 years ago
|
||
This has nothing to do with :focus per se. It doesn't work with this either:
input {
border: 2px solid blue !important;
}
You can verify that :focus is in fact working with this rule:
form input:focus {
outline: 2px solid red;
}
*** This bug has been marked as a duplicate of 150176 ***
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•