# March 23, 2013 at 6:40 pm
Still unable to get this to work…
I’m currently importing the svg code as background data in css
and for my code, I am using
with the codefish code in place of the “[data]”
With my actual svg data before mobilefish# March 25, 2013 at 10:29 pm
Ok, I’ve been able to style following Chris Coyer’s example. http://css-tricks.com/using-svg/
First by importing the svg via php
< ?php include("svgs/text.svg"); ?>
Then in my optimized svg I gave it a class
Then in my css I did the following.
My question now is , is this the best way? Am I missing something? Maybe I should use images and 2x for retina?# March 26, 2013 at 6:24 am
>Maybe I should use images and 2x for retina?
SVG is a vector so it’s as big as it needs to be….that’s the whole point…it’s retina ready.
As for your method that will affect all elements with a class of .svg. **So, if there is only one SVG element with that class (or they are all the same)** IN YOUR HTML then it’s fine…I suppose.
You must be logged in to reply to this topic.