8. A background image


#1

type or past
1
body {
2
  height: 100%;
3
  margin: 0;
4
  text-align: center;
5
  width: 100%;
6
}
7
​
8
h1 {
9
  font-size: 32px;
10
  font-family: Palatino, 'Palatino Linotype', serif;
11
  color: rgb(216,105,163);
12
}
13
​
14
h2 {
15
  font-size: 56px;
16
 
17
}
18
​
19
​
20
.hero { background-image: url("https://s3.amazonaws.com/codecademy-content/projects/make-a-website/lesson-2/bg.jpg"); #ffffff 
21
}
22
​
23
​
24
p {
25
font-size: 3rem
26
}
27
​
28
​
Did you add a color property of #ffffff the .hero selector in main.css?e code here

Replace this line with your code.

`


#2

Please include a link to the exercise that you are working on.


#3

I don't know how to do that


#4

https://www.codecademy.com/courses/make-a-website/lessons/closer-look-css/exercises/background-image?action=lesson_resume#


#5

Have a look ^

You just added #ffffff you didn't specify what it is for, your syntax should be:

selector{
  attribute: value;
}

so in your case you would use:

color: #ffffff;

#6

Oh thx lets see if it works


#7

body {
	height: 100%;
	margin: 0;
	text-align: center;
	width: 100%;
}

h1 {
	font-size: 32px;
  font-family: Palatino, 'Palatino Linotype', serif;
  color: #ffffff
}

h2 {
	font-size: 56px;
 
}


.hero { background-image: url("https://s3.amazonaws.com/codecademy-content/projects/make-a-website/lesson-2/bg.jpg")
}

#8

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