cancel
Showing results for 
Search instead for 
Did you mean: 

Css styles doesn't apply in home page

Css styles doesn't apply in home page

I want to use in my home page the styles of the sample data (from another project) in my Child theme by luma without sample. Then copy the content of the home page block (with other images), and it looks good, but the styles did not apply. Then I copied the pub / media / styles.css from the sample in app / design / vendor / customtheme / web / css and referenced it properly in my layout / default_head_blocks.xml but the styles are still not applied .. where is my mistake?

1 REPLY 1

Re: Css styles doesn't apply in home page

Hi @mauri_mono 

 

If you Applied your css properly and it's not showing changes on frontend then i would suggest you to run below command:

 

php bin/magento setup:static-content:deploy

if it doesn't work then i think you didn't place css file on correct path for this please check:

 

Add the following folders to your custom theme

 

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


put your css on same path inside web/css

 

once you do this please run the command 

php bin/magento setup:static-content:deploy

php bin/magento cache:flush

Hope this will help.

 

if above answer was helpful then please Accept as Solution & give Kudos
Shubham Khandelwal