Fix the CSS

In this exercise, you will be presented with CSS code blocks containing numerous errors which you will have to correct.

Code Block 1

We are working on a div with a class of “class_name”

There are 5 errors

.class name{
  display: inline-block;
  color: red
  border: solid black 2px;
  background-color: transparent;
}

.class_name li{
  color; green;
  margin: -10px;
  line-height: 20px;
}

class_name li > a{
  color: blue;
}

.class_name li > a:hover{
  color: black;
  background color: #757575;
}
Check your code here
.class_name{
  display: inline-block;
  color: red;
  border: solid black 2px;
  background-color: transparent;
}

.class_name li{
  color: green;
  margin: -10px;
  line-height: 20px;
}

.class_name li > a{
  color: blue;
}

.class_name li > a:hover{
  color: black;
  background-color: #757575;
}
  

Code block 2

We are working with the body, img, and p tags.

There are 7 errors

body[
  display: inline-block:
  background-color: #304950;
  color; red;
  text-align: center;
}

image{
  height: 100px;;
  width: 300p;
  margin: 10px;
}

p{
  display: inline block;
  width: 50%;
  margin: 0 auto;
}

Check your code here
body{
  display: inline-block;
  background-color: #304950;
  color: red;
  text-align: center;
}

img{
  height: 100px;
  width: 300px;
  margin: 10px;
}

p{
  display: inline-block;
  width: 50%;
  margin: 0 auto;
}