javascript - Stretching background of the div -


i need stretch image inside div element.

so on site: http://fishcacher.sytes.net/ there background image enter image description here

for "fc-container" div element:

.fc-container {     background-image:url('../images/bg_1400.png');      background-repeat:no-repeat;       margin:0px;      background-size: cover; } 

i need works http://www.htmlite.com/faqex004.html , inside "fc-container" div element. lot of image hidden below bottom bar.

i tried different ways can't fix that.

appreciate help. lot!

on example site, haven't used css alone create background, they've used wrapper contains image stretched fill whole screen. here's required html code:

<div class="backgroundimagewrapper">     <img class="backgroundimage" src="http://fishcacher.sytes.net/images/bg_1200.png" /> </div> 

and here's css

.backgroundimagewrapper{     position: absolute; /* can position our div precisely */     left: 0; /* move top-left */     top: 0;     z-index: -100; /* make appear behind other elements */     padding: 0; /* make sure don't have white space around edges */     margin: 0;     width: 100%; /* make fill our whole screen */     height: 100%; } .backgroundimage{     width: 100%; /* make image fill whole div */     height: 100%;  } 

that's how they've done on website you've linked. anyway, here's jsfiddle code: http://jsfiddle.net/t2t5m/5/


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -