Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 870395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T10:28:02+00:00 2026-05-15T10:28:02+00:00

Does !important not works in IE6 ? If we need IE6 compatibility too then

  • 0

Does !important not works in IE6 ? If we need IE6 compatibility too then shouldn’t we use !important?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T10:28:03+00:00Added an answer on May 15, 2026 at 10:28 am

    IE6 supports !important when the rule with !important is the last rule for that property within a selector.

    This sounds a little confusing, but if you declare an !important height, it must be the last declaration for ‘height’ within a given selector.

    As such consider these examples:

    #selector { height: 100px; height: 150px !important; }
    Result: All browsers: 150px;
    
    #selector { height: 100px; height: 150px !important; }
    td#selector { height: 200px; }
    Result: All browsers: 150px;
    
    #selector { height: 100px; height: 150px; }
    td#selector { height: 70px; height: 200px !important; }
    Result: All browsers: 200px;
    
    #selector { height: 100px !important; height: 150px; }
    Result: All modern browsers but ie6: 100px; ie6: 150px;
    
    #selector { height: 100px !important; height: 150px; }
    td#selector { height: 200px; }
    Result: All modern browsers but ie6: 100px; ie6: 200px;
    
    #selector { height: 100px; height: 150px; }
    td#selector { height: 70px !important; height: 200px; }
    Result: All modern browsers but ie6: 70px; ie6: 200px;
    

    What ie6 does is parse the ‘height’ value for each selector as the last ‘height’ declaration present within the selector (other rules may apply but I believe this is your standard case). Then it selects the most specific ‘height’ out of all of these based on !important and selector specificity rules. It effectively ignores the ‘height’ declarations that are not the last within their selector.

    Other browsers instead will take into account ‘!important’ when parsing the ‘height’ value for each selector, before comparing selectors based on !important and specificity rules.

    One “benefit” of this is that every other reasonable browser will use your “important” style, while ie6 will pick the last rule declaration within that selector.

    You would be much better off with an ie6 specific stylesheet though unless there is only a very small number of ie6 tweaks and you want to css comment each one as an ie6 exploit.

    Mental Example

    Imagine picking a CSS rule is a matter of 1) getting all the rules that match the element and 2) deciding which of those rules to use. Pretend the inline style tag is just another selector unless I mention otherwise.

    In every other browser if you want to get the ‘height’ for an element it does this approximately:

    1. For each selector choose the last !important height if there is one, otherwise just the last height.

    2. Pick the most specific selector where the selected ‘height’ is an !important height, otherwise the inline style height, otherwise the most specific selector.

    In ie6 it does this approximately:

    1. For each selector choose the last height.

    2. Pick the most specific selector where the selected ‘height’ is an !important height, otherwise the inline style height, otherwise the most specific selector.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Screenshot Important Note : This application does not support Internet Explorer. I will be
This works: curl --url http://someurl.tld --form apikey=39485730 This does not: curl --url http://someurl.tld --form
I am downright annoyed because the Quartz release I'm importing does not have a
What is type-safe? What does it mean and why is it important?
I have a site where we use a RadWindow as a confirm-popup. Why does
Important note : this question is not about the superiority of a bracing style
This does not work <h:form style=display: inline;> <h:outputLink value=#{title.link} > #{msg['g.readMore']} <f:ajax event=click immediate=true
I made a certain piece of functionality which works perfectly on Chrome, but not
Here is the problem: actionlistener does not want to be fired @ManagedBean(name=hotelsController) @SessionScoped public
I have a WCF service, which works if I use one login, but throws

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.