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 trialMichael Gould
Courses Plus Student 1,118 PointsWhere the HEX do I put this?
I'm lost. I don't exactly recall where I'm supposed to place the HEX designations.
//Mike
6 Answers
Micheal Hickerson
4,039 PointsAre you working on the Fonts & Colors code challenge? Your color codes will go in the style.css file. For setting font colors, you can just use the color attribute, such as:
color: #000000;
for setting the font to black. You can set the color right after you set the font-family.
Charlie Thomas
40,856 PointsUnder the font-family line in style.css type:
font-color: #FAF3BC;
Charlie Thomas
40,856 PointsUnder the font-family line in style.css type:
font-color: #FAF3BC;
David Appleby
5,213 PointsIf you're talking about using hex codes as colours in CSS, simply replace your colour short code (e.g. Black) with the hex code (e.g. #000000).
So your CSS might look like this: body { background-color: #000000; }
Check out the colour values video in the CSS deep dive for more: http://teamtreehouse.com/library/css-foundations/values-and-units/color-values-2
Bahi Hussien
Courses Plus Student 13,128 PointsYou can put hex in almost all the properties that needs color definitions example
Inline Examples <p style="color:#000000;"></p> <p style="background-color:#000000;"></p> also can be used for border-color
in css sheet
p{ color:#000000; background-color:000000; }
James Maddox
17,154 PointsY#ffff can use the hex before a color for example background-color: #000;
It can also be used in css when adding styles to a div id. For example:
wrapper {
bacground-color: #fff;
}
Michael Hinrichs
10,920 PointsMichael Hinrichs
10,920 Pointson a color attribute...
div { color: #fafafa; }