[thelist] Getting "checked" attribute selector to work in IE7.

Jon Hughes hughesj at firemtn.com
Wed Nov 21 10:02:08 CST 2007


Howdy List,

The problem I have is with IE7 and attribute selectors.

(For those that do not know what an attribute selector is, it looks
something like this:
Input[type="text"] {
/*styles effecting all <input type="text" /> */
}
)


I can get that sort of thing to work fine in IE7.

The problem is, I can't get it to pick up on the "checked=checked" of
the select box.

Full HTML page to test:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
[checked="checked"] { display:none }
</style>
</head>
<body>
<input type="checkbox" checked="checked" />
</body>
</html>


--

It works fine in FF, just not IE7... any ideas?

Thank You,
- Jon Hughes 



More information about the thelist mailing list