I got the answer in this link Load Custom CSS After style-l.css For Home Page

it's working only in the home page I needed it to work in each and every page please help me with this

  • Hi Punith, welcome to Magento stackExchange. It seems that, you are asking the same question again which makes this question a duplicate. magento.stackexchange.com/questions/260314/… . You can continue with the original question where you have an answer there. If it still not helping to resolve your issue, then feel free to update that question or ask a new question – Rajeev K Tomy Feb 4 '19 at 6:32

File: app/design/frontend/[Package]/[Theme]/Magento_Theme/layout/default_head_blocks.xml

Css path: app/design/frontend/[Package]/[Theme]/web/css/custome.css

<?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">
           <css src="css/custome.css"/>
           <css src="css/style-l.css"/>
  • If add the custome.css in default_head_blocks.xml it will add the ustome.css after the style-l.css but I need it before style-l.css – Punith Feb 4 '19 at 6:23
  • <css src="css/style-l.css"/> then <css src="css/custome.css"/> – HIren Kadivar Feb 4 '19 at 6:25
  • i update my answer check it – HIren Kadivar Feb 4 '19 at 6:26
  • @Punith please check my answer is working fine then accpet. – HIren Kadivar Feb 11 '19 at 10:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.