I'm working on this solution in flickity (the js slider)
http://codepen.io/djnutron/pen/jWozOv
Upon inspecting the elements, I'm wondering why it is resizing the div surrounding the image. The image is 1900x850. However, somehow the browser is resizing the surrounding div to 1903x848?
Ive tried adding
padding 0 , margin 0, border 0
etc to all divs.
The CSS Code is:
html,
body {
padding: 0;
margin: 0;
height: 100%;
}
div.gallery {
height: 100%
}
* {
box-sizing: border-box;
}
.innerG {
background-image: url('http://lorempixel.com/image_output/animals-q-c-1900-850-2.jpg');
height: 100%;
}
.gallery-cell {
height: 100%;
width: 100%;
padding: 0;
margin: 0;
font-size: 24px;
background: #EEE;
margin-right: 10px;
}
The HTML code is
<div class="gallery js-flickity" data-flickity-options='{"setGallerySize": false,"cellAlign": "center","imagesLoaded": true,"lazyLoad": 1, "freeScroll": false, "wrapAround": true,"autoPlay": 6000,"prevNextButtons": true,"contain" : true,"percentPosition": true,"pageDots": true,"selectedAttraction" : 0.1,"friction": 0.6,"rightToLeft": false,"draggable": true}'
>
<div class="gallery-cell">
<div class="innerG">
<img src="http://lorempixel.com/image_output/animals-q-c-1900-850-2.jpg" />
asdasdasd
</div>
</div>
<div class="gallery-cell">Lorem ipsum dolor sit</div>
</div>
And it is just calling flickity - http://flickity.metafizzy.co/
From this url - http://flickity.metafizzy.co/flickity.pkgd.js
Is this padding or margin causing this?