0

I am having problems with adding a hyperlink to my image. It is a SVG image which is an object data. I seem to have trouble with getting the hyperlink to work. Am i doing it wrong?

<div id="logo" class="grid_4">

<object data="img/flogo.svg" type="image/svg+xml" class="logo">
<!--[if lte IE 8 ]-->
<img src="img/flogo.gif" alt="F-Sharp Media Logo">
<!--![endif]-->
</object>
</div>
j08691
  • 204,283
  • 31
  • 260
  • 272

1 Answers1

0

From Here and Here..

CSS:

a.svg {
  position: relative;
  display: inline-block; 
}
a.svg:after {
  content: ""; 
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left:0;
}

HTML:

<a href="#" class="svg">
    <object data="img/flogo.svg" type="image/svg+xml" class="logo">
        <!--[if lte IE 8 ]-->
        <img src="img/flogo.gif" alt="F-Sharp Media Logo">
        <!--![endif]-->
    </object>
</a>
Community
  • 1
  • 1
Bijan
  • 7,737
  • 18
  • 89
  • 149