Tagged: grid row
-
AuthorPosts
-
April 11, 2020 at 5:38 pm #1202971
Hello,
I built a layout using Grid row, in each I added a picture as a background. However, the descriptions in the picture are not visible.How can I apply image background overlay black color and oppacity: 0.8.
April 11, 2020 at 9:57 pm #1202993Hey creativeopole,
Thanks for the link, it looks like your cell “OFERTA” already has a background color and opacity, what are you having trouble with?#top .cs-flex-bg #cs-bg-oferta { width: 100%; height: 100%; background: rgba(0,0,0,0.5)!important; }
Best regards,
MikeApril 12, 2020 at 9:37 am #1203064I would like to add image background overlay for row grid. As in the example of the first column.
April 12, 2020 at 3:46 pm #1203098Hi,
Thanks for the image, I see it is important for the text to be on top of the overlay, is there any on-hover action?
Please try this code in the General Styling > Quick CSS field or in the WordPress > Customize > Additional CSS field:#top.page-id-3906 .flex_cell .overlay { top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.2); position: absolute; z-index: 0; } #top.page-id-3906 .flex_cell .flex_cell_inner { z-index: 10; position: relative; } #top.page-id-3906 .flex_cell.avia-link-column.avia-link-column-hover { opacity: 1; } #top.page-id-3906 .flex_cell.avia-link-column.avia-link-column-hover:hover { opacity: 1 !important; }
Then add this code to the end of your functions.php file in Appearance > Editor:
function custom_overlay_script(){ ?> <script> (function($){ $(document).ready(function(){ $('#top.page-id-3906 .flex_cell').prepend('<div class="overlay"></div>'); }); })(jQuery); </script> <?php } add_action('wp_footer', 'custom_overlay_script');
After applying the css, Please clear your browser cache and check.
Best regards,
MikeApril 12, 2020 at 4:35 pm #1203107The submitted solution does nothing but disable the effect after hovering that you want to stay.
My goal is to put a black background with transparency on the photo set as the background so that the text in the photo is more visible.
After hovering it is best if there was the effect of changing this background to e.g. red (rgb (176, 43, 44)) also with a transparent background.
April 15, 2020 at 1:48 pm #1203976Hi,
Looks like you’ve managed to add the overlay using the following css code.
#top #cs-flex-cell-2 .flex_cell::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.8); }
It also changes to red oh hover. Do you require more help with it?
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.