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 trialTomasz Necek
Courses Plus Student 7,028 PointsWhat if I want to color only Portfolio(text) in different color? Where should I put "style" ?
Question in the title:) Thank you !
2 Answers
Tobias Helmrich
31,603 PointsHey Tomasz,
there are multiple ways to achieve this. In later courses you'll learn more about advanced selectors like selectors which help you to select an element with a certain value at an attribute (like the href attribute for example) or pseudo classes.
However in this stage I recommend giving the anchor element "Portfolio" is nested in a class (like portfolio for example) and then select this class and give it a value.
This would be an example:
Give the element the class portfolio:
<a href="index.html" class="portfolio">Portfolio</a>
Write this in your CSS (in this case give it the color green):
.portfolio {
color: green;
}
Another way would be to write the style inline, which means writing the property and value into the style attribute of the element like so:
<a href="index.html" style="color: green;">Portfolio</a>
I hope that answers your question! :)
Tomasz Necek
Courses Plus Student 7,028 PointsThank you for your time:)