Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #526583

    I’m trying to add a phone number widget to the upper right of the header of a site I’m working on for a client. The main menu is set beneath the logo, so I’m using this code

    add_action( ‘ava_main_header’, ‘enfold_customization_header_widget_area’ );
    function enfold_customization_header_widget_area() {
    dynamic_sidebar( ‘header’ );
    }

    in the functions.php, as recommended here:
    http://kriesi.at/documentation/enfold/adding-a-widget-area-to-the-header/

    However, the widget is creating a large space above the logo, and is hugging the right side of the browser, rather than staying in the parameters of the container. What custom css should I use to get the widget to appear on the same level as the logo on the right hand side?

    #526711

    Hi I need the same thing but to have the widget on the left side of the logo (at the same height of the social media icons on the right…)

    #527727

    Hi!

    we need a link where we can see the issue with your header widget, because we need to inspect the elements. Let us know when you are ready.

    Best regards,
    Andy

    #527736

    Here you go

    #528254

    Hi,

    Please try the following in Quick CSS under Enfold–>General Styling:

    #header .widget {
        position: absolute;
        right: 40px;
    }

    Thanks,
    Rikard

    #528279

    Halfway there! It’s still hugging the far right of the browser instead of staying withing the boundaries of the inner container. I think it would have to be inside the same inner container as the logo in order to do that. How could I achieve that?

    See private info:

    #529271

    Hey!

    your website looks pretty much the same as in your screenshot. So could you fix it already? if not can you show us exactly what you are trying to achieve please? then we can provide you some precise CSS code.

    Best regards,
    Andy

    #529691

    I used this in the functions.php:

    add_action( ‘ava_after_main_menu‘, ‘enfold_customization_header_widget_area’ );
    function enfold_customization_header_widget_area() {
    dynamic_sidebar( ‘header’ );
    }

    And then I used this css to line it up properly:

    #header .widget {
    position: absolute;
    right: 50px;
    top: -120px;
    }

    Seems like a sloppy solution to me, but it was the only way I could keep it lined up. Unless you have a better solution…

    #530252

    Hi!

    No, that would be the solution we would provide :)
    Glad you figured it out! Let us know if you have any other questions or issues

    Best regards,
    Yigit

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.