2

I hava A image in a slider. it is responsive but the image is to big.

How can i resize it? (but it has to stay responsive)

   <img src="switch/3.jpg"  class="homeImg">

.homeImg{ width: 100%;

}

  • Possible duplicate of [Resize image proportionally with CSS?](http://stackoverflow.com/questions/787839/resize-image-proportionally-with-css) – Michael Jan 06 '17 at 18:05
  • myabe you can use CSS `cover` ? – Saber Hosney Jan 06 '17 at 18:16
  • can you please copy the slider code? to set image width: 100% you have to set the container width too. Then the image it will be resized to its container – Kenny Amaro Jan 06 '17 at 18:16

1 Answers1

0

You can try using width: 100%; height: auto;. This literally means: set the width of the image to 100% of the page width and maintain its aspect ratio.

Wais Kamal
  • 5,858
  • 2
  • 17
  • 36