css - lining up background image that is a fixed attachment among a grid of similar divs and images -


the fiddle isnt rendering exact grid gives idea of i'm going for. each div has fixed background image. problem each background image defaulting top left corner, after trying reposition image using background-position.

https://jsfiddle.net/hlu7gvo3/

the styling looks this

#thumb1{  background-size: cover;      background-position: center;  background: url("../img/gal1.png");  background-attachment: fixed;  background-repeat: no-repeat; }  .gallerythumb {  color: white;  position: static;  float: left;  width: 33.333vw;  height: 100vh; } 

and html you'd imagine

<div class="gallerythumb" id="thumb2">1</div> 

i tried setting sizing property container didn't much. have clue how center background image within div?


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -