I have a background image which is getting scaled,
but the problem is it is getting stretched and looking uglier when looked at smaller resolutions.
.bcg {
background-position: center center;
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
height: 100%;
width: 100%;
}
/* Slide 1 */
#slide-1 .bcg {background-image:url('../img/bcg_slide-1.png');
background-size: 100% 100%}
HTML Markup
<section id="slide-1" class="homeSlide">
<div class="bcg">
<div class="hsContainer">
<div class="hsContent">
<h2>Hello1</h2>
</div>
</div>
</div>
</section>
If i use background-size: 100% auto;
then its not perfectly fitting the entire window
. Is there any solution to make the background-image
inside a div perfect for all resolutions
and sizes
.