Bootstrap snippet and html example. Gallery of images

Bootstrap 3.3.6 snippet "Gallery of images" with HTML, CSS, and JS. Copy, paste, and customize this responsive UI component for your project.
Tags: gallery,images

HTML code

Clean, semantic HTML that powers this Bootstrap 3.3.6 snippet. Copy and paste it into your page (with Bootstrap loaded) to reproduce the exact layout shown in the preview.

<div class="container">
<div class="portfolioContainer">
    <div class="col-sm-6 col-lg-3 col-md-4 webdesign illustrator">
        <div class="gal-detail thumb">
            <a href="#" class="image-popup" title="Screenshot-1">
                <img src="https://www.bootdey.com/image/400x280/00BFFF/000000" class="thumb-img" alt="work-thumbnail">
            </a>
            <h4 class="text-center">Gallary Image</h4>
            <div class="ga-border"></div>
            <p class="text-muted text-center"><small>Photography</small></p>
        </div>
    </div>

    <div class="col-sm-6 col-lg-3 col-md-4 graphicdesign illustrator photography">
        <div class="gal-detail thumb">
            <a href="#" class="image-popup" title="Screenshot-2">
                <img src="https://www.bootdey.com/image/400x280/00BFFF/000000" class="thumb-img" alt="work-thumbnail">
            </a>
            <h4 class="text-center">Gallary Image</h4>
            <div class="ga-border"></div>
            <p class="text-muted text-center"><small>Photography</small></p>
        </div>
    </div>

    <div class="col-sm-6 col-lg-3 col-md-4 webdesign graphicdesign">
        <div class="gal-detail thumb">
            <a href="#" class="image-popup" title="Screenshot-3">
                <img src="https://www.bootdey.com/image/400x280/DC143C/000000" class="thumb-img" alt="work-thumbnail">
            </a>
            <h4 class="text-center">Gallary Image</h4>
            <div class="ga-border"></div>
            <p class="text-muted text-center"><small>Photography</small></p>
        </div>
    </div>

    <div class="col-sm-6 col-lg-3 col-md-4 illustrator photography">
        <div class="gal-detail thumb">
            <a href="#" class="image-popup" title="Screenshot-4">
                <img src="https://www.bootdey.com/image/400x280/6495ED/000000" class="thumb-img" alt="work-thumbnail">
            </a>
            <h4 class="text-center">Gallary Image</h4>
            <div class="ga-border"></div>
            <p class="text-muted text-center"><small>Photography</small></p>
        </div>
    </div>

    <div class="col-sm-6 col-lg-3 col-md-4 graphicdesign photography">
        <div class="gal-detail thumb">
            <a href="#" class="image-popup" title="Screenshot-5">
                <img src="https://www.bootdey.com/image/400x280/00BFFF/000000" class="thumb-img" alt="work-thumbnail">
            </a>
            <h4 class="text-center">Gallary Image</h4>
            <div class="ga-border"></div>
            <p class="text-muted text-center"><small>Photography</small></p>
        </div>
    </div>

    <div class="col-sm-6 col-lg-3 col-md-4 webdesign photography">
        <div class="gal-detail thumb">
            <a href="#" class="image-popup" title="Screenshot-6">
                <img src="https://www.bootdey.com/image/400x280/00008B/000000" class="thumb-img" alt="work-thumbnail">
            </a>
            <h4 class="text-center">Gallary Image</h4>
            <div class="ga-border"></div>
            <p class="text-muted text-center"><small>Photography</small></p>
        </div>
    </div>

    <div class="col-sm-6 col-lg-3 col-md-4 illustrator photography graphicdesign">
        <div class="gal-detail thumb">
            <a href="#" class="image-popup" title="Screenshot-7">
                <img src="https://www.bootdey.com/image/400x280/008B8B/000000" class="thumb-img" alt="work-thumbnail">
            </a>
            <h4 class="text-center">Gallary Image</h4>
            <div class="ga-border"></div>
            <p class="text-muted text-center"><small>Photography</small></p>
        </div>
    </div>

    <div class="col-sm-6 col-lg-3 col-md-4 graphicdesign photography webdesign">
        <div class="gal-detail thumb">
            <a href="#" class="image-popup" title="Screenshot-8">
                <img src="https://www.bootdey.com/image/400x280/FF8C00/000000" class="thumb-img" alt="work-thumbnail">
            </a>
            <h4 class="text-center">Gallary Image</h4>
            <div class="ga-border"></div>
            <p class="text-muted text-center"><small>Photography</small></p>
        </div>
    </div>

    <div class="col-sm-6 col-lg-3 col-md-4 webdesign illustrator">
        <div class="gal-detail thumb">
            <a href="#" class="image-popup" title="Screenshot-9">
                <img src="https://www.bootdey.com/image/400x280/9932CC/000000" class="thumb-img" alt="work-thumbnail">
            </a>
            <h4 class="text-center">Gallary Image</h4>
            <div class="ga-border"></div>
            <p class="text-muted text-center"><small>Photography</small></p>
        </div>
    </div>

    <div class="col-sm-6 col-lg-3 col-md-4 photography graphicdesign">
        <div class="gal-detail thumb">
            <a href="#" class="image-popup" title="Screenshot-10">
                <img src="https://www.bootdey.com/image/400x280/E9967A/000000" class="thumb-img" alt="work-thumbnail">
            </a>
            <h4 class="text-center">Gallary Image</h4>
            <div class="ga-border"></div>
            <p class="text-muted text-center"><small>Photography</small></p>
        </div>
    </div>

    <div class="col-sm-6 col-lg-3 col-md-4 graphicdesign photography">
        <div class="gal-detail thumb">
            <a href="#" class="image-popup" title="Screenshot-11">
                <img src="https://www.bootdey.com/image/400x280/FF1493/000000" class="thumb-img" alt="work-thumbnail">
            </a>
            <h4 class="text-center">Gallary Image</h4>
            <div class="ga-border"></div>
            <p class="text-muted text-center"><small>Photography</small></p>
        </div>
    </div>

    <div class="col-sm-6 col-lg-3 col-md-4 webdesign graphicdesign illustrator">
        <div class="gal-detail thumb">
            <a href="#" class="image-popup" title="Screenshot-12">
                <img src="https://www.bootdey.com/image/400x280/1E90FF/000000" class="thumb-img" alt="work-thumbnail">
            </a>
            <h4 class="text-center">Gallary Image</h4>
            <div class="ga-border"></div>
            <p class="text-muted text-center"><small>Photography</small></p>
        </div>
    </div>

</div>
</div>

CSS code

Scoped CSS that styles the component. Paste it after Bootstrap 3.3.6 to keep the design, spacing, and responsiveness consistent.

body{margin-top:20px;
background:#eee;
}

/* ===========
   Gallery
 =============*/
.portfolioFilter a {
  -moz-box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
  -moz-transition: all 0.3s ease-out;
  -ms-transition: all 0.3s ease-out;
  -o-transition: all 0.3s ease-out;
  -webkit-box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
  -webkit-transition: all 0.3s ease-out;
  box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
  color: #333333;
  padding: 5px 10px;
  display: inline-block;
  transition: all 0.3s ease-out;
}
.portfolioFilter a:hover {
  background-color: #228bdf;
  color: #ffffff;
}
.portfolioFilter a.current {
  background-color: #228bdf;
  color: #ffffff;
}
.thumb {
  background-color: #ffffff;
  border-radius: 3px;
  box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
  margin-top: 30px;
  padding-bottom: 10px;
  padding-left: 10px;
  padding-right: 10px;
  padding-top: 10px;
  width: 100%;
}
.thumb-img {
  border-radius: 2px;
  overflow: hidden;
  width: 100%;
}
.gal-detail h4 {
  margin: 16px auto 10px auto;
  width: 80%;
  white-space: nowrap;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gal-detail .ga-border {
  height: 3px;
  width: 40px;
  background-color: #228bdf;
  margin: 10px auto;
}

Similar snippets

Bootstrap example and template. collage gallery

collage gallery

Bootstrap example and template. Image gallery with effects

Image gallery with effects

Bootstrap example and template. image post gallery like facebook

image post gallery like facebook

Bootstrap example and template. gallery item

gallery item

Bootstrap example and template. Social network login with buttons

Social network login with buttons

Bootstrap example and template. Angle buttons

Angle buttons

Bootstrap example and template. social network dashboard count

social network dashboard count

Bootstrap example and template. about me Login Style

about me Login Style

FAQ

How do I use this snippet?

Include Bootstrap 3.3.6, paste the HTML, add the CSS block, and include the JS (if any) to mirror the live preview.

Can I use it in commercial projects?

Yes. It’s free for personal and commercial work; check the snippets license for details.

Is it responsive?

Yes. It inherits the responsive grid and components from Bootstrap 3.3.6.

Bootstrap example and template. Gallery of images

About this bootstrap example/template

Optimized for copy‑paste: clean HTML, scoped CSS, and minimal JS so you can ship production‑ready UI faster and keep designs consistent.

Mobile‑first and responsive by default. Tested across modern browsers to reduce polish time on your project.

Already trusted in 12.5K+ views. Reuse this snippet to speed up landing pages, dashboards, or onboarding flows.

Bootstrap 3.3.6

<link rel='stylesheet' href='https://netdna.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css'>

<script src='https://netdna.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js'></script>

This code example is based on bootstrap 3.3.6 and the grid system of this framework

Responsive

Based on bootstrap framework makes all the layouts perfectly responsive for all devices

Crossbrowser compatibility

Tested on all major browsers, it works smoothly on all of them

semantic html 5

Built on html / css3 the code quality is really amazing

Simple Integration

This code example can be simply integrated on existing sites and new ones too, all you need to do is copy the code and start working