I have two CSS classes:
.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius:10px;
}
.smaller-image {
width: 100px;
border-radius:30px;
}
Usage in HTML document:
<img class="thick-green-border smaller-image" src="https://s3.amazonaws.com/freecodecamp/relaxing-cat.jpg" alt="A cute orange cat lying on its back.">
When the image element is assigned both the classes, the rule for the style border-radius described in the class .smaller-image
is taking effect, not the radius set inside thick-green-border
class. That is the border-radius of the image is becoming 30px, not 10px.
Can anyone please tell me why? I have tried changing the order in which the classes are assigned to the image but the result is the same.