Change the background color of a button on a Twitter feed tray using CSS

I use the following pagination button styles provided by Twitter Bootstrap:

<ul class="pager"> <li class="previous"><a href="#">&larr; Older</a></li> <li class="next"><a href="#">Newer &rarr;</a></li> </ul> 

Here's what they look like now:

enter image description here

How do I change the CSS style to change the background color of these buttons from green to some other color?

I tried this CSS code but it did not change the button styles:

 .next { background-color: #ecf0f1; color: #2d525d; } 

Thanks!

+4
source share
3 answers

You need to rewrite the css codes:

 .next a { background-color: #ecf0f1 !important; color: #2d525d !important; } 

Edit: Color and background styles for element "a" inside li.

+5
source

You can also add! important for your custom css

 .next { background-color: #ecf0f1 !important; color: #2d525d; } 
+1
source

Use

 !important 

after css, but earlier;

This pretty much means ignoring everything else and using IT! important

you will need to use this to break out of the default style in some frameworks, and is also useful for media queries.

+1
source

Source: https://habr.com/ru/post/1501153/


All Articles