News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Different coloured tabs

Started by petewadey, July 20, 2016, 02:15:30 AM

Previous topic - Next topic

petewadey

Hi,
Would it be possible to change the colour of a chosen tab? For instance, I would like my "Donate" button to stand out from the rest. Or should I be requesting this as a mod?
Thanks,
Pete

Kindred

of course it is... of course, the exact way would probably depend on your theme....

but you would do it using CSS
edit index.css and target the action/button.
e.g. <li id="button_profile">
so...    #button_yourbuttonname {background-color:#23ab23;}
Сл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."

petewadey

Thanks for reply. I'm using Core theme. I looked in the CSS file but can not find <li id="button_profile"> or similar. All  the colors seem to be for block and not specific buttons. Am I looking for the wrong thing, or in the wrong place?
Pete

Illori

you need to add the css that kindred gave you. his first example is the html output, you will not find html in the css file. the second line is the css you need to add.

petewadey

Can I add that anywhere in CSS file, as in at the end?

Illori

the end is the best location to add it.

petewadey

I added    #button_donate {background-color:#f7cb06;}    to the end of the index.css script, clicked preview and the donate button has not changed colour. Am I missing something. Thanks

oOo--STAR--oOo

If you have a link to your website and tell me where the button is, I will tell you what to edit within a few mins!

If you don't want it public, send me a PM
You can't fool a sufficiently talented fool.

http://www.uniquez-home.com
In Design Phase!

Mods I am designing,  No refresh Collapse Categories , Poll Redesign , Pure CSS Breadcrumb , Profile Statuses, Profile Views.

petewadey

http://bsac10c11c12.co.uk/smf/
It's the Donate button I wish to change the colour of.
Thanks

oOo--STAR--oOo

No it wouldn't be the same class or element, I can't get on to the website, it just continuously loads? Something wrong with the server/host?
You can't fool a sufficiently talented fool.

http://www.uniquez-home.com
In Design Phase!

Mods I am designing,  No refresh Collapse Categories , Poll Redesign , Pure CSS Breadcrumb , Profile Statuses, Profile Views.

petewadey

It's working fine for me, even from the link I posted on here?

oOo--STAR--oOo

loaded for me now, also I can't see the donate button so I won't be able to know what needs to be adjusted.
You can't fool a sufficiently talented fool.

http://www.uniquez-home.com
In Design Phase!

Mods I am designing,  No refresh Collapse Categories , Poll Redesign , Pure CSS Breadcrumb , Profile Statuses, Profile Views.

petewadey

It's just under the login window between the help and gallery buttons

oOo--STAR--oOo

Quote from: petewadey on July 21, 2016, 03:38:31 AM
It's just under the login window between the help and gallery buttons

I can't see no donate button, can you make me a temporary account just a member who has access to see the donate button? I'm just nipping out to get my hair chopped lol, so will fix it when I get back :)
Just PM me the details.
You can't fool a sufficiently talented fool.

http://www.uniquez-home.com
In Design Phase!

Mods I am designing,  No refresh Collapse Categories , Poll Redesign , Pure CSS Breadcrumb , Profile Statuses, Profile Views.

Grammy

Quote from: petewadey on July 21, 2016, 02:23:07 AM
I added    #button_donate {background-color:#f7cb06;}    to the end of the index.css script, clicked preview and the donate button has not changed colour. Am I missing something. Thanks


Try #button_paypal instead of #button_donate?   
If that doesn't work, did you add the button manually into your Subs.php file?  You need the title (actual name) of the button; not the description.  For instance, I have a button in my forum that I've made red.  It's called "Extra Goodies" but the button name (title) is "goodies". 

Subs.php
'title' => $txt['goodies']

In my Modification.english.php:

$txt['goodies'] = 'Extra Goodies!';

so my CSS is:

#button_goodies>a {
color: #ff0000; }



Hope that helps.   :)

petewadey

I didn't add the button manually, it was a mode. Paypaldonate or Donate by paypal. I can't find anything in the index CSS matching donate or paypal?

Grammy

Quote from: petewadey on July 21, 2016, 07:41:20 AM
I didn't add the button manually, it was a mode. Paypaldonate or Donate by paypal. I can't find anything in the index CSS matching donate or paypal?


No, you'd have to manually add that code to your CSS.  What mod did you use to add the button to your menu?  (I see more than one listed.)

petewadey

PaypalDonations. I think you could be right that the button is named paypal

I've been summonsed to the shops now. Will have another go later. Thanks for help

Grammy

Yes, if you use THIS MOD, your button name is paypal, not Donations. 

You're using Core, you said, so that has its own index.css.

So in Themes/Core/index.css you would put something like this:

#button_paypal {
color:#f7cb06;}

petewadey

Will try that when I get back and let you know. Cheers

Advertisement: