0

I can't add my custom css in cms->page->design->layout, my code enter image description here

<head>
  <css src="Magento_Theme::css/mycss.css" /> 
</head>
<referenceContainer name="content"> 
    <container name="home-page-full-block" htmlTag="div" htmlClass="home-page-full-block">  
      <block class="Magento\Framework\View\Element\Template" name="homepage_block" template="Magento_Theme::mypage/my_home_page.phtml"></block>
   </container>   
</referenceContainer>
  • show your CSS file path. – Suresh Chikani May 9 '18 at 7:36
  • /home/root/www/pub/static/frontend/Developer/shop/en_US/css/mycss.css – Ashik Ali S May 9 '18 at 7:50
  • <head> cannot be support by layout update xml at magento2 – Amit Bera May 9 '18 at 8:19
3

This is a known bug in Magento 2. The fix for this was planned for the 2.2.4 release. But is know scheduled for the 2.3.0 release. For now this will not work.

further information: check this link

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