I was trying to add my other CSS file to my project's main CSS file, but @import
is not working for the second one. what should I do?
I was hoping to upload multiple CSS files import them to the main one and link the main css file with my html file.
Hello Siyam Zaman Shishir,
Great effort on your part! Just a couple of tweaks for optimization:
The @import statements should directly reference your files:
You've set the background-color in both the style.css and screen.css, causing a conflict due to CSS hierarchies. To resolve this, simply add !important within the @media statement in screen.css:
I made a test just like your project. Let me share what I did here:
It is working as expected!
screen test
If you have any questions, feel free to ask.
Best regards, Fabio.