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

  • Home
  • SEARCH
  • 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 8991317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:41:48+00:00 2026-06-15T22:41:48+00:00

Problem: An existing resource dependency (which I’m not permitted to alter or remove from

  • 0

Problem: An existing resource dependency (which I’m not permitted to alter or remove from the build) which contains a stylesheet that dictates an unwanted button style. I want to somehow overcome the influence that this stylesheet has on the button style in my page.

Question: Using my own local stylesheet, how can I revert to the default Windows css button style (background, shape, text)? -I dont know what the css attributes should be, etc. (I assume I would have to use the “!important” phrase, etc.)

  • 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-06-15T22:41:49+00:00Added an answer on June 15, 2026 at 10:41 pm

    You won’t, and shouldn’t, use !important. You just need to properly override following the principles of CSS specificity and inheritance.

    Explanation of CSS Inheritance

    For example–let’s say your ‘unwanted’ button style is something like this:

    <input type="button" class="unwanted" />
    

    And you’ve got CSS in your (uneditable) style sheet:

    .unwanted {
    fooRule: whatever;
    barRule: whatever;
    }
    

    Using inheritance, you just need to write your own external stylesheet. Things to remember:

    (1) You should put it below the existing that contains the ‘unwanted’ stylesheet reference. Inheritance processes external stylesheets sequentially. This follows the ‘closest rule wins’ principle.
    (2) The way you write the CSS rule must be MORE specific than the rule that currently applies the unwanted style. Again, the above link really helps explain this.

    Going back to our previous example, the unwanted style is being applied simply by a class of ‘unwanted’. Your rule can override without editing the HTML. Alternately you can edit the HTML–it’s up to you. It also depends on how globally you want to affect button styles.

    If you want to globally affect all buttons with ‘unwanted’ class, you would do:

    input[type='button'] .unwanted {
    fooRule:override;
    }
    

    If you only want to change SOME of the buttons that have a style of unwanted, you would instead do:

    .unwanted.newRule {
    fooRule:override;
    }
    

    And then you would mod your HTML to be:

    <input type="button" class="unwanted newRule">
    

    Note that .unwanted.newRule means it will only impact ‘elements’ with a class of both unwanted and newRule. It would not change anything if the unwanted style is set up like this:

    <form class="unwanted">
        <input type="button" class="newRule" />
    </form>
    

    The reason being .unwanted.newRule means ‘both classes are on the same element’. You would change it to :

    .unwanted .newRule {foo}
    

    So–my point is, there are a ton of semantically correct ways to CORRECTLY utilize CSS specificity and inheritance, and do what you want to do, without having to use !important.

    On a side note, the only reason you’d have to use !important is if the css styling the button is actually being applied using javascript that writes ‘style’ attributes to the HTML element. If that is the case, (1) don’t use that JS, as that is a horrible method for styling using JS, (2) you will have to use !important to override the inline style being applied by the JS. Again, this is because of how cascading works–in this case, CSS is applied by (1) browser (user agent), (2) external css, (3) internal ‘head’ css, (4) internal inline css, (5) author !important declarations, (6) user !important declarations.

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

Sidebar

Related Questions

Real problem with an existing webapp which has been working for the last couple
I have a weird problem with routing. I have an existing website that I
Is it preferable to store redundant information, (which can be otherwise generated from existing
I'm re-designing a Web site and I have a problem with the existing data
I'm having a problem in mapping an existing data class member to the database..
Have a problem with updating an existing record of my DB. In my view
I have problem to add jQuery to some existing code, please help. We have
I have a problem adding ADO.Net Entity Data Model to my existing project, or
although I searched through existing threads for my problem I havent found a solution
having a problem with a new ASP NET app and ASPNETDB Installed on existing

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.