0
#leftHalf {
  background:url("img/header/CRC_Website_TopBannerLeftStretch.jpg") repeat scroll 0 0 / 38% 100% hsla(0, 0%, 0%, 0) ;   
   width: 50%;
   position: absolute;
   left: 0px;
   height: 190px;
   z-index:-1;
}
#rightHalf {
   background: url("img/header/CRC_Website_TopBannerRightStretch.jpg");
   width: 41.5%;
   position: absolute;
   right: 0px;
   height: 190px;
   z-index:-1;
   top:0;
}

Now the background image is repeated while I am zoom in. But I want to stretches the right and left top banner image while zoom in and zoom out.

Thanks in advance.

Saiju
  • 350
  • 2
  • 8

2 Answers2

2

Try this:

 background-image:url(../images/header-bannerbg.png);
 background-position:fixed;
 background-repeat:no-repeat;
 height:580px;
 -webkit-background-size: 100% 100%;
 -moz-background-size: 100% 100%;
 -o-background-size: 100% 100%;
 background-size: 100% 100%;
web-tiki
  • 99,765
  • 32
  • 217
  • 249
aashi
  • 492
  • 3
  • 11
0

put the width in percentage in the <img src="" style="width:50%;"> tag.

gomzy
  • 250
  • 1
  • 2
  • 10