Tagged: custom page, custom template, layout
-
AuthorPosts
-
August 7, 2014 at 2:43 pm #301129
Hi,
I looked around in this forum but I didn’t find anything about that.I developed a site with your great template but now my customer asked me to put something like a <div> overlay (opacity 0.4) that should cover all the masonry-gallery in the page I posted below.
As you can see there is a little form before and that should be visible, I need to overlay just the gallery, can you tell me where I have to insert my <div> in your code?
I searched a lot but I can’t figure out how the tamplate builder works.
Thanks in advance- This topic was modified 10 years, 4 months ago by maxmanner.
August 8, 2014 at 5:51 am #301458Hi maxmanner!
Thank you for using the theme.
Do you mind providing a screenshot of what you’re trying to do? You can edit config-templatebuilder > avia-shortcodes > masonry_gallery.php.
Best regards,
IsmaelAugust 8, 2014 at 10:31 am #301521Hi,
This is my actual page:http://www.stefanobologna.com/dev/scr1.jpg
and I need to insert an overlay <div> with some text inside of it like this:
http://www.stefanobologna.com/dev/scr2.jpg
It should disappear when you click or scroll down the page.
Can you just put me on the right way?
Thanks
max- This reply was modified 10 years, 4 months ago by maxmanner.
August 9, 2014 at 5:11 pm #302029This reply has been marked as private.August 9, 2014 at 6:13 pm #302032Hi!
The masonry gallery is surrounded already with 2 divs:
class = “avia-builder-el-9”
id = “av-masonry-1”If you go to masonry_gallery.php line 254 you find:
$masonry_html = $masonry->html();
Try to replace this with:
$masonry_html = '<div ....... >'; $masonry_html .= $masonry->html(); $masonry_html .= '</div>';
Regards,
GünterAugust 10, 2014 at 11:06 am #302209Thank you Gunter,
I added your code and it creates the div in the right position but if I add a background-color via css it foes’nt work.
I need to create an overlay effect with some text inside, could it be because of the position?
I’m sorry but I need some more helo if you can.
maxAugust 10, 2014 at 3:38 pm #302238Hey!
Try to change the z-index of this div to a high value and add !important to your CSS settings:
.your_div_class{ z-index: 1000 !important; width: 100% !important; height: 100% !important; }
Cheers!
GünterAugust 10, 2014 at 5:04 pm #302260I did it… but nothing changes.
If I use the Chrome’s developers tools I can see my div with the right css but nothing changes on my page.
It seem like something cover it but neither with a higher z-index it works.
I’m going crazy!
Thank you for your answer aniway,
MaxAugust 11, 2014 at 1:16 am #302336Hey!
This particular request usually falls beyond the scope of support but please remove all your modifications then add this on functions.php:
function script_add() { ?> <script type="text/javascript"> jQuery(window).load(function(){ jQuery( ".av-masonry" ).prepend( "<div class='av-masonry-container-overlay'></div>" ); var masonryh = jQuery('.av-masonry-container').height(); var masonryw = jQuery('.av-masonry-container').width(); jQuery('.av-masonry-container-overlay').css({ width: masonryw, height: masonryh}); jQuery('.av-masonry-container-overlay').click(function() { jQuery('.av-masonry-container-overlay').css({ 'opacity': 0, 'z-index': 0}); }); jQuery(window).scroll(function() { jQuery('.av-masonry-container-overlay').css({ 'opacity': 0, 'z-index': 0}); }); }); </script> <?php } add_action('wp_head', 'script_add');
Add this on Quick CSS or custom.css:
.av-masonry-container-overlay { display: block; position: absolute; z-index: 9000; background: rgba(0,0,0,.5); opacity: 1; }
This should add an overlay on top of the masonry element. Any additional features should be done by yourself or by a freelancer developer.
Regards,
IsmaelAugust 11, 2014 at 10:34 am #302450you’re great. it was more than I ecxpected.
Thank you so much! -
AuthorPosts
- The topic ‘custom page’ is closed to new replies.