Basic CSS resize your image

There is an error in the code but I cannot identify it.

Regards

| rio_sanap
January 13 |

  • | - |

laohu:

p {
font-size:16px;
font-family:monospace;
.smaller-image {
width: 100px;
}
red-text{
color:red;
}
}

here you have syntax mistake

if you want to give style to that image you can give the same way as given but , that class small-image should be outside of p element

i mean

p {
// p element style go here
}
.small-image {
// image style go here
}

your second mistake in that code is you have additional curly bracket at the end remove that the red-text is a class so you should use .red-text not red-text because it’s a class selector not element or tag