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 8930655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:56:15+00:00 2026-06-15T08:56:15+00:00

In these styles I have three class: .gen-btn , .login_selection_button , and .gen-btn-disabled .

  • 0

In these styles I have three class: .gen-btn, .login_selection_button, and .gen-btn-disabled. I would like that the button with the class .gen-btn-disabled never changes styles based on :active or :hover. I have it set up in my stylesheet as the last style on the page, and it is written in the input’s class-declaration as the last item.

Currently I have gen-btn-disabled set so that it’s normal state, active state, and hover state are the same as the style as gen-btn. That is to say, I would like it always to keep the same styles as gen-btn has in its normal state.

However it seems redundant, and like I should just be able to put it at the top of the sheet, right next to gen-btn, since it is the last style declared on the input (ie: <input type="button" id="login_webview" class="gen-btn login_selection_button gen-btn-disabled" value="&rarr;" />​)

gen-btn-disabled still takes all the styles from active and hover and focus. I don’t understand what I’ve done wrong. Thanks for looking!

http://jsfiddle.net/loren_hibbard/vax98/3/

  • 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-15T08:56:16+00:00Added an answer on June 15, 2026 at 8:56 am

    You’re assuming that lower placement in the stylesheet means higher priority. In CSS, the more specific the selector, the higher priority. There are many other factors that determine priority, but in your case this should work –

    Just use a more specific selector for the disabled class:

    input[type="button"].login_selection_button.gen-btn-disabled{
        /* disabled styles here */
    }
    

    And as Zeta pointed out, applying specific styles generically can lead to unwanted effects. I suppose my observation was more that the padding and font sizes were different and by selectors, the first declaration would take priority no matter where the disabled style was defined.

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

Sidebar

Related Questions

I have a button class that I wrote in CSS. It essentially displays block,
I am not clear on the actual difference between these two styles of class
I have created a VB.NET Class Library that exposes some COM Interop sub routines.
I have a class that generates a text file. It is very simple class
The CSS language pseudo-class to allow us specify different styles for different languages, like
We have three forms which are currently their own page but would work better
I have some mega menu style menus on a site I maintain. These are
I'm trying to style these links: <a class=sub href=#>Email Updates</a> <a class=sub href=#>RSS Updates</a>
What are the best practices if you have a class which accepts some parameters
I'm experiencing an intermittent problem with a class that extends javax.swing.text.DefaultStyledDocument . This document

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.