html - Bootstrap gallery: photos with different heights won't line up -


so i'm attempting make photo gallery using bootstrap, , stuck time being.

first, here github link can view site.

http://torgian.github.io/website-dev

go gallery , change browser width. can see how images different heights, don't seem line properly.

i've spent 7 hours searching , trying different things, no avail. i'm asking on here.

currently i'm still learning html , css, haven't touched javascript yet. find css solution this, if possible.

what achieve similar this: http://www.nasarow-fo-to.com/new-gallery

click on squares on lower right , you'll see gallery pop up: can see trying achieve. nice, row of thumbnails, 3 or 4 across on desktop.

i recommend setting height of of images same value, , keeping width style set auto. after this, set page overflow style break-line, , should aligning properly.

an example of how follows:

body{     overflow: break-line  //break line on content overflow } img{     width: auto;          //set width based on height     height:10%;           //set image hight 10% of page     margin: 20px;         //set margin between images } 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -