Advertisement

Change color in css Topic is solved

Everything to do with Joomla! 4.x templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
User avatar
ribo
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3510
Joined: Sun Jan 03, 2010 8:47 pm
Contact:

Change color in css

Post by ribo » Thu Sep 05, 2024 3:14 pm

Hello, i have a joomla site in https://www.horizonsuitesmilos.gr/ and in header and right position i have a button called "availability". When i hit in this button the button stays with black backround and black letters. How can i change that as i dont find the css code to change it?
chat room spontes : http://www.spontes.com

Advertisement
User avatar
AMurray
Joomla! Master
Joomla! Master
Posts: 10209
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Change color in css

Post by AMurray » Thu Sep 05, 2024 9:57 pm

The button is assigned the 'btn' (bootstrap) class name.

The CSS it seems to be using is this code below which has background colour #000 (black) and font colour #fff (white).

Code: Select all

button, .button, input[type="submit"], input[type="button"], .pagenav-prev a, .pagenav-next a, #gkMainbody .readmore > a, .readon, .btn, .btn-border {
    -webkit-appearance: none;
    background: #000;
    border: none;
    border-radius: 3px;
    color: #fff;
    cursor: pointer;
    display: inline-block;
    font-size: 13px;
    font-weight: 400;
    height: auto;
    letter-spacing: 2px;
    line-height: 25px;
    margin: 0 5px 2px 2px;
    padding: 8px 24px;
    text-align: center;
    text-transform: uppercase;
    -webkit-transition: all .3s ease-out;
    -moz-transition: all .3s ease-out;
    -o-transition: all .3s ease-out;
    transition: all .3s ease-out;
    -ms-transition: all .3s ease-out;
}
It looks like the file is in /templates/gk_hotel/css/template.css

You would override this code in your templates custom css file - whether that be user.css, custom.css or any variation on that file name. (Check the Gavick documentation to be sure).

You could define your custom CSS class for the button and place it in the custom CSS file. which would override the original styling.
Regards - A Murray
General Support Moderator

User avatar
ribo
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3510
Joined: Sun Jan 03, 2010 8:47 pm
Contact:

Re: Change color in css

Post by ribo » Fri Sep 06, 2024 4:47 pm

Yes ok but my issue is when the button is active. And there the backround and the font are black. This is that i am not find.
chat room spontes : http://www.spontes.com

Mr. Wimpy
Joomla! Guru
Joomla! Guru
Posts: 554
Joined: Fri Dec 02, 2005 10:46 am
Location: The Netherlands

Re: Change color in css

Post by Mr. Wimpy » Sun Sep 08, 2024 7:31 am

It's an <a> (link) inside a <button>.
And this css makes the linktext black: a:active { color: #000; }

What is it? A button? A link? Or a link that looks like a button?
Are you planning to display a form?

If it's a link that looks like a button, change

Code: Select all

<button class="btn" type="submit"><a href="https://horizonsuitesmilos.reserve-online.net" target="_blank">Availability</a></button>
to

Code: Select all

<a class="btn" href="https://horizonsuitesmilos.reserve-online.net" target="_blank">Availability</a>
* Remove the <button> tags
** Add class="btn" to <a>

User avatar
ribo
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3510
Joined: Sun Jan 03, 2010 8:47 pm
Contact:

Re: Change color in css

Post by ribo » Mon Sep 09, 2024 2:47 pm

Mr. Wimpy wrote: Sun Sep 08, 2024 7:31 am It's an <a> (link) inside a <button>.
And this css makes the linktext black: a:active { color: #000; }

What is it? A button? A link? Or a link that looks like a button?
Are you planning to display a form?

If it's a link that looks like a button, change

Code: Select all

<button class="btn" type="submit"><a href="https://horizonsuitesmilos.reserve-online.net" target="_blank">Availability</a></button>
to

Code: Select all

<a class="btn" href="https://horizonsuitesmilos.reserve-online.net" target="_blank">Availability</a>
* Remove the <button> tags
** Add class="btn" to <a>
Thank you. That solved my issue!
chat room spontes : http://www.spontes.com

Advertisement

Post Reply

Return to “Templates for Joomla! 4.x”