Hi All,
I don't know if I'm posting my cry for help in the right forum; if not, I apologize.
I have a project which I'd like to promote to potential clients. The project's name serve also as a logo, and am referring it a lot in the text. To increase the appeal, in the text I am using the logo (a little .png file) wherever a reference is needed.
I created an .svg version of the logo, and would like to use it instead of .png.
Here are the following problems for which I'm not sure what's the best answer:
1. Various web tutorials suggest that the best way to introduce an SVG file is using the <embed> element. They're also all quick to point that it is non-standard, and that <object> should have been the preferred method, but this one has bugs and is not implemented by everyone. So, having this in mind, I was thinking at something like:
Code: Select all
<object data="uC.svg" width="300" height="50" type="image/svg+xml">
<embed src="uC.svg" width="300" height="50" type="image/svg+xml">
<img style="vertical-align:middle" src="uc.png" border=0 alt="uniQ/Card">
</object>
Notice that I don't have things like "codebase" as, according to Adobe, most modern browsers have native SVG support and their viewer is not necessary anymore.
So, first I try using <object>. If that is not supported by browser, I try <embed>. If that one fails too, I fall back on <img>. I'm (ab)using the fact that browsers will ignore unknown tags.
The problem with this approach is that it's a lot of code that will repeat again and again. So, (if the above is correct), is there a way to declare this construction somehow in the <head> section and then just invoke it when necessary?
2. In order to minimize traffic, I'd like to go one step further: load it once in cache, and re-use it for subsequent web pages from my site. Is it possible, and how?
3. The logo is actually just some contorted text, with some colour attributes. I'd like it to follow the re-sizing of surrounding (standard) text, and as SVG is "Scalable VG" I think it should be possible. How?
Thanks for your advise,
SxN