I am trying to add a Style sheet in my Magento 2 store. My default_head_blocks.xml is like below
<?xml version="1.0"?> <!-- /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ --> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <head> <meta name="viewport" content="width=device-width, initial-scale=1"/> <css src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css" src_type="url" rel="stylesheet" type="text/css" /> <css rel="stylesheet" type="text/css" src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" src_type="url" /> <css src="css/fixed_css.css"/> <css src="css/custom.css"/> </head> </page>
fixed_css.css code is like below
.search-hearder-main.row { justify-content: center !important; }/* Facebook */ .fa-facebook { background: #3B5998; color: white; }
/* Twitter */ .fa-twitter { background: #55ACEE; color: white; }
.fa { padding: 20px; font-size: 30px; width: 30px; text-align: center; text-decoration: none; border-radius: 50%; }
I ran php bin/magento setup:upgrade command.
But I am getting only below code when I am inspecting using ctrl + u .
.search-hearder-main.row { justify-content: center !important; }
I tried in several ways. I ran below commands.
php bin/magento setup:upgrade php bin/magento setup:static-content:deploy -f php bin/magento indexer:reindex php bin/magento setup:di:compile php bin/magento cache:clean php bin/magento cache:flush
I flushed all the caches here.
Now I placed below CSS in fixed_css.css file.
body {
background-color: red;
}
But nothing is working.