1

I have a DIV that has an img element nested inside of it.

<div> <img /> </div>

I gave the DIV a width of 50% and height of 20%. I gave the image a width and height of 100%.

The img takes the 50% width of the parent DIV but doesn't take 20% height...

Why does it not respect the height?

For some reason, the image gets a height of 50% even tho I gave it a height of 20%...

Oxin
  • 63
  • 6

0 Answers0