0

So i have the following css i wish to add to all of my text svg elements:

text{
    position:relative;
    padding:15px;
    margin:1em 0 3em;
    color:#000;
    /* css3 */
    background:-webkit-gradient(linear, 0 0, 0 100%, from(#f9d835), to(#f3961c)); 
    background:-moz-linear-gradient(#f9d835, #f3961c);
    background:-o-linear-gradient(#f9d835, #f3961c);
    background:linear-gradient(#f9d835, #f3961c);
    -webkit-border-radius:10px;
    -moz-border-radius:10px;
    border-radius:10px;
}

Basicly this should create the text as a speech bubble.

However it seems that the following lines are being ignored:

 background: -webkit-gradient(linear, 0 0, 0 100%, from(#f9d835), to(#f3961c));
    background: -moz-linear-gradient(#f9d835, #f3961c);
    background: -o-linear-gradient(#f9d835, #f3961c);
    background: linear-gradient(#f9d835, #f3961c);
    -webkit-border-radius: 10px;

Can anyone tell me why? and if so how am i able to style my text into speech bubbles?

Html markup (taken from chromes inspector):

<svg id="chatSvg" width="408" height="374" class="room">
<image xmlns:xlink="http://www.w3.org/1999/xlink"xlink:href="assets/figures/naked.jpg" preserveAspectRatio="none" x="10" y="10" width="52" height="71">
</image>
<g><text x="200" y="50">hello world</text></g>
</svg>
Michael Mullany
  • 30,283
  • 6
  • 81
  • 105
Marc Rasmussen
  • 19,771
  • 79
  • 203
  • 364

0 Answers0