A reader asked if it’s possible to put text on top of an image in WordPress. Actually, the reader asked if it is possible to set an image behind text in WordPress, which is another way to put it.
Either way, the answer is yes! You can do it if you use the WordPress HTML editing window and a little bit of HTML and Cascading Style Sheets (CSS) code. You can watch the video tutorial for this below.
Here’s the code for this example. Paste this into your HTML editing window. Replace the image URL in the example with a URL for an image you want to use, and BOOM!
This HTML and CSS code is basic stuff that works on any web page, not just a WordPress page or post.
You can increase or decrease the height, width and padding values to work with your image. You may need to change the color of the text so it’s readable over the image. This sample text is colored black using the CSS “color:black;” as shown above.
For more about background images and Cascading Style Sheets, see w3schools.com.
This is a Sample Headline
This is sample paragraph text on top of an image. You may need to change the color of the text so it’s readable over the image.
How to Put Text on Top of an Image – or Set an Image Behind Text