-
AuthorPosts
-
May 14, 2023 at 10:09 am #1407336
I’m wondering if Enfold allows me to add an overlaid image caption that has a solid background color, but is about 20% offside of the image.
An example is located here: https://healthy.kaiserpermanente.org/southern-california/front-door (note. you may need to turn on your VPN for California area if page does not render).
The image I am focusing on is the guy against the tree with the caption “mental health…”Thanks!
May 14, 2023 at 5:13 pm #1407360Hey laptophobo,
Thank you for the link to your demo site, perhaps using a text element and a image element in the same column with Grid CSS would be a good solution:
Try adding the custom class grid-column to a full width column, and add the custom class grid-image-right to the image element inside the column. Then add your text element inside the column but we won’t use a custom class for it.
Add this CSS in your Enfold Theme Options ▸ General Styling ▸ Quick CSS field:@media only screen and (min-width: 768px) { .grid-column { display: grid; grid-template-columns: repeat(12,1fr); grid-template-rows: auto; grid-column-gap: 1pc; -webkit-box-align: center; -ms-flex-align: center; align-items: center; } .grid-image-right { display: grid; grid-column-start: 4; grid-column-end: span 9; grid-row: 1; } .grid-column .av_textblock_section { display: grid; grid-column-start: 1; grid-column-end: span 5; grid-row: 1; padding: 8%; color: #000; background-color: #eee; z-index: 1; } }
and adjust the colors to suit.
Now below 767px, for mobile the image and text will be stacked:
and for tablet and above the text offset will be consistent:
I tried to do this with the image caption but it didn’t work well with the image element structure and the caption field doesn’t allow HTML and buttons easily like the text element so this may be more useful.Best regards,
MikeMay 14, 2023 at 5:13 pm #1407359Hey laptophobo,
Thank you for the link to your demo site, perhaps using a text element and a image element in the same column with Grid CSS would be a good solution:
Try adding the custom class grid-column to a full width column, and add the custom class grid-image-right to the image element inside the column. Then add your text element inside the column but we won’t use a custom class for it.
Add this CSS in your Enfold Theme Options ▸ General Styling ▸ Quick CSS field:@media only screen and (min-width: 768px) { .grid-column { display: grid; grid-template-columns: repeat(12,1fr); grid-template-rows: auto; grid-column-gap: 1pc; -webkit-box-align: center; -ms-flex-align: center; align-items: center; } .grid-image-right { display: grid; grid-column-start: 4; grid-column-end: span 9; grid-row: 1; } .grid-column .av_textblock_section { display: grid; grid-column-start: 1; grid-column-end: span 5; grid-row: 1; padding: 8%; color: #000; background-color: #eee; z-index: 1; } }
and adjust the colors to suit.
Now below 767px, for mobile the image and text will be stacked:
and for tablet and above the text offset will be consistent:
I tried to do this with the image caption but it didn’t work well with the image element structure and the caption field doesn’t allow HTML and buttons easily like the text element so this may be more useful.Best regards,
MikeMay 15, 2023 at 5:31 am #1407417thank you Mike!
After sending off the topic request I came upon a similar solution using grid. But I like the way yours looks too, so I’ll give it a gry and see how it turns out.Richard
May 15, 2023 at 11:41 am #1407433Hi,
Glad to hear, let us know if this helped and we will close this thread.Best regards,
MikeMay 15, 2023 at 12:01 pm #1407437I just finished replacing your version of the caption overlay with mine. Much more stable and looks great. (I swapped out the text-element with a magazine element. Still looks great.) :-)
You can close this thread now.
May 15, 2023 at 7:04 pm #1407469Hi,
Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.Best regards,
Mike -
AuthorPosts
- The topic ‘Applying an aside caption’ is closed to new replies.