Magento 2. Quick Guide. Create Custom CSS File

In this tutorial you’ll find step-by-step instructions on how to add a custom CSS file in Magento 2.

1. Open the app/design/frontend/Zemez/themeXXX/Magento_Theme/layout/default_head_blocks.xml file and insert the following code before the </head> tag.

zemez wordpress themes
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:noNamespaceSchemaLocation="../. ./. ./. ./. ./. ./. ./lib/internal/Magento/Framework/View/Layout/etc/page_configu­ration.xsd">
<head>
<css src="css/custom.css" />
</head>
</page>

2. The next step is to create custom.css file with your custom CSS styles and overrides in the app/design/frontend/Zemez/themeXXX/web/css folder.

3. Remember to clear magento cache.


Useful Tutorials:

Cascading style sheets (CSS) in Magento

You also can add custom CSS style via Admin Panel.

Magento 2. How to Add CSS Styles to Magento Theme

monster one