Quantcast
Channel: Joomla! Forum - community, help and support
Viewing all articles
Browse latest Browse all 2381

General Questions/New to Joomla! 4.x • Re: Text over image in JCE

$
0
0
That's great, thank you so much. I think option B is the best bet for what I need.
**Option B: Using Custom HTML and CSS**
- Go back to your article or custom module and switch to HTML view in JCE.
- Add the following HTML and CSS snippet around your image code:

----------------------
<div style="position: relative; text-align: center; color: white;">
<img src="your-image-url.jpg" alt="Descriptive Text for Image" style="width: 100%;">
<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 24px; color: white;">
Your Title Here
</div>
</div>
----------------------

- Replace `"your-image-url.jpg"` with the URL of your image.
- Adjust `"Your Title Here"` with your desired text.
- Modify the `font-size` and other styles to suit your preferences.

However, is there any way to have so that the text resizes with the image. The image scales to the size of the window, but the text does not at the moment, and stays the same. Thank you.

Statistics: Posted by williama — Mon Apr 22, 2024 4:15 pm



Viewing all articles
Browse latest Browse all 2381

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>