Custom.css file Topic is solved

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.
Post Reply
Gaylenew7
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Fri May 07, 2021 12:55 pm

Custom.css file

Post by Gaylenew7 » Fri Jun 18, 2021 1:33 am

I am running Joomla 3.9.27 and working off a web server. I have created a custom.css file in the template/css folder. The file worked the first time I entered css code but when I tried to update that same css (ie. float: left to float: right) it does not update my joomla website. The server css file is updated as well as the template css file but the website does not change? I tried a different website and got the same results. I also loaded a new Joomla installation and it would not update. Has anyone else ever run into this problem?
Last edited by imanickam on Fri Jun 18, 2021 3:40 am, edited 1 time in total.
Reason: Moved topic » from General Questions/New to Joomla! 3.x to Templates for Joomla! 3.x

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 13655
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Custom.css file

Post by toivo » Fri Jun 18, 2021 2:50 am

Which template does the website use? For example Protostar requires the custom CSS to be added to user.css in the CSS folder of Protostar.

Ref. Adding a custom CSS with Protostar
Toivo Talikka, Global Moderator

Gaylenew7
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Fri May 07, 2021 12:55 pm

Re: Custom.css file

Post by Gaylenew7 » Fri Jun 18, 2021 3:23 am

I am using the OSTraining Breeze template. In the index.php file it has the code to look for the custom.css file:if( file_exists('templates/'.$this->template.'/css/custom.css')){
$doc->addStyleSheet('templates/'.$this->template.'/css/custom.css');
}
I have placed the custom.css file in the css directory in the templates directory of the template and placed the following code into it:

.tag-category img {
float: right;
margin-right: 15px;
-moz-box-shadow: 10px 10px 5px #888;
-webkit-box-shadow: 10px 10px 5px #888;
box-shadow: 10px 10px 10px 5px #888;
border-radius: 10px;
}

That worked and it made the changes to my website.

Then I went back and changed float: right to float: left.

The update was placed in the custom.css file on the server - but the website never reflected the change. Ever since then I cannot make changes to the custom.css file that affect the website. You can see it changed the file on the server but not the actual website.

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 13655
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Custom.css file

Post by toivo » Fri Jun 18, 2021 4:16 am

The Breeze template appears to be based on Protostar and therefore I would expect it to use user.css, rather than custom.css.

Ref. Breeze for Joomla
Toivo Talikka, Global Moderator

Gaylenew7
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Fri May 07, 2021 12:55 pm

Re: Custom.css file

Post by Gaylenew7 » Fri Jun 18, 2021 9:58 pm

This problem was an issue with having to clear the caches in Safari.


Post Reply

Return to “Templates for Joomla! 3.x”