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

    I followed your thread’s instructions to add a widget to the header area:

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

    And, added css:
    #header .widget {
    z-index: 1000 !important;
    float:right;
    width:208px;
    margin-right:20px;
    margin-bottom:0;
    }

    But, this pushes my logo down and messes up the responsive behavior by adding the widget over logo. I’ve tried styling the logo container: container av-logo-container and it didn’t work.

    #545765

    Hey ckwellington,

    Please try the following CSS instead:

    #header .widget {
      left: 50%;
      padding-top: 0;
      position: absolute;
      top: 0;
      transform: translate(-50%);
      z-index: 999;
    }

    Cheers!
    Rikard

    #546066

    Ok, thank you for the quick response. I adjusted it to left: 85%; to move it over to rh side. It doesn’t render correctly on mobile. Is there a way to move it under logo for smaller screen size?

    #546262

    Hi,

    Try adding the following to target only mobile screens:

    @media only screen and (max-width: 767px) {
    #header .widget {
      left: 50%;
      padding-top: 0;
      position: absolute;
      top: 0;
      transform: translate(-50%);
      z-index: 999;
    }
    }

    Regards,
    Rikard

    #547272

    I am still seeing it overlap the logo on small screen. What I want is to have the widget info shown on rh side, instead of the center, and have it either under the logo on mobil or removed on mobile. Thank you.

    #547389

    Hi,

    It too big to fit nicely on mobile, it’s going to overlap something almost whatever you do. Not sure if I understood your last post correctly but if you don’t want to show it on mobile you can use the following CSS:

    @media only screen and (max-width: 767px) {
    #header .widget {
    display:none;
    }
    }
    

    Regards,
    Rikard

    #548980

    Works perfect. Thanks for the fast and great support!

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Widget in header’ is closed to new replies.