Using CSS to change the color of an app bar button ?

Started by aegersz, August 16, 2016, 05:40:39 PM

Previous topic - Next topic

aegersz

Hi guys, you have shown me how to make a button bold but can i change it's color, too ?

if so, what do i need to add to CSS ?
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

d3vcho

"Greeting Death as an old friend, they departed this life as equals"

aegersz

like Help and even some custom ones, if possible.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Antes

You can target those buttons with #button_help #button_moderate #button_profile (Inspect the element with dev tools).

aegersz

Thanks, i will do that but how to I tell css to change their colors, please ?
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

aegersz

The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

aegersz

one more thing, when i try it, the background coloring exceeds the length of the button name by one space and looks odd.

what is going wrong for me, please ?
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

aegersz

go to http://forum.drugs-and-users.org/ and see the Logout button (just a test style change for now)

login in with "regular-users", pw "forum"

#button_logout
{
        font-weight: bold;
        background-color: pink;
        color: blue;
}
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Antes

This should work for you

#button_logout > a, #button_logout > a > span {
font-weight: bold;
background: pink;
color: blue;
border-radius: 5px;
}

aegersz

Thank you, it does ! It's a bit cryptic to me but it works like a charm.

The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Antes

Quote from: aegersz on August 22, 2016, 07:47:09 PM
Thank you, it does ! It's a bit cryptic to me but it works like a charm.



That's because SMF 2.0's theme is not CSS based. It requires block images to shape bars/menu etc...

aegersz

all this is still so new to me but with your fantastic help, i am getting it to look more pretty.

i can't thank you enough.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

aegersz

i just re-opened this, i hope you don't mind ...

i also have some custom buttons setup by the "Ultimate Menu" mod and when i check the page source, the button names seem to be long strings of numbers and characters.

Can i use CSS to effect changes to these and if so, how do i locate their proper button names ?
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

d3vcho

Yes, checking the source of the page we can see that the elements have long names maybe to avoid confussion with other elements. The process to make CSS changes is the same as in the previous examples, but in this case you should replace with the button name.

Regards :)
"Greeting Death as an old friend, they departed this life as equals"

aegersz

#16
that sounds logical and it works fine now.

Thanks, solved again !
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Advertisement: