Button Click Color

Hi when I click and hold on my read more button I am still getting the green color and I want make it blue not sure whats going on in the css http://54.172.86.136/

The bootstrap buttons have higher specificity than the rule you are using. You need to increase specificity like this:

.pt-cv-wrapper .pt-cv-content .btn-success:active {etc..}

The original button had this rule:

.btn-success:not(:disabled):not(.disabled).active, .btn-success:not(:disabled):not(.disabled):active, .show>.btn-success.dropdown-toggle

That’s why its not good to change the default buttons as they are very comprehensive. Go with the defaults or create your own new ones.

1 Like

why was I able to do this for hover and it worked?

.pt-cv-wrapper .btn-success:hover{
	background-color:#1467B8;
	color:white !important;
}

Because the specificity for hover was less than that for :active due to the original rules above.

Note you will probably also need to describe rules for border, outline and box shadow also if I remember correctly.

2 Likes

yeah I did

I had previously made changes to this but it is still becoming green at visited https://howto.sonypicturesrunner.com/

Carlos,

Please post a “working page” that demonstrates the current state of the issue and your code.

Also post a clear description of how you wish the code should behave.

Screen shots of code are not acceptable and neither is ignoring our requirement for working code that demonstrates the issue. You can post a link to a CodePen if you prefer as long as all resources can be accessed.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.