Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #634249

    Hey,

    I wonder if you have any smart code for this problem.

    http://www.airlinestaffrates.com

    Scroll down to the Car Rental box
    I have to decrease the height to 335px in order for the search button to be visible on mobile but it does not look good with all this empty space.
    285px is the best height but then the search button is gone on the mobile view.

    Any smart code for this?
    (Car Rental have no idea how to solve this…..)

    Thanks
    Charlotte
    mobile view

    #634604

    Hey Charlotte :)

    Please enable the custom css class field: http://kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/ and then edit your text block element where you inserted your code and give it a custom CSS class and then add following code to Functions.php file in Appearance > Editor

    function av_custom_iframe_height(){
    ?>
     <script>
    jQuery(window).load(function(){
    if ($(window).width() < 990) {
    jQuery(".your-custom-class ifrane").attr("height", "335")
    }
    });
     </script>
    <?php
    }
    add_action('wp_footer', 'av_custom_iframe_height');

    and set the height in your code to 285

    Best regards,
    Yigit

    #635077

    Thanks Yigit :)

    But what code shall I add to the Quick CSS for the Custom Class field?

    #635112

    Hi,

    You should edit your text block element and add “your-custom-class” in Custom CSS field. No need to add any code to Quick CSS field :)

    Best regards,
    Yigit

    #635118

    Sorry, don’t get it.. where do I get ” “your-custom-class” from if I haven’t put a code for it in the Quick Css field?

    #635123

    Hey!

    When you enable custom CSS field, this field should show on your element – http://kriesi.at/documentation/enfold/wp-content/uploads/sites/2/2013/12/blur.jpg. You can simply enter “your-custom-class” (without double quotes) in there. It will only help us to target the correct element. We will not be using it for custom CSS code :)
    If you would like me to look into it, please create a temporary admin login and post it here privately.

    Cheers!
    Yigit

    #635125

    Aha…. ok, I have enter just “your-custom-class” (without the ” ) in the CSS field now but see no difference in the mobile view.

    The other codes has been added to the functions.php file.

    #635129

    Hey!

    Have you set the code to 285? If it still does not work, please create a temporary admin login and post it here privately :)

    Best regards,
    Yigit

    #635158

    Yes, I did..

    Here comes the login

    Thanks :)

    #635179

    Hey Charlotte!

    I realized i made small typo in my code ( ifrane :) ). I changed it to following one

    function av_custom_iframe_height(){
    ?>
     <script>
    jQuery(window).load(function(){
    if (jQuery(window).width() < 990) {
    jQuery(".your-custom-class iframe").attr("height", "335")
    }
    });
     </script>
    <?php
    }
    add_action('wp_footer', 'av_custom_iframe_height');

    and confirmed it does work fine on my iphone. Please review your website now

    Regards,
    Yigit

    #635188

    Aha…. it looks good now!

    Thanks and have a nice day :)

    #635204

    Hi!

    You are welcome Charlotte!
    Thanks, you too have a nice day! :)

    Best regards,
    Yigit

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Mobile view’ is closed to new replies.