Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #499449

    I used the function below (with functionality plugin) to add an image between Logo and the menu in header. But when I scroll down the image don’t adapt to the new header size.

    function after_head_image_func(){
    	echo "<div class='custom_content'><img src='https://logodownload.org/wp-content/uploads/2015/04/WhatsApp-icone-3.png' style='width:40px;height:40px'></div>";
    	
    }
    add_action('ava_main_header', 'after_head_image_func');

    Im developing the website with local server (windows), then I cant create an admin account for access the website but I took two screenshot showing the issue:

    Screenshot

    • This topic was modified 9 years, 2 months ago by Didre.
    #499887

    Hi Didre!

    If you give the image an ID or a class then you can add some extra CSS like so to get it to shrink like everything else.

    .header-scrolled .yourIMG { max-height: 88px; }
    

    Regards,
    Elliott

    #500788

    Hi Elliott!

    Thank you for your help.
    I added an ID for the image and added your code to Quick CSS but didn’t work, nothing changed.
    My new function with including the new ID:

    function after_head_image_func(){
    	echo "<div class='custom_content'><img id='header2' src='https://logodownload.org/wp-content/uploads/2015/04/WhatsApp-icone-3.png' style='height=40px' width='40px'></div>";
    	
    }
    add_action('ava_main_header', 'after_head_image_func');

    Quick CSS:

    .header-scrolled .header2 {
    max-height: 88px;}

    Also, I tried different sizes in max-height but didn’t work too.
    There is a post that appears to be similar to mine:
    https://kriesi.at/support/topic/elements-added-via-the-ava_main_header-acton-are-not-shrinking/

    thanks

    #500948

    Hey!

    please change your Quick CSS code to following one

    .header-scrolled #header2 { max-height: 88px;}

    Best regards,
    Yigit

    #527550

    Sorry for my late answer, it worked perfectly.

    Thank you

    #527558

    Hi!

    You are welcome, we are always happy to help!
    For your information, you can take a look at Enfold documentation here – http://kriesi.at/documentation/enfold/
    And if there are features that you wish Enfold had, you can request them and vote the requested ones here – https://kriesi.at/support/enfold-feature-requests/
    For any other questions or issues, feel free to post them here on the forum and we will gladly try to help you :)

    Have a great weekend!

    Best regards,
    Yigit

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Image in header – size don't change when page scroll down’ is closed to new replies.