How to workaround: IE6 does not support CSS “attribute” selectors


Tags: javascript,css,internet-explorer,internet-explorer-6,css-selectors

Problem :

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?



Solution :

Since IE6 is essentially limited to:

  • class selectors
  • ID selectors
  • (space) descendant selectors
  • a:-only pseudo-selectors

your only options are:

  • Use more classes to identify your elements
  • Use JavaScript (strongly not recommended except in highly specialized cases)

I find it very helpful to take advantage of the ability to assign multiple classes to an element by separating them with a space: class="foo bar"


    CSS Howto..

    [SOLVED]How to generate dynamic external link?

    How can menu items be displayed from bottom up using CSS

    How can I change the css of this when I click on anything but this?

    How to include image into css file using JSF tag

    How to target certain text to make bold using css

    SASS: normalize.css works, but does not show up in compiled CSS file?

    Why does the dropdownlist show under the div

    How to highlight selected tab in Web Forms including Master Page

    I have a nav bar that changes the src of an iframe, how can i change the active link color?

    How Do you combine CSS code to an HTML code? I want to Combine them? [closed]

    How do I fix this simple CSS floating issue in IE?

    How to create correct .css for Html.TextBoxFor

    How to get MathJax's HTML output just like Stackedit.io?

    How to accurately position divs with css

    How can i get bootstrap to alter page CSS instead of lay dormant?

    How to Show Menu after full size window in responsive Design

    How to open links in a new tab/window using CSS? [duplicate]

    How do I properly inspect jquery and javascript using web developer tools?

    Panel in Horizontal List item showing behind Button

    android - How to build complex views that stretch?

    css button with arrow… how to move arrow

    how create triangle using css [duplicate]

    How to align vertical text horizontally center?

    How to vertically center text span in fixed position div?

    How do I get an html/css form to post to Gravity Forms?

    how to fix the button so that they don't scroll with contents

    CSS: Double-Border, how to [duplicate]

    How to load an image with css using Django

    How to make inner div of Flexbox height of parent

    How can I apply text attributes to text in a list in CSS