Created
November 16, 2018 14:22
-
-
Save achraf-jeday/0beee8acb1d63d292b4bf4e28936a8fc to your computer and use it in GitHub Desktop.
How to position text over an image
This file contains hidden or 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="container"> | |
<img src="img_snow_wide.jpg" alt="Snow" style="width:100%;"> | |
<div class="bottom-left">Bottom Left</div> | |
<div class="top-left">Top Left</div> | |
<div class="top-right">Top Right</div> | |
<div class="bottom-right">Bottom Right</div> | |
<div class="centered">Centered</div> | |
</div> | |
/* Bottom left text */ | |
.bottom-left { | |
position: absolute; | |
bottom: 8px; | |
left: 16px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment