Tagged: SVG
- This topic has 2 replies, 2 voices, and was last updated 1 year, 3 months ago by Sebastian.
Author | Posts |
---|---|
sakomicro
June 15, 2023 at 1:42 pm
|
Hi! I am working on a wordpress website using elementor. I can use this CSS:
I have allready tried changing the original SVGs from:
to
Why do both not work with the fill CSS, or is there another approach? Thanks |
Sebastian
June 15, 2023 at 2:24 pm
|
Hey Sascha, Under normal circumstances I would expect the following CSS to work:
But the SVG needs to be added to the page as inline code, rather than with an image url (my-icon.svg). And there may also be issues if Elementor loads the SVGs as a sprite, but I can’t verify that right now as stackoverflow isn’t loading for me. Could you send me a link to the page with the SVG? Perhaps via the contact form if you prefer to keep it private. Cheers, |
Sebastian
June 15, 2023 at 3:58 pm
|
For anyone reading this thread, Sascha’s issue was because Elementor was loading the SVG in the src attribute of an img tag. And that can’t be styled with CSS fill. Some potential workarounds include:
|