Stack different sized images keeping their size

Description

The following code shows how to stack different sized images keeping their size.

Example


<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='http://code.jquery.com/jquery-1.9.1.js'></script>
<link rel="stylesheet" type="text/css"
  href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">
<script type='text/javascript'
  src="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
</head><!-- w  w w.j  ava  2  s  .  c  o m-->
<body>
  <div class="container">
    <div class="row">
      <div class="col-xs-3">
        <a href="#" class="thumbnail"> <img
          src="http://placehold.it/400x200" />
        </a>
      </div>
      <div class="col-xs-3">
        <a href="#" class="thumbnail"> <img
          src="http://placehold.it/300x150" />
        </a>
      </div>
      <div class="col-xs-3">
        <a href="#" class="thumbnail"> <img
          src="http://placehold.it/400x200" />
        </a>
      </div>
      <div class="col-xs-3">
        <a href="#" class="thumbnail"> <img
          src="http://placehold.it/400x200" />
        </a>
      </div>
      <div class="col-xs-3">
        <a href="#" class="thumbnail"> <img
          src="http://placehold.it/400x200" />
        </a>
      </div>
      <div class="col-xs-3">
        <a href="#" class="thumbnail"> <img
          src="http://placehold.it/300x150" />
        </a>
      </div>
      <div class="col-xs-3">
        <a href="#" class="thumbnail"> <img
          src="http://placehold.it/300x150" />
        </a>
      </div>
      <div class="col-xs-3">
        <a href="#" class="thumbnail"> <img
          src="http://placehold.it/300x150" />
        </a>
      </div>
    </div>
  </div>
  <!-- Post Info -->
  <div
    style='position: fixed; bottom: 0; left: 0; background: lightgray; width: 100%;'>
    About this SO Post <a
      href='http://stackoverflow.com/q/23837562/1366033'>Stack
      different sized images keeping their size</a><br />
    <div>
</body>
</html>

Click to view the demo





















Home »
  Bootstrap »
    Example »




Accordion
Alert
Auto Complete
Badge
Breadcrum
Button
Carousel
Collapse
Dialog
Dropdown
Form
Icon
Jumbotron
Label
Layout
List
List Group
Media
Navigation Bar
Pager
Page Header
Panel
Paragraph
Pills
Popover
ProgressBar
ScrollSpy
Switch
Tab
Table
Thumnail
Tooltip
Tree
Well