0

I've created a backend theme from Mage/backend. When I deploy the static content, the theme is deployed but in front, the CSS is not shown. I created a styles.css file in the CSS folder of the theme.

Maybe I need to declare somewhere the styles.css but where?

St3phan
2,9451 gold badge26 silver badges49 bronze badges
asked Nov 8, 2017 at 12:39
4
  • try to add in pub and load the page is it woring? Commented Nov 8, 2017 at 12:43
  • Where you create a new theme? In which folder? Commented Nov 8, 2017 at 12:44
  • We need more information. Commented Nov 8, 2017 at 12:46
  • You can declare that css file in Magento_Theme->Layout->default.xml file and put css file in Magento_Theme->Css folder Commented Nov 8, 2017 at 13:00

1 Answer 1

0

After installing Magento 2

sudo service apache2 restart 
sudo chmod -R 777 var/
sudo chmod -R 777 pub/
sudo service apache2 restart
 sudo chmod -R 777 /var/www/html/magento
 sudo a2enmod rewrite
sudo service apache2 restart

Content deploy

php bin/magento setup:static-content:deploy "on root dir".

if it's not working yet

For Ubuntu edit the file /etc/apache2/apache2.conf

find /var/www/

Change AllowOverride None to AllowOverride All under the following section:

<Directory /var/www/>
 Options Indexes FollowSymLinks
 AllowOverride All
 Require all granted
</Directory>
PY Yick
2,7051 gold badge19 silver badges35 bronze badges
answered Nov 8, 2017 at 12:58
1
  • Thanks it works well. It was a file permissions problem :/ Commented Nov 9, 2017 at 9:23

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.