I added the external bootstap in my custom theme I want to be it before style-l.css I referred Load Custom CSS After style-l.css For Home Page but it's only working from home page, not for other, please help me with this
The thread you have mentioned in your question is doing just opposite of your requirement; i.e, it loads a static asset file after
If you want to load your CSS file before those two CSS files and in every page. You need to put your code in
default.xml under your theme.
<?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <head> <css src="Magento_Theme::css/bootstrap.css" /> </head> </page>
Now insert your bootstrap CSS file at the location