Background-color property doesn't work -- need a smarter pair of eyes


#1

I’m starting all over again on the Secret Agent Supply project, and having a nervous breakdown. For some reason I can’t get the background-color property to work anymore. It’s just black text on a white background. To figure out what’s going on, I went back to the beginning with a test HTML:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Secret Agent Supply Inc.</title>
<!--    <link href="./resources/css/reset.css" type="text/css" rel="stylesheet">-->
    <link href="./resources/css/style.css" type="text/css" rel="stylesheet">
  </head>
  <body>
    <header>
      SECRET AGENT SUPPLY INC.
    </header>
  </body>
</html>



/* STYLESHEET FOR SecretAgentSupply/index */

html {
  font-size: 18px;
}

body {
  color: black;
  font-family: Helvetica, sans-serif;
}

<!-- ------------- -->

header {
  background-color: green;
  height: 60px;
}

I know that I’m doing something stupid, but I just can’t see it. Can someone please help?


#2

<!-- ------------- --> is a html comment, don’t put it in css, use /* comment */ for css


#3

I tried the code myself, it works fine for me following what @stetim94 just said.


#4

Given the html comment is invalid css syntax, the code after the comment has trouble rendering.

So removing the faulty comment will fix the code, which is what i suggested. What value does your reply add to the topic?


#5

I’m just saying that I tried it with what you said, since I wasn’t sure if the comment bit was addedafter (as in, to show that section, etc.)


#6

I knew it was something stupid. Thank you very much.


#7