Skip to content

Instantly share code, notes, and snippets.

@achmiral
Forked from petehouston/markup
Created May 5, 2017 12:19
Show Gist options
  • Select an option

  • Save achmiral/c1f79903112902e371c943204c356d53 to your computer and use it in GitHub Desktop.

Select an option

Save achmiral/c1f79903112902e371c943204c356d53 to your computer and use it in GitHub Desktop.
[Bootstrap] Text overlay center inside the image
<div class="row" id="box-search">
<div class="thumbnail text-center">
<img src="img/cafe.jpg" alt="" class="img-responsive">
<div class="caption">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ab, quisquam?</p>
</div>
</div>
</div>
.thumbnail {
position: relative;
}
.caption {
position: absolute;
top: 45%;
left: 0;
width: 100%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment