Named /colors

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>

https://www.codecademy.com/courses/learn-html-css/lessons/css-colors/exercises/named-colors?action=lesson_resume
<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>
I have to set the background color of the subheadings to DarkMagenta. Where should I change it? I have tried with h1 and h2 but it doesn’t work.

```

body {

padding: 0;
margin: 0;
background: #f7f7f7;
/* Old browsers /
background: -moz-linear-gradient(45deg, #f7f7f7 0%, #EAE0D5 100%);
/
FF3.6-15 /
background: -webkit-linear-gradient(45deg, #f7f7f7 0%, #EAE0D5 100%);
/
Chrome10-25,Safari5.1-6 */
background: linear-gradient(45deg, #f7f7f7 0%, #EAE0D5 100%);
}

/** Header styles **/

.header {
color: MidnightBlue;
background-image: url(“https://s3.amazonaws.com/codecademy-content/courses/web-101/unit-4/htmlcss1-img_coffee-bgnd.jpeg”;
height: 400px;
background-position: center center;
}

h1 {

font-family: ‘Covered By Your Grace’, sans-serif;
font-size: 100px;
line-height: 76px;
margin: 0;
position: relative;
text-align: center;
top: 20%;
}

/** List style **/

h2 {
color: #E4BB97;
background-color: DarkMagenta;
font-family: ‘Raleway’, sans-serif;
font-size: 28px;
font-weight: 500;
text-align: left;
text-transform: uppercase;
}

ul {
margin: 0 auto;
padding: 0;
width: 50%;
}

li {
border-bottom: 1px solid #E4BB97;
list-style: none;
margin: 100px 0px;
padding-bottom: 60px;
}

p {
color: #444444;
line-height: 32px;
font-family: ‘Raleway’, sans-serif;
font-size: 20px;
font-weight: 100;
}

a {
color: #214E34;
font-family: ‘Raleway’, sans-serif;
font-size: 13px;
font-weight: 900;
text-align: left;
text-transform: uppercase;
text-decoration: none;
letter-spacing: 2px;
}

<do not remove the three backticks above>
1 Like

I don’t think it registers the value Dark magenta. Try using the hex code instead. #8B008B

it didn’t change anything…

Is DarkMagenta and Dark Magenta the same? (Note the space!) I’m fairly certain you also have to include quotes (") with multiword colors, but I’m not certain, try with-and without quotes.

A few days ago I haven’t been able to restart the exercise, now it was
possible and it solved my problem. Thanks for help :wink:

1 Like

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