Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Alcibiades Montas
5,974 Pointshow to change the color of an SVG object only using CSS?
Hi guys, I have an inserted the following svg object onto my HTML:
'''object type="image/svg+xml" data="graduates.svg" alt="The image wasn't found"></object>'''
with CSS I am targetting it like this:
'''.education object{
height: 60px;
width: 60px;
fill: #B86E25;
} '''
while the height and width is working I am unable to change the fill/color? How do I go about doing this?
Thanks in advance!
1 Answer
Darryl Swearengin
920 Points"color-fill:#B86e25;" Pretty must just add color before fill. This might help it actually color. what your filling