Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed CSS Selectors!
You have completed CSS Selectors!
Preview
With substring matching attribute selectors, we can target specific pieces of an attribute's value, like certain letters and words.
Quick Reference
Using substring matching attribute selectors
-
^tells the browser to match a piece of code that’s at the beginning of an attribute's value -
$matches a piece at the end of an attribute's value. -
*matches any part of an attribute's value
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
by adding three powerful selectors called
substring matching attribute selectors,
0:00
that allow us to target specific pieces of
an attribute's value.
0:01
Let's see how.
0:05
So, the first thing we'll need to do is
launch the latest workspace for
0:06
this lesson.
0:10
And when we open up and
0:11
preview the workspace files, you'll notice
that it brings up a simple image gallery.
0:12
Now, let's say that we need to enhance
this gallery page a bit with CSS.
0:18
But, let's also imagine that in this
particular case,
0:22
we're not allowed or able to add any class
or ID hooks to style our HTML elements.
0:26
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up