0

I have added a css through this way

app/design/frontend/theme/magento_theme/layout "default_head_block.xml"

In this <css src="css/own.css"/> i run the command setup:static-content:deploy after that the css is working after that i have added more css into the file but it is not working.

I have deleted the generated folder by run rm -rf * deleted the pub/static/frontend but at the end my new css is not working.

And i am not understanding why is that so .

  • inspect element browser on your page, open your edited css file in separated tab and try to refresh to check is your css file already updated or not – mrfizh Oct 10 '18 at 18:32
  • i have inspected it but nothing changed . – Flutterer Oct 11 '18 at 9:31
0

Don't put your css file in "default_head_block.xml".

you can put your css in app\design\frontend\theme\themename\Magento_Theme\layout\default.xml

<head>      
    <css src="Magento_Theme::css/file.css"/>
</head>

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.