What is happening? In this border-radius excercise, the rounding was applied to the image but it’s the border that got rounded! The image has sharp 90 degree angles. I thought the corners of the image would get rounded not the border.
I have been chastised by another tutor on the forum for not providing a link to the lesson that I am referencing and OK - obviously this is something that I should do but I’ll ask you - just as I have asked him - is my quoted code not enough for you to see and comment on the problem?
Well, since html and css are visual markup languages, it is always nice to see the problem for ourselves.
The border radius of 10px is not going to round the image that much and still the look the same. But if you increase the pixels you will notice the image start to round more.
Thanks for the response Amir but I don’t think that is the issue because - even when I write the code as above (leaving out the “;” the rounding does happen - it’s just that the rounding is applied to the border, not the image. I thought that the image would be what got rounded so that it would look like this -
an image with rounded borders surrounded by a border that has sharp 90 degree angles.
While I am on the subject, I am wondering why the border is a CSS property. I thought that a border would be something that should be specified within the body tags and the CSS would then be used to style the appearance of the border. That’s the way html works with all the other elements.
which explains why both the border and image are changing.
You also have this note in the lesson. Note: This challenge allows for multiple possible solutions. For example, you may add border-radius to either the .thick-green-border class or the .smaller-image class.
“smaller-image thick-green-border”
So because both class elements are within the same " " that means applying a style to either, affects the other as well?
Well, when I played around with the code I tried taking the thick-green-border out of the img element and placing it in a separate div and got this result.
<div class="thick-green-border"><img class="smaller-image" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></div>
This was an “out of the box” solution though, one I would never have thought of and one that wasn’t even alluded to in the lesson. But it worked great! So the lesson learned here - is that there’s more than one way to skin a cat! Thanks for the time you took with this puzzling aspect of code. Puzzling for me at least.