Stuck on Learn HTML & CSS: Part I Fonts part 12/16 


#1

body {
  /* Old browsers */
  background: #141E30;
  /* Chrome 10-25, Safari 5.1-6 */
  background: -webkit-linear-gradient(-45deg, #35577D, #141E30);
  /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
  background: linear-gradient(-45deg, #35577D, #141E30);
  margin: 0;
  padding: 0;
}

h1 {
  color: #FFF;
  font-family: "Playfair Display", serif;
  font-size: 32px;
  padding-top: 100px;
  text-align: left;
  width: 60%;
}

h2 {
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  color: rgba(255, 255, 255, 0.5);
  font-family: Roboto, sans-serif;
  font-size: 22px;
  line-height: 24px;
  word-spacing: 0.05em;
  letter-spacing: 0.02em;
  padding-bottom: 30px;
  text-align: left;
  width: 70%;
}

p {
  color: AliceBlue;
  font-family: Roboto, sans-serif;
  font-weight: bold;
  font-size: 20px;
  line-height: 1.7em;
  text-align: left;
  width: 100%;
}

.byline {
  color: rgba(255, 255, 255, 0.5);
  float: left;
  font-family: 'Roboto', sans-serif;
  font-weight: bold;
  font-size: 14px;
  padding-left: 10px;
  text-transform: uppercase;
}

.caption {
  background-color: rgba(0, 0, 0, 0.6);
  color: rgba(255, 255, 255, 0.65);
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  font-style: italic;
  line-height: 14px;
  margin-left: 20px;
  padding: 10px;
  position: relative;
  top: 80%;
  width: 60%;
}

.content {
  padding: 40px;
}

.image {
  background-image: url("https://s3.amazonaws.com/codecademy-content/courses/web-101/unit-4/htmlcss1-img_soccer.jpeg");
  background-size: cover;
  background-position: center;
  height: 300px;
}

.writer-img {
  -webkit-box-shadow: 5px 0px 5px 0px rgba(0, 0, 50, 0.97);
  -moz-box-shadow: 5px 0px 5px 0px rgba(0, 0, 50, 0.97);
  box-shadow: 5px 0px 5px 0px rgba(0, 0, 50, 0.97);
  float: left;
  width: 50px;
}

#2

You don't need quotation marks when assigning fonts to font-family. Just use the

font-family: Fontname, otherfont;

syntax.


#3

No that's not right - the "get code" function displays exactly as the user pasted it. I'm also stuck. It says i need to add : font-weight: bold; : which i have to every paragraph and subheading and heading etc. and it keeps saying "Did you set the font weight of the paragraph to bold?!" which i absolutely have. I even used "get code" and it doesn't accept it. I've tried now on firefox and internet explorer and can't get past :frowning:


#4

I don't know...does not work


#5

Is wrong, copy this I have it well I worked, and someone would give me the index.hmtl responses

body {
/* Old browsers */
background: #141E30;
/* Chrome 10-25, Safari 5.1-6 */
background: -webkit-linear-gradient(-45deg, #35577D, #141E30);
/* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
background: linear-gradient(-45deg, #35577D, #141E30);
margin: 0;
padding: 0;
}

h1 {
color: #FFF;
font-family: "Playfair Display", serif;
font-size: 32px;
padding-top: 100px;
text-align: left;
width: 60%;
}

h2 {
border-bottom: 1px solid rgba(255, 255, 255, 0.5);
color: rgba(255, 255, 255, 0.5);
font-weight: 100;
font-family: Roboto, sans-serif;
font-size: 22px;
letter-spacing:0.02em;
line-height: 24px;
padding-bottom: 30px;
text-align: left;
width: 70%;
word-spacing: 0.05em;
}

p {
color: AliceBlue;
font-family: Roboto, sans-serif;
font-size: 20px;
font-weight: 100;
line-height: 1.7em;
text-align: left;
width: 100%;
}

.byline {
color: rgba(255, 255, 255, 0.5);
float: left;
font-family: 'Roboto', sans-serif;
font-weight: 100;
font-size: 14px;
padding-left: 10px;
text-transform: uppercase;
}

.caption {
background-color: rgba(0, 0, 0, 0.6);
color: rgba(255, 255, 255, 0.65);
display: block;
font-family: 'Playfair Display', serif;
font-size: 14px;
font-style: italic;
line-height: 14px;
margin-left: 20px;
padding: 10px;
position: relative;
top: 80%;
width: 60%;
}

.content {
padding: 40px;
}

.image {
background-image: url("https://s3.amazonaws.com/codecademy-content/courses/web-101/unit-4/htmlcss1-img_soccer.jpeg");
background-size: cover;
background-position: center;
height: 300px;
}

.writer-img {
-webkit-box-shadow: 5px 0px 5px 0px rgba(0, 0, 50, 0.97);
-moz-box-shadow: 5px 0px 5px 0px rgba(0, 0, 50, 0.97);
box-shadow: 5px 0px 5px 0px rgba(0, 0, 50, 0.97);
float: left;
width: 50px;
}p {
font-weight: bold;
}


#6

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