I'm a beginner to Angular and I wanted to incorporate W3 CSS into my project. Here are the steps I took:
- Installed W3 CSS using npm in my project directory by running:
npm install --save w3-css
- Added
node_modules/w3-css/w3.css
to angular.json
"styles": [ "src/styles.css", "node_modules/w3-css/w3.css" ],
After completing these steps, I attempted to apply the css classes to my component's html file.
<div class="w3-container w3-border w3-large">
<div class="w3-left-align"><p>Left aligned text.</p></div>
<div class="w3-right-align"><p>Right aligned text.</p></div>
</div>
However, I did not see any of the classes being applied.
Keep in mind that the node_modules folder and angular.json should be in the same directory for this setup to work properly.