-
-
Save lordhasyim/1c4b5556d3a9af2505d48e281aabd9fb to your computer and use it in GitHub Desktop.
[Bootstrap] Text overlay center inside the image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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