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 trialJay Valentine
Courses Plus Student 4,389 PointsCan someone tell me why my Navigation font colour isnt white? when i've coded it to be white?
Here's my CSS, The Portfolio, About, and Contact pages are bergundy and not white like i've specified
/*****************************************
GENERAL
******************************************/
body {
font-family: 'questrial', sans-serif;
}
#wrapper {
max-width: 940px;
margin: 0 auto;
padding: 0 5%;
}
a {
text-decoration: none;
}
img {
max-width: 100%;
}
/*****************************************
HEADING
******************************************/
#logo {
text-align:center;
margin: 0;
}
h1 {
font-family: 'PT SANS', sans-serif;
Margin: 15px 0px;
font-size: 1.75em;
font-weight: normal;
}
h2 {
font-size: 1em;
margin: -5px 0 0;
font-weight: normal;
}
h1, h2 {
text-align: center;
}
/*****************************************
NAVIGATION
******************************************/
nav {
text-align: center;
padding: 10px 0;
margin: 10px 0 0;
}
/*****************************************
FOOTER
******************************************/
footer {
text-align: center;
font-size: 0.75em;
padding-top: 50px;
color: #ccc;
}
/*****************************************
PAGE: PORTFOLIO
******************************************/
#gallery {
margin: 0;
padding: 0;
list-style: none;
}
#gallery li {
float: left;
width: 45%;
margin: 2.5%;
background-color: #f5f5f5;
color: #bdc3c7;
}
/*****************************************
COLORS
******************************************/
/* site body */
body {
background-color: white;
color: #999;
}
/* Bergundy header */
header {
background: #880000;
border-color: #B00000;
}
/* Nav background on mobile */
nav {
background: #900000;
}
/* LOGO TEXT */
h1, h2 { color: #fff;
}
/*LINKS*/
a {
color: #880000;
}
/*NAV LINKS*/
nav a, nav a:visited; {
color: #fff;
}
/*SELECTED NAV LINK*/
nav a.selected, nav a:hover; {
color:#1f1f1f; }
2 Answers
Davy Wong
25,470 PointsCould be because you added an erroneous semi-colon to your CSS rule:
nav a, nav a:visited; { color: #fff; }
Try removing it and see if it works.
Jay Valentine
Courses Plus Student 4,389 PointsIt worked thank you!! , theres just so much information to remember and take in, like where to put semi-colons and stuff haha
Davy Wong
25,470 PointsDon't worry. We've all made and continue to make these mistakes to varying degrees =).
Keep practicing and you'll become better at spotting these typos.
Ryan Duchene
Courses Plus Student 46,022 PointsRyan Duchene
Courses Plus Student 46,022 PointsI fixed your Markdown for you. :) Backticks are used to format your code; they're similar to quotes, but they're the key above the tab key, next to the 1.
EDIT: Also, you can place a string like
css
orhtml
orjavascript
after the first set of backticks to get syntax highlighting.