Home > front end >  Can't resize images in css since i'm working with xampp and php documents
Can't resize images in css since i'm working with xampp and php documents

Time:12-09

HTML:

<div id="shoppingcart">
    <img src="assets/images/cart.png" alt="">
</div>

CSS:

#shoppingcart img { width: 16%; height: 16%; }`

I tried everything I know from creating classes, other id's, divs and changing the code to width or max-width. I just don't know what to do anymore.

CodePudding user response:

Can you better explain the problem you are having? Code works fine.

#shoppingcart img{
width:16%;
height:20vh;
}
<div id="shoppingcart">
    <img src="http://via.placeholder.com/640x360" alt="">
</div>

CodePudding user response:

Make sure not to forget the css link in the header of your HTML file.

  • Related