0

On the front page of my website, i have an image which i want to fit the height of the screen/device, if the device height changes it should responsively reflect this by resizing ( not cropping). How do i achieve this?

I hope i've made sense, see this jsfiddle as an example to what i am trying to achieve.

Tried:

min-height:100%;
min-width:100%;
user1638362
  • 559
  • 2
  • 7
  • 21

1 Answers1

1

Try making it a background and use

 background: url(images/bg.jpg) no-repeat center center fixed; 
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;

Source: http://css-tricks.com/perfect-full-page-background-image/

Djoezz
  • 80
  • 1
  • 9