Design comparison
Solution retrospective
I tried to change the color of icon-cross.svg img in nav slider for mobie screen. But could not . If any body helps , my thanks in advance.
Community feedback
- @dusan-bPosted almost 2 years ago
Hello Ramesh,
to change the color of SVG images, you need to implement it directly into your HTML file. You can do this by opening the SVG file in a text or code editor and copying everything inside. Then you just replace the
<img>
element with the SVG code.After that, you can give the SVG a class name and redefine the color in CSS by using the
fill
property. Just make sure that there is nofill
attribute inside the SVG code.Here's an example:
<svg class="svg-image"> ... </svg>
.svg-image { fill: #333; }
Also, I have noticed that your layout breaks when viewing on a screen wider than 1440px. I would consider removing
max-width: 1440px
from your media query.Hope this helps. Happy coding!
Marked as helpful0@rameshkmunjalPosted almost 2 years ago@dusan-b Thank a lot . Now it is working.
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord