Cant complete task HTML&CSS: Part 1


#1

ID Selectors
1. Task
In style.css, add an ID selector for the ID header-text.

Code:

body {
background-color: #FFF;
margin: 0;
padding: 0;
}

.header {
background-image: url("https://s3.amazonaws.com/codecademy-content/courses/web-101/unit-5/htmlcss1-img_canyon.jpeg");
background-position: center center;
background-size: cover;
height: 700px;
width: 100%;
#header-text{}
}

/* Add the ID selector to this CSS rule */

{
margin: 0 auto;
position: relative;
text-align: center;
top: 25%;
width: 60%;
}

h1 {
color: #FFF;
font-family: 'Quicksand', sans-serif;
font-size: 70px;
font-weight: 400;
line-height: 60px;
margin: 0;
}

h2 {
color: #FFF;
font-family: 'Open Sans', sans-serif;
text-align: center;
font-size: 28px;
font-weight: 100;
}

h3 {
color: #FFF;
font-family: 'Quicksand', sans-serif;
font-size: 28px;
font-weight: 400;
line-height: 30px;
margin: 10px 0px;
text-align: center;
}

h4 {
color: #CCC;
font-family: 'Quicksand', sans-serif;
font-size: 16px;
font-weight: 300;
}

p {
color: white;
font-family: 'Open Sans', sans-serif;
font-size: 16px;
font-weight: 100;
line-height: 24px;
margin: 0 auto;
text-align: center;
width: 60%;
}

/* Add the class selector to this CSS rule */

{
padding: 20px;
text-align: center;
margin: 0 auto;
border-bottom: 1px solid #EEE;
}

.partner img {
position: relative;
top: 6px;
}

.aa-logo {
padding-left: 6px;
}

.main {
background: url("https://s3.amazonaws.com/codecademy-content/courses/web-101/unit-5/shards.png");
margin: 0;
padding: 40px;
}

.value-props {
margin: 40px auto;
width: 60%;
}

.prop {
border: 1px solid #FFF;
padding: 40px 0px;
margin: 5px 0px;
text-align: center;
}

.prop h2 {
font-family: 'Quicksand', sans-serif;
font-size: 24px;
}


#2

The id selector is the Attribute value you gave to the div with an hashtag and curly braces like the for example :

ExampleIDSelector {

/* css code*/

}


#3

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