.image{/*gotta fix. my boarder is
changing but not the image*/
display: block;
margin-left: auto;
margin-right: auto;
border: 1px solid #ddd;
border-radius: 5px;
padding: 5px;
max-width: 100%;
width: 20%;
height:auto;
object-fit: fill;
I’ve tried style element inline and <style ></style> but neither Methode seem to work. my css code works but not for this line of code for some reason.
2
Answers
I figured it out. So I just deleted two of the div elements leaving one wrapped around all the images and p tag prices, so now the code works thank you guys for helping me.
One reason why your images might not be changing their size to 50px in CSS could be that there is another CSS rule that is overriding the one you have written for sizing the images. You can try using the !important declaration after your CSS rule for the image size to ensure it takes precedence over any other rules that might be affecting it.For example, if you have written:
Another reason could be that the selector you are using in your CSS rule is not targeting the specific images you want to resize. You can check the class or id of the image element and make sure it matches the selector in your CSS code.