Tagged: ,

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #481586

    I’m attempting to add a second image to the header. The default image is displayed on the left. The header I would like to add should be displayed on the right.

    I’ve followed this thread https://kriesi.at/support/topic/adding-468-x-60-banner-to-header/

    So I have

    In functions.php

    
    function after_head_image_func(){
    	echo "<div class='custom_content'><img src='_URL_'></div>";
    	
    }
    add_action('ava_main_header', 'after_head_image_func');
    

    And in quick CSS:

    
    .custom_content{
    position: absolute;
    top: 0;
    right: 0;
    }
    @media only screen and (max-width: 768px) {
    #header_main { height: 140px; }
    .custom_content { top: 80px; }}
    

    However the image remains unresponisve, so on smaller screens the image doesn’t resize.

    Any idea what the issue could be?

    Thanks

    #481899

    Hi aztamer!

    Thank you for using Enfold.

    We need to see the actual website. Please post the url here. You can use css media queries to adjust the size of the image on smaller screens.

    Best regards,
    Ismael

    #481939

    Hi Ismael,
    Here is the website URL:

    #483207

    Hey!

    use this code:

    @media only screen and (max-device-width: 736px) {
    .custom_content {
    width: 25%;
    }}
    

    and adjust as needed.

    Best regards,
    Andy

    #483217

    Hi Andy,
    Unfortunately that didn’t seem to help. Maybe I’m missing something obvious

    I now have the following in my style.css child theme:

    .custom_content{
    position: absolute;
    top: 0;
    right:0;
    }
    
    @media only screen and (max-device-width: 736px) {
    .custom_content {
    width: 25%;
    }}
    
    #483219

    Never mind I have now got it working, many thanks for the help, and the excellent theme.

    #483227

    Hi!

    Glad you figured it out!
    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 :)

    Best regards,
    Yigit

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Adding a second responsive header image’ is closed to new replies.