This response assumes that your markup resembles the following:
.container {
position: relative;
}
p {
position: absolute;
bottom: 0;
padding: 2em;
font-size: 1.5em;
}
<div class="container">
<img src="https://unsplash.it/300/300">
<p>Some text</p>
</div>
Below are a few techniques you can experiment with:
Provide a background for the text...
.container {
position: relative;
}
p {
position: absolute;
bottom: 0;
padding: 2em;
font-size: 1.5em;
background: #ccc;
}
<div class="container">
<img src="https://unsplash.it/300/300">
<p>Some text</p>
</div>
Add a subtle gradient behind the text...
.container {
position: relative;
display: inline-block;
}
.container:after {
content: '';
position: absolute;
top: 50%;
bottom: 0;
left: 0;
right: 0;
background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(255, 255, 255, .6));
}
p {
position: absolute;
bottom: 0;
padding: 2em;
font-size: 1.5em;
z-index: 3;
}
<div class="container">
<img src="https://unsplash.it/300/300">
<p>Some text</p>
</div>
Include a text shadow...
.container {
position: relative;
}
p {
position: absolute;
bottom: 0;
padding: 2em;
font-size: 1.5em;
text-shadow: 0px 0px 5px #ffffff;
}
<div class="container">
<img src="https://unsplash.it/300/300">
<p>Some text</p>
</div>
Larger font size, added weight, uppercased text...
.container {
position: relative;
}
p {
position: absolute;
bottom: 0;
padding: .5em;
font-size: 2em;
text-transform: uppercase;
font-weight: bold;
}
<div class="container">
<img src="https://unsplash.it/300/300">
<p>Some text</p>
</div>
Overlay background behind the text with opacity...
.container {
position: relative;
display: inline-block;
}
p:before {
content: '';
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
background-color: rgba(255, 255, 255, 0.5);
z-index: -1;
}
p {
position: absolute;
bottom: 0;
padding: 1em 2em;
font-size: 1.5em;
left: 0;
right: 0;
z-index: 1;
}
<div class="container">
<img src="https://unsplash.it/300/300">
<p>Some text</p>
</div>