- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I had installed magento 2.0.2 and also override the templates I am stuck on a point that where do i write my css for my own styling. How do i change the css of existing template. i have done these steps create _theme.less
app/design/frontend/vendor/theme/web/source/_theme.less
and deploy the content by using
php bin/magento setup:static-content:deploy
also change the Front-end development workflow into client side less compilation and i found the styles.css file included at backend which source was
pub/media/styles.css
if i make changes in styles.css then it will apply on frontend and backend both. now i want to write my own css to apply my own created theme how can i do that?
thanks alot!
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to add JavaScript / CSS / Less with a custom module: https://mage2.pro/t/34
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to add JavaScript / CSS / Less with a custom module: https://mage2.pro/t/34
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: My css is not working in magento 2
Make sure your tree looks like this:
-app
--design
---frontend
----VendorName
-----VendorTheme
------Magento-Theme
-------layout
--------default.xml
--------default_head_blocks.xml
------media
-------preview.png
------web
-------css
--------yourcss.css
------registration.php
------theme.xml
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: My css is not working in magento 2
you also have to make sure that your .htaccess in the static folder has not been accidentally deleted (if you are using apache).
for nginx you'll have to add the appropriate rules as provided in their sample nginx config.
you also have to clear out the var/view_preprocessed folder.
you can also try using this instead, it's much better