css - Space between images grows on browser shrink -
i have images smaller browser size does. works me images smaller space between them gets bigger. when browser @ smallest, space between images size of image.
if resize browser down smallest see media queries kick in , see mean.
ive tried many things ive lost track.
ive tried replicating in fiddle requires of code so, can offer link page http://www.techagesite.com/page-1work1112211.htm
.top_grow{ display:inline-block; vertical-align:top; font-size:0; margin:0 auto; overflow:hidden; white-space:nowrap; } .cats {width:100%; height:100%; display:block; font-size:0; } .text{ font-size:11px; letter-spacing:1px; word-spacing:1px; } <div class="top_grow"> <a href="http://www.techagesite.com/hd-wii-wallpapers-mario-kart-super-mario-galaxy-2.htm"> <img class="cats" src="http://freephonewallpapersformobile.files.wordpress.com/2014/05/super-mario-galaxy-hd-desktop-background_small1.jpg"></img> <div class="text"> mario galaxy </div> </a> </div>
it looks though images being spaced out space character. space character not have fluid width.
the solution use floats.
something like
.holder { width: 100%; } .img-holder { float: left; margin-right: 3%; width: 22%; height: 100px; background-color: #ccc; } img { width: 100%; height: auto; } <div class="holder"> <div class="img-holder"><img src="#" /></div> <div class="img-holder"><img src="#" /></div> <div class="img-holder"><img src="#" /></div> <div class="img-holder"><img src="#" /></div> </div>
this give 4 columns of images variable width gutter.
you need alter suit own purposes, hope sends in right direction.
try out in new file first, apply learn specific issue , should work fine.
Comments
Post a Comment