What is wrong?


#1

So I put the CSS code in main.css for the navigation bar...but i don't understand how the computer automatically groups some parts of the code in different colors. The purple a which should indicate the grouping should be purple but mine is white and when I try to submit the code it says it's wrong but I don't know what more I could do....help....this is what it looks like in main.css:


#2

Hi Nina,

in CSS you do not need the <div class="nav"> bit, that is for the HTML. If you remove that it should work (if your HTML is correct)

Thanks

Keith


#3

I have the same issue, I've removed the

etc but still no luck...
Did you solve your issue??

#4

@lucyrosemb @ninalala in a web page there are three ways to defined styling or css code

  1. externally in which case in the head section of your HTML file you would add a <link></link> tag

<head>
<link rel="stylesheet" type="text/css" href="theme.css">
</head>

. Within the desired tag in which case you would do something like

<h1 style="font-family:verdana;">This is a heading</h1>
<p style="font-family:courier;">This is a paragraph.</p>
  • or you can embed the css script in your html file but only in the head section

Example

<head>
<style>
body {
    background-color: #d0e4fe;
}
h1 {
    text-align: center;
}


</style>

#5

I've got this so far...
Tried the first option but not sure where to put the line (I'm a complete newbie!)
Are there any big issues or something??


#6

so now all your design code will be in the main.css file
if you still get an error then its probably because you are no using the css command as they are asking