It can be done. A simple way could be to use a <span>. Try tinkering with this code in a sandbox:
<div style="position: relative; width: 300px; height: 200px; background: url('https://images.unsplash.com/photo-1651346860609-205b30c4e10e') no-repeat center/cover;">
<span style="position: absolute; left: 10px; color: white; background-color: rgba(0, 0, 0, 0.5); padding: 5px;"> Your text here </span></div>
In this example:
- The outer div has a background image. It's set to cover the entire div and is positioned in the center.
- The span contains the text you want to overlay on the image. It's positioned absolutely within the div, so you can place it wherever you like by adjusting the top, right, bottom, and left properties.
- The text itself has a white color and is set against a semi-transparent black background (background-color: rgba(0, 0, 0, 0.5)) for better readability. Adjust the rgba values as needed. The 0.5 means the background is half transparent. 0 would mean completely transparent, 1 would be completely opaque.
You can further adjust the positions, dimensions, and styling as needed.
If you have access to your theme editor as an admin then you can set up some classes for this kind of thing. You can see that as one of the things covered in this tutorial:
https://www.howtocanvas.com/theme-editor/text-overlay-parallax
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.