Block div



  • Hey, everybody, the question is, don't tell me how to cut the size. div so that the image that is in it also decreases rather than cuts. Thank you, everyone.



  • Example

    div {
      display: inline-block;
      border: 2px solid #00f;
    }
    

    img {
    max-width: 100%;
    display: block;
    }

    <div><img src="http://placehold.it/350x150"></div>




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2