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 trialGreg Osborne
2,194 PointsColour issues with navigation after validating code
Hi there guys. After copy and pasting my code into the validation website (W3C) there seems to be some issues with with the colours on the nav bar. They are now green on the mobile site, and are not visible at all on the desktop site. It is probably something simple;( something a expert eye would spot.
3 Answers
Samuel Webb
25,370 PointsGreg,
You didn't close out your last statement with a semicolon and you also have this:
/*nave background on mobile*/
nav{
background:#577a66;
}
/*nav link */
}
Which first off, is the second time you've defined nav>background and also there's an extra semicolon at the end there which is probably helping cause a problem. One more thing that isn't necessarily wrong, is that you didn't put a semicolon after the img>max-width line. This one is more for good practice on not forgetting semicolons. Hope this helps, I didn't actually test it out live but that's pretty much everything that's wrong. And for things being green, that background color is green so... That comment about it being the nav background on mobile, it'll be the nav background color on any viewport.
Hope this helps. Cheers. Sam Webb
Greg Osborne
2,194 PointsHi Samuel, thanks for the swift reply, much appreciated. Im not quite following the reply "You didn't close out your last statement with a semicolon" I can't see where to put the semi colon ;( this is probably so obvious, but Im still wet behind the ears when it comes to code!
What I meant by the background colour being green is when I pull the browser window down to the smallest size, the colour behind the navigation turns a different shade of green. When the browser window is pulled out to the max, the green changes to one shade.
Thanks :)
Samuel Webb
25,370 PointsSorry about that, what I meant was you needed an ending curly brace. Good thing you ended up getting it though.
Greg Osborne
2,194 PointsI have figured it out Samuel, thanks again:)
Greg Osborne
2,194 PointsGreg Osborne
2,194 Points