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 trialNathaniel Friends
2,937 PointsI need help with a target selector?
Create a selector that targets an img element if its title value begins with "product-". Set the border color to lightblue.
/* Complete the challenge by writing CSS below */
img[src*="product"] {
border-color: lightblue;
}
Nathaniel Friends
2,937 PointsThank you Steven but your answer is not working I have tried it exactly as the video indicated and without the dash and the dot. See my third post it has the exact way I have been putting this in.
Steven Parker
231,236 PointsThe challenges will never be something you can solve by pasting in the same code from the video follow-along. They may be similar but some part of it will be different. It's important to follow the instructions as given in the challenge.
I've been pointing out the specific things that need to be fixed to fit what the instructions are asking for (and to pass the challenge). You have re-asked this same question, but each time you still have not fixed the items I already pointed out.
1 Answer
Steven Parker
231,236 PointsHere's a few hints:
- the instructions say "title" but the attribute named here is "src"
- the instructions say "begins with" but the symbol used here means "contains"
- the instructions say "product-" but the string here is "product" (missing the "-" symbol)
Shaun Earley
20,412 PointsShaun Earley
20,412 PointsYou are trying to target the src or source of your image. The src should point to your image file in your HTML. Try replacing "src" with "title" if you are trying to find images with the title = product.
hope this helps Shaun