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

CSS CSS Selectors Going Further with Attribute Selectors and Pseudo-Classes Substring Matching Attribute Selectors - "Begins With" and "Ends With"

Substring Matching Attribute Selectors: Before and After

I am coding in the Coffee Cup HTML editor trying to use Gil's substring code on my website but it does not seem to work. I typed

a[href^="Home"] { border:3px solid tomato; }

for the CSS on my services page just to test it out but it doesn't seem to do anything. Here is my site, for reference: crescentwebdesign.com

2 Answers

So you're trying to make a border for home page link in navigation? Your home page filename is index.html, not Home.

a[href="index.html"] {
  border:3px solid tomato;
}

Perfect. Thank you. I misunderstood the syntax.