HTML
<div class="wrapper"> <img src="" class="image" /> <p class="text">Hello world!</p> </div>
CSS
.wrapper { position: relative; width: 500px; } .image { position: absolute; display: block; left:0; bottom: 0; } .text { position: absolute; right:0; bottom: 0; }
EDIT: I added the appropriate HTML code.
EDIT 2: In case the wrapper height is unknown (only limitation is that .image should always be higher than .text)
CSS
.wrapper { position: relative; width: 500px; } .image { vertical-align: bottom; } .text { position: absolute; right: 0; bottom: 0; }
HTML
<div class="wrapper"> <img class="image" src="" /> <p class="text"> Hello world! </p> </div>
source share