Tuesday, 18 November 2014

While adding image make width as same as screen while height scrollable

.img {
  max-width: 100%;
  max-height: 100%;
  height: inherit !important;
}

html {
  background: url(importantwebsite.jpg);
  background-size: 100%;
  /*-webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;*/  
}

No comments:

Post a Comment