Cant override font color in protostarplus template

Everything to do with Joomla! 3.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.
Locked
bskerr2
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Sat Oct 13, 2007 8:50 am

Cant override font color in protostarplus template

Post by bskerr2 » Fri Feb 02, 2018 11:46 pm

ProtostarPlus template, Joomla 3.8.3, PHP 7,

My background on my site (https://topasianbeauty.com) is black, the titles etc are a little difficult to see so I want the font color to be white. using chrome inspect I track it down to color: #333 in template.css:217 When I change color #333 to color: #fff in the chrome inspect browser all the fonts change to white, such as header titles etc. When I refresh it's gone as expected.

Every thing I tried below I deleted the cache each time.

So I tried changing it in tempalte.css line 217 body/color: #333 to color: #fff but the change didn't work, its like something is overriding it, so I changed it back to #333

I created a custom.css file in my css folder and added body { color: #fff; } but that didn't work so deleted that custom.css file.

I tried creating a custom.less file in the less folder, compiling it with the back-end build in Joomla compiler button feature which created the custom.css file but still it didn't work

Questions
1. Why doesn't the override work?
2. Should we now only use custom.less for overrides and is this the new way of doing it, including moving forward to Joomla 4.0?
3. I have seen people say custom.css or user.css what's the difference?

User avatar
Prowebdesign
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 197
Joined: Sun Oct 04, 2009 10:37 am
Contact:

Re: Cant override font color in protostarplus template

Post by Prowebdesign » Fri Feb 16, 2018 2:15 pm

Hi,

If you are trying to iverride the CSS and it doesn't work. You have the last option to use "!important" attribute in the end of the definition e.g.

Code: Select all

html{
	color: white !important;
}
This will override any other priorities unless.

Also why custom.css didn't work could be because of the fact that your custom.css file was loaded before the theme CSS file and therefore the later one changed and got the priority over your custom.css.


Locked

Return to “Templates for Joomla! 3.x”