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 trialPeter Kim
3,896 PointsCreate a selector that targets an img element if its title value begins with "product-". Set the border color to lightbl
Please help!
/* Complete the challenge by writing CSS below */
11 Answers
rydavim
18,814 PointsYou need to select certain images using the attribute selector syntax element[attribute^="value"]. Note that the ^= means starts with. If you need to look up how to select using other filters try this w3schools page.
The rest of the challenge questions will likely be similar, so here's an example to get you started...
img[title^="product-"] {
border-color: lightblue;
}
Dominic Cyr
1,765 PointsIf you're stuck, here is my advice: do not insert a space after your img element. You may save many minutes reminding that! :-)
Ubo Town
3,227 Pointsahhhhhhh that's it
Alla Khalafalla
18,971 Pointslow-key
johnadi
3,690 Pointsimg[title^="product-"]{ border-color:lightblue; }
Shawn Denham
Python Development Techdegree Student 17,802 Pointsah ok this is a duplicate of your other question....answered it over there
Shawn Denham
Python Development Techdegree Student 17,802 PointsHi Peter,
Would love to help if I can. What's the problem you are having?
Yosef Ali
15,182 PointsThanks!
Andres Ramirez
18,094 PointsI've been building HTML/CSS websites for over 3 years, and never knew about this type of selectors...
They are AWESOME! Such a great lesson :)
Roberto Da Silva
4,213 PointsI'm having the same issue, can anyone help ? /* Complete the challenge by writing CSS below */
img[title^="product-"] { border-color: lightblue; }
a[href*="html"]{ text-decoration:none; }
Roberto Da Silva
4,213 PointsI have changed the character which should be $ but still doesn't work =/
Andres Ramirez
18,094 Pointsimg[title^="product-"] { border-color: lightblue; }
Thomas Ma
15,199 Pointshi
Kudakwashe Jama
7,676 Pointsimg[title^="product-"] { border-color:lightblue; } what is wrong with my code