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 trialcharles bailey
Front End Web Development Techdegree Student 4,345 PointsCan't seem to select image properly in my css.
I am practicing css selectors with no id's or classes and I can't create an image selector. I've reviewed the video and have written my code just like Gill did. What a I missing?
/* Complete the challenge by writing CSS below */
img[src*="product-"] {
border-color: lightblue;
}
charles bailey
Front End Web Development Techdegree Student 4,345 PointsGil specifically uses the border-color deceleration.
1 Answer
Amrit Pandey
17,595 Points/* Complete the challenge by writing CSS below */
img[title^="product-"] {
border-color: lightblue;
}
Two mistakes, first it was title value! second(not a mistake actually) for begins with we use ^= instead of *=
charles bailey
Front End Web Development Techdegree Student 4,345 PointsThank you! After much deliberation I realized why my answer was in correct. I now understand not to follow so closely to what the teacher is doing.
izzy goldman
12,542 Pointsizzy goldman
12,542 Pointsborder-color: lightblue; will not work on a img!
try using: img[src*="product-"] { outline: 5px solid lightblue; outline-offset: 2px; }