Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS svg trouble

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #45707
    mdrd88
    Participant

    http://codepen.io/mdrd88/pen/FAGhr

    I seem to be having trouble with the fill property. I would like the color of the vector to be white, however, that does not seem to work. Although I can manipulate the height and width.

    Thanks for your help!

    #139626
    CrocoDillon
    Participant

    Not sure but I think you’d need to embed the svg into the html, so you can target the nodes… like:

    #bird {
    fill: #fff;
    }

    #139630
    mdrd88
    Participant

    Does that mean I would have to add the #bird class to the img? Sorry, this is new territory for me.

    #139635
    Paulie_D
    Member

    @mdrd88

    No…you can’t style parts of the `` element (AFAIK) like that even if it’s an svg image.

    You have to use an `` element which will contain ‘parts’ one of which will be the bird.

    https://css-tricks.com/using-svg/

    and Chris’ codepen of that ….http://codepen.io/chriscoyier/pen/evcBu

    #139636
    CrocoDillon
    Participant

    Yes (what Paulie said), the bird ‘part’ is already in the svg: http://s.cdpn.io/3/kiwi.svg (view source)

    #139637
    mdrd88
    Participant

    0.0

    Okay,I think i got it.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘CSS’ is closed to new topics and replies.