Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to workaround: IE6 does not support CSS "attribute" selectors

One of the projects which I am working uses CSS "attribute" selector [att]

CSS Selectors

which is not supported by ie6: Support for CSS selectors in IE6 (look for text "Attribute Selectors")

Is there any workaround/hack which is of course valid html/css to overcome this problem?

like image 821
coder_bro Avatar asked Mar 16 '09 05:03

coder_bro


People also ask

How do I override a selector in CSS?

The only way to override inline styles is by using !

What are limitations of CSS selector?

There are several limitations of CSS such as: It cannot provide total control over document display and allows the contents of the page to come through whatever the browser is used. Ascending by selectors is not possible. Limitations of vertical control. No expressions as it is a text-based coding language.

How do I use Cssselector?

Type “css=input[type='submit']” (locator value) in Selenium IDE. Click on the Find Button. The “Sign in” button will be highlighted, verifying the locator value. Attribute: Used to create the CSS Selector.


1 Answers

This isn't possible without peppering your HTML with a stack of extraneous class selectors, sadly.

I'd recommend designing your site so that your entirely valid CSS works for people using modern browsers, and that it's still usable in the IE6, albeit visually not quite right. You just have to find the right balance between getting your site up to standard and bending over backwards for users who won't upgrade. It's a broken browser, treat it as such.

like image 89
nickf Avatar answered Sep 18 '22 12:09

nickf