-
AuthorPosts
-
May 3, 2017 at 4:29 pm #787233
Hello, is there a way to make image always appear on the screen as I scroll down?
Here is the page – http://ladycard.comadev.noc.lv/ after slider there are block with text on the right and image of card on the left. As I scroll down, image with card disappears above header. I would like this image to be always visible. Is that possible?Thanks!
May 4, 2017 at 5:45 am #787580Hey vadikcoma,
Do you want the whole slider in a fixed position or only the card images? I’m not sure if it would be possible to be honest with you. If possible then please post a screenshot highlighting what you are looking to achieve.
Best regards,
RikardMay 4, 2017 at 11:51 am #787727Hello Rikard, I recorded short clip with this card – https://www.youtube.com/watch?v=m4wClxXP8FY
Thank you!May 4, 2017 at 7:24 pm #788015Hi vadikcoma,
Here is the code you can put in Enfold > General Styling > Quick Css, if it does not work, put into themes/enfold/css/custom.css
.avia-image-container.avia_animated_image.avia-builder-el-3 .avia_image { position: fixed; top: 100px; left: 125px; width: 25%; z-index: 0; } #howtoget .template-page.content.av-content-full.alpha.units { z-index: 100; background-color: #f2f2f2; } #full_slider_1 { z-index: 100; } #register .template-page.content.av-content-full.alpha.units { z-index: 100; background-color: #ededed; }
If you need further assistance please let us know.
Best regards,
VictoriaMay 4, 2017 at 7:48 pm #788029Hello Victoria, it works almost like magic :-)
The only problem – on large screens it cuts next section like hot knife cuts the butter :-)
Screenshot – https://www.dropbox.com/s/mby2xt2h28505oy/ladycard2.JPG?dl=0May 4, 2017 at 9:27 pm #788051Hi,
May you clear your cache and tell me which is the browser that you
re using? Because I
m using the Chrome and all is working normally.Best regards,
John TorvikMay 4, 2017 at 9:58 pm #788073I’m using chrome on windows 8. Cleared cache. My screen is 28 inch
May 5, 2017 at 1:36 am #788161Hi John, here is what I mean – https://www.youtube.com/watch?v=pwAzWLdKsM8
May 6, 2017 at 6:11 pm #788876Another issue with this floating image, just spotted that on mobile – https://www.dropbox.com/s/bkn0fmbr2em8vr6/ladycard3.PNG?dl=0
May 7, 2017 at 5:40 pm #789115Hi vadikcoma,
I think you should hide the image for mobile and for bigger screens you need to add this code:
@media only screen and (min-width: 1280px) { #register, #howtoget { position: relative; z-index: 22; } }
Your Layer Slider has slides of different height, and the image can be seen under the smaller slide on the big screens, you need that slide taller.
Best regards,
VictoriaMay 7, 2017 at 7:21 pm #789149Thanks Victoria,
Now it hides behind next section perfectly, thank you!
May 8, 2017 at 4:25 am #789288Hi,
Great, glad we could help. Please let us know if you should need any further help on the topic or if we can close it.
Best regards,
RikardMay 24, 2017 at 4:31 pm #799015Hello Rikard,
Sorry to bother you with this again, I will really appreciate your help.
Is there a way to make card appear on first load here in normal size – https://www.dropbox.com/s/jta5zrj99c8vsdl/lady-card.jpg
Currently it appears very tiny for a fraction of a second, and then it hides behind top slider, and it starts to appear when you start to scroll. Could be cool to see this card right away as on my screenshot, and begin to scroll as soon as card hit top of port-viewMay 25, 2017 at 7:57 pm #799753Hi vadikcoma,
That’s animation, and it looks buggy. I think it’s better to disable animation for that middle block. It can be done in Advanced Layout Builder.
Best regards,
VictoriaMay 25, 2017 at 11:06 pm #799871Hi Victoria, I’ve managed to solve the flickering issue, however card still appears way higher than expected, is there a way to place it as on my screenshot?
Thank you!
May 26, 2017 at 1:52 pm #800129Hi vadikcoma,
You could use this:
#bonuses .av-styling-no-styling .avia_image { top: 200px; }
But your Layer Slider has slides of different height, which does not make it look good. It should be 640-700px height, than this solution will be fine. Otherwise, you’ll need to use JavaScript to watch the image and control it.
Best regards,
VictoriaMay 26, 2017 at 4:08 pm #800203Thanks Victoria, but it doesnt really work as expected, it apears a bit lower, and when it scrolls its also lower than top of the viewport. If I change top: 800px, so card is visible on the load, it scrolls near the bottom of the page
May 27, 2017 at 3:59 pm #800544Hi vadikcoma,
What happened to the initial solution? It was working fine or not?
Best regards,
VictoriaMay 28, 2017 at 11:33 pm #800904Hello Victoria, initial solution was working fine, but it was hiding card on first load, so that what we are trying to change now – here is short video – https://www.youtube.com/watch?v=pXyxTdUiH9s
May 31, 2017 at 5:05 am #801781Hi,
The effect works pretty well on my 1920 x 1080px monitor. On initial load, it looks like the following screenshot.
On scroll
Sequence: http://imgur.com/a/hhqsP
Best regards,
IsmaelJune 1, 2017 at 1:06 am #802276Hello Ismael, scrolling works perfectly, the only thing I want, is for card to show on initial loading of the page. At the moment when page is loaded, card is hidden behind top slider
Screenshot – https://www.dropbox.com/s/tu78hgnj53nz4xu/lady.JPG?dl=0
Earlier Victoria provided CSS to lower the card:
#bonuses .av-styling-no-styling .avia_image {
top: 200px;
}It does the job, the only problem – that card remains low as you scroll
June 2, 2017 at 6:43 am #802878Hi,
Please adjust the top position.
#bonuses .av-styling-no-styling .avia_image { top: 300px; -webkit-transition: all 0.5s; transition: all 0.5s; }
And then add this code in the functions.php file:
// image position adjustment function ava_custom_script_mod(){ ?> <script> (function($){ function a() { var image = $('#bonuses .av-styling-no-styling .avia_image'), pos = image.scrollTop() + 100, win = $(window).scrollTop(); if(win >= pos) { image.css('top', '100px'); } else { image.css('top', '300px'); } } $(window).on('scroll load', function() { a(); }); })(jQuery); </script> <?php } add_action('wp_footer', 'ava_custom_script_mod');
Best regards,
IsmaelJune 2, 2017 at 1:26 pm #803001Thank you very much Ismael! Perfect!
June 6, 2017 at 7:51 am #804368 -
AuthorPosts
- The topic ‘Make image float together with scrolling text’ is closed to new replies.