Tagged: ,

Viewing 24 posts - 1 through 24 (of 24 total)
  • Author
    Posts
  • #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!

    #787580

    Hey 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,
    Rikard

    #787727

    Hello Rikard, I recorded short clip with this card – https://www.youtube.com/watch?v=m4wClxXP8FY
    Thank you!

    #788015

    Hi 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,
    Victoria

    #788029

    Hello 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=0

    #788051

    Hi,

    May you clear your cache and tell me which is the browser that youre using? Because Im using the Chrome and all is working normally.

    Best regards,
    John Torvik

    #788073

    I’m using chrome on windows 8. Cleared cache. My screen is 28 inch

    #788161

    Hi John, here is what I mean – https://www.youtube.com/watch?v=pwAzWLdKsM8

    #788876

    Another issue with this floating image, just spotted that on mobile – https://www.dropbox.com/s/bkn0fmbr2em8vr6/ladycard3.PNG?dl=0

    #789115

    Hi 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,
    Victoria

    #789149

    Thanks Victoria,

    Now it hides behind next section perfectly, thank you!

    #789288

    Hi,

    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,
    Rikard

    #799015

    Hello 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-view

    #799753

    Hi 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,
    Victoria

    #799871

    Hi 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!

    #800129

    Hi 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,
    Victoria

    #800203

    Thanks 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

    #800544

    Hi vadikcoma,

    What happened to the initial solution? It was working fine or not?

    Best regards,
    Victoria

    #800904

    Hello 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

    #801781

    Hi,

    The effect works pretty well on my 1920 x 1080px monitor. On initial load, it looks like the following screenshot.

    1.) http://imgur.com/XwFR8eF

    On scroll

    2.) http://imgur.com/JIUSxDi

    3.) http://imgur.com/oephcIA

    4.) http://imgur.com/lfpe8A7

    Sequence: http://imgur.com/a/hhqsP

    Best regards,
    Ismael

    #802276

    Hello 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

    #802878

    Hi,

    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,
    Ismael

    #803001

    Thank you very much Ismael! Perfect!

    #804368

    Hi,

    Great! Glad it worked. :)

    Best regards,
    Ismael

Viewing 24 posts - 1 through 24 (of 24 total)
  • The topic ‘Make image float together with scrolling text’ is closed to new replies.