My default_header_block.xml path is enter image description here


my css file


But my abc.css file loaded inside following structure enter image description here


it will not display source path.. enter image description here

I followed the below steps to clear cache:

remove files inside 'var' folder and inside pub/static/frontend

How can I display my Custom css source link in website?

  • Did you ran the php bin/magento s:s:d and followed by php bin/magento c:f Jan 30, 2018 at 13:17

1 Answer 1


In order to do add custom css and load last, you must set up a custom theme.

app / design / frontend / [vendor] / [theme] / Magento_Theme / layout app / design / frontend / [vendor] / [theme] / web / css

Create the following files:

app / design / frontend / [vendor] / [theme] / Magento_Theme / layout / default_head_blocks.xml
app / design / frontend / [vendor] / [theme] / web / css / local-m.css app / design / frontend / [vendor] / [theme] / web / css / local-l.css

place this code within default_head_blocks.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../vendor/magento/framework/Module/etc/module.xsd">
    <css src="css/local-m.css" />
    <css src="css/local-l.css" media="screen and (min-width: 768px)"/>

php bin/magento setup:static-content:deploy

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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