Learn Basic CSS by Building a Cafe Menu - Step 18

Tell us what’s happening:

For unknown reasons, the background color displays red instead of brown, why does this happen?, My code is fine.

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Cafe Menu</title>
    <link href="styles.css" rel="stylesheet"/>
  </head>
  <body>
    <main>
      <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>
      <section>
        <h2>Coffee</h2>
      </section>
    </main>
  </body>
</html>
/* file: styles.css */

/* User Editable Region */

h1, h2, p {
  text-align: center;
}
body {
  background-color: brown;
}
// For unknown reasons, this displays red instead

/* User Editable Region */


Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 Edg/122.0.0.0

Challenge Information:

Learn Basic CSS by Building a Cafe Menu - Step 18

Hello @baquirjezriel_bsa !

Though I cannot be sure, I am thinking it is some setting on the computer.
For me, it displays brown as it is intended to do.

May your coding path be smooth.

Just completed step 19 where they told me to change it to burlywood, and that works completely fine, wonder why this specifically doesn’t?

I will redo this step though VSCode, to see if that if its my computer or this site thats malfunctioning

1 Like

Wishing you more smooth coding on your coding journey! :slight_smile:

If you convert the named brown color to another color model like the rgb model then you will see that is has a high concentration of red

rgb(165, 42, 42);

as to why that is the case, this reddit answer seemed to be most promising as to the historical reasons for this

https://www.reddit.com/r/css/comments/2vd0re/why_is_css_brown_actually_redbrown/

hope that helps

1 Like


Redid this in VSCode, this is definitely a CSS problem, wonder why it hasnt been fixed yet, according to the reddit post, this has been a thing for at least 9 years now

thank yall for the support

1 Like

The more I view it, even on my screen, the more it appears to be a shade of red.
Good point @baquirjezriel_bsa !

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.