0

My HTML code is

<!DOCTYPE html>
<html>
  <head>
    <title>Test_Svg</title>
    <link rel="stylesheet" type="text/css" href="test_svg.css"/>
  </head>
  <body>
    <object type="image/svg+xml" data="mySvg.svg">
      Can't display
    </object>
  </body>
</html>

And my CSS as follows

object
{
  height: 100px;
  width: 100px;
  fill: blue;
}

Basically I want to change the colour of the SVG image. How can I do it?

The SVG is designed by someone else. I need to use them and put them in place.

4
  • Where's the SVG? There is only an object with the text "Can't display". Sep 17, 2015 at 19:03
  • 2
    you cannot because the svg is loaded by your <object>. it is another document / file.
    – G-Cyrillus
    Sep 17, 2015 at 19:03
  • yes mySvg.svg is another file that i embed into my html Sep 17, 2015 at 19:08
  • This is a simple test example. In my project i have got many files to link and i can't change the color in each and every file. Sep 17, 2015 at 19:11

0

Browse other questions tagged or ask your own question.