html - Bootstrap 3 and Isotope jQuery Image Centering -


i know asked question cant seem find suitable answer particular case.

i want following code show 2 centered images per row.

<!doctype html>  <html>  <head>      <title>james woods</title>      <!-- sets viewport responsive design -->     <meta name = "viewport" content="width=device-width, initial-scale=1.0">      <!-- core bootstrap css -->     <link href = "../css/bootstrap-custom.css" rel ="stylesheet">      <!-- custom site css -->     <link href = "../css/style.css" rel ="stylesheet">      <!-- custom creations css -->     <link href = "create-style.css" rel ="stylesheet">  </head>  <div class="container">          <div class = "panel panel-info">              <div class = "panel-heading">                 <h3 style = "text-align: center;">creations</h3>                  <div class="creations-filter">                      <a href="#all" data-filter="*" class="current">all creations</a>                     <a href="#scratch" data-filter=".scratch">scratch games</a>                     <a href="#games" data-filter=".games">html5/javacript games</a>                     <a href="#apps" data-filter=".apps">web applications</a>                     <a href="#other" data-filter=".other">other</a>                  </div>             </div>              <div class = "panel-body center">               <div class="creations-container">                  <div class="scratch">                     <img src="../img/440x250.jpg" alt="image">                 </div>                   <div class="games">                     <img src="../img/440x250.jpg" alt="image">                 </div>                   <div class="other">                     <img src="../img/440x250.jpg" alt="image">                 </div>                   <div class="games">                     <img src="../img/440x250.jpg" alt="image">                 </div>                   <div class="games">                     <img src="../img/440x250.jpg" alt="image">                 </div>                   <div class="apps">                     <img src="../img/440x250.jpg" alt="image">                 </div>               </div>          </div>        </div> <!-- end container div --> 

this jquery @ end of page

<!-- isotope jquery plugin -->     <script src="../js/isotope.js" type="text/javascript"></script>      <script src = "../js/bootstrap.js"></script>     <script type="text/javascript">      $(window).load(function(){     var $container = $('.creations-container');     $container.isotope({         filter: '*',         animationoptions: {             duration: 750,             easing: 'linear',             queue: false         }     });      $('.creations-filter a').click(function(){         $('.creations-filter .current').removeclass('current');         $(this).addclass('current');          var selector = $(this).attr('data-filter');         $container.isotope({             filter: selector,             animationoptions: {                 duration: 750,                 easing: 'linear',                 queue: false             }          });          return false;         });      });  </script> 

and custom css

.creations-filter {  margin-right: 10px;  color:#666; text-decoration:none; }  .creations-filter a.current {      font-weight:bold; }  .creations-filter {     text-align: center; }  .creations-container {  } img {     margin:5px; }  .isotope-item {     z-index: 2; } .isotope-hidden.isotope-item {     pointer-events: none;     z-index: 1; } .isotope, .isotope .isotope-item {   /* change duration value whatever */      -webkit-transition-duration: 0.8s;     -moz-transition-duration: 0.8s;     transition-duration: 0.8s; } .isotope {     -webkit-transition-property: height, width;     -moz-transition-property: height, width;     transition-property: height, width; } .isotope .isotope-item {     -webkit-transition-property: -webkit-transform, opacity;     -moz-transition-property: -moz-transform, opacity;     transition-property: transform, opacity; } 

thank tries :)

p.s adding jsfiddle: http://jsfiddle.net/gwba8/123/ images supposed 450x260...

here did tweaks may like. unless need single image centered too.

.panel-body {     width: 920px;     margin:auto; } 

http://jsfiddle.net/ergec/gwba8/125/


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -