Home › Forums › WoodMart support forum › Information box svg bug
Information box svg bug
- This topic has 3 replies, 2 voices, and was last updated 3 years, 6 months ago by Elise Noromit.
-
AuthorPosts
-
June 16, 2021 at 3:35 pm #300231
tcsg.tothParticipantHi,
Im trying to add svg to infobox image, but when I use just one image, it work perfectly. After I add 1 more infobox with svg image it started cut off the first one height. After I set the 4th svg image it filled all of the images with green color. What is the problem?Attachments:
You must be logged in to view attached files.June 16, 2021 at 10:36 pm #300273
Elise NoromitMemberHello,
You need to open your SVG icons file with some editor like Sublime Text or default system text editor and add width=”31″ height=”40″ attributes to your
<svg>
tag like it is shown: http://prntscr.com/m4n0qw
Then you will need to re-upload your icons in WordPress Dashboard.Best Regards
June 17, 2021 at 12:37 pm #300427
tcsg.tothParticipantI have set it, but still have issue.
<?xml version=”1.0″ encoding=”utf-8″?>
<!– Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) –>
<svg version=”1.1″ id=”Layer_1″ xmlns=”http://www.w3.org/2000/svg” xmlns:xlink=”http://www.w3.org/1999/xlink” x=”0px” y=”0px” width=”35″ height=”35″
viewBox=”0 0 35 35″ style=”enable-background:new 0 0 35 35;” xml:space=”preserve”>
<style type=”text/css”>
.st0{fill:none;stroke:#5cc0a8;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;}
</style>
<circle class=”st0″ cx=”17.5″ cy=”17.5″ r=”16″/>
<polyline class=”st0″ points=”17.5,8 17.5,17.5 27,23 “/>
</svg>June 18, 2021 at 9:47 am #300618
Elise NoromitMemberHello,
The problem is caused by SVG itself: your SVG images have styles that are applied to the whole page. As a result, the styles of one SVG icon influence the other. In order to solve this, you need to insert inline styles without classes.
You can open your SVG image in any text editor and manually change styles to inline like is shown:
remove this<circle class="st0"></circle>
insert this instead:<circle style="color: #5сс0а8"></circle>
If you create SVG in Adobe Illustrator we would suggest exporting SVG with appropriate CSS properties in the first place. During export from Illustrator choose style attributes. You can read more about resolving this issue in Illustrator here https://cobwwweb.com/inline-style-attributes-svg-element
Best Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register