Custom.css Load Order - Question | JoomShaper
Black Friday sale is live with flat 50% OFF. Sale ends soon! Grab your deal now!

Custom.css Load Order

S

SPD

SP Page Builder 3 years ago

Hi, I had want to change the colors on the button classes so wanted to add that to my custom.css file but when it did work I use Inspect and can see that it is being loaded before a few sp page builder .css files.

https://drive.google.com/file/d/171ObPS7bBP7XpjjfNwQxki7cFeblyPv1/view?usp=sharing

Just wanted to see if that is expected behaviour as i would have thought that custom.css would be loaded last. Cheers.. I am still using SP PB 3 btw

0
4 Answers
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 3 years ago #80533

Hi SPD,

custom.css file order is fully OK, why becuase that file is from template and it's loaded as the last css file from template. And this is natural order. If you want to load your custom CSS below all the components styles - it request extra but easy step.

  1. Rename custom.css file into override.css
  2. Inside Template Options > Custom Code > Before end of < head >

add below line

<link href="/templates/shaper_helixultimate/css/override.css" rel="stylesheet" />

Then that file will be loaded after all styles from template, and components etc.

That's all. Yes, you can still edit that file from Joomla Template Editor.

0
Mehtaz Afsana Borsha
Mehtaz Afsana Borsha
Accepted Answer
Support Agent 3 years ago #80474

Hi

Thanks for contacting us. Could you please give me your site URL and also screenshot of your issue?

-Regards.

0
S
SPD
Accepted Answer
3 years ago #80532

Sorry I assume the position of the custom.css in the shot I provides was enough. I am new to CSS but doesn't the order listed have an effect on on 'which definition wins'

If the above is true (.CSS load order is important) and the list is in the expected order then I guess there are some classes which can be overriden via custom.css. If you do need a screenshot of the unchanged then I will have to get back with you because I have changed stuff back for now Thank you

0
S
SPD
Accepted Answer
3 years ago #80534

Once again, just what I was looking for. Thanks again Paul!

0