Skip to content

Instantly share code, notes, and snippets.

@maximveksler
Forked from petehouston/markup
Created April 23, 2016 18:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maximveksler/b741216f6350dde7090425f33689b139 to your computer and use it in GitHub Desktop.
Save maximveksler/b741216f6350dde7090425f33689b139 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