- This topic is empty.
-
AuthorPosts
-
December 16, 2013 at 4:00 pm #158482mintertweedParticipant
I have SVGs on my WordPress home page, here. If you scroll down, you’ll see my issue. To make sure that I was doing everything properly, I also created this mockup in CodePen using the same exact code. The mockup looks fine and is working properly except for the added four pixels of margin at the bottom of each SVG. I will give a virtual hug to anyone who can help me with making the SVGs appear properly on my WordPress website. Extra credit for the person who can figure out how to get rid of that four extra pixels at the bottom of the SVGs. Thanks in advance!
Edit: I suspect this is an HTML problem, but I’m not entirely sure.
December 16, 2013 at 5:04 pm #158484chrisburtonParticipant.social-widget { height: 32px; /* fixed */ ....
December 16, 2013 at 5:12 pm #158486mintertweedParticipantThank you, @chrisburton. I knew the extra space had to be something simple. I kept playing with margin and padding. I don’t know why it didn’t occur to me to mess with the height. Boo upon me. Now, I just need to figure out why WordPress won’t display the SVGs properly.
December 16, 2013 at 5:31 pm #158488chrisburtonParticipantWhat do you mean? You mean where the RSS is above the rest? I think it has to do with the first icon (RSS).
December 16, 2013 at 5:40 pm #158489mintertweedParticipantI placed the SVGs in an
img
tag and everything is displaying properly except for the colors. Is there any way to place an SVG in a tag and retain control over the colors within the SVG?December 16, 2013 at 5:42 pm #158490mintertweedParticipant@chrisburton, That’s after I placed the SVGs in
img
tags. Before, I was using the raw XML and it displays fine in CodePen, but not so much in WordPress. Now I haveimg src
pointing to the SVG file, but I lose all control over the fill color when I do this.December 16, 2013 at 5:51 pm #158491chrisburtonParticipantI think the best way to handle this is with icon fonts. You can upload your own SVG and convert them to a font file with icomoon.io
Just go here: http://icomoon.io/app/
Then, choose import.
December 16, 2013 at 6:32 pm #158493mintertweedParticipantInteresting. After I do that, would I then use
@font-face
? And control the encapsulating area with basic CSS?December 16, 2013 at 7:08 pm #158496chrisburtonParticipantExactly.
-
AuthorPosts
- The forum ‘Other’ is closed to new topics and replies.