Answers for "css make image size smaller"

4

css image size adjust

squareImage {
  border: 1px solid #ddd;	/* thickness and color of border */
  border-radius: 4px;		/* edge rounding of border */
  width: 150px;				/* width of image (px or % or auto) */
  height: auto;				/* height of image (px or % or auto) */
}
Posted by: Guest on August-15-2020
-2

Scaling Images and Videos css

.container {
  width: 50%;
  height: 200px;
  overflow: hidden;
}

.container img {
  max-width: 100%;
  height: auto;
  display: block;
}
Posted by: Guest on May-03-2020

Browse Popular Code Answers by Language