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

    Hi All,

    Running the latest Enfold theme over here with a clients site:

    I’ve been able to create a widget in the header (to the right of the logo) using another thread here – above link appears as the block of text called ‘Questions about Impaired Driving…’

    What I’m needing to achieve is to have a SECOND text widget (just like the first) but needs to be to the right of the first Widget. So header of the site would go: LOGO — WIDGET 1 — WIDGET 2 AND have all three tile correctly on mobile devices…

    Functions.php updated to:

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

    CSS updates in the Theme admin I have these set to:

    #header_main .widget {
    float: right !important;
    padding: 10px 0 20px;
    width: 65%;
    }

    #header_main .textwidget {
    line-height: 24px;
    }

    @media screen and (max-width: 768px) {
    #header_main .widget {
    float: left !important;
    width: 100%
    }
    }

    By no means am I an expert, but added this to the the functions file (creates a second widget ok – BUT have no idea what to use for CSS code… unfortunately as-is it just puts it below the first widget :(

    add_action( ‘ava_before_bottom_main_menu’, ‘enfold_customization_header_widget_area’ );
    function enfold_customization_header_widget_area() {
    dynamic_sidebar( ‘header’ );
    dynamic_sidebar( ‘header-two’ );
    }

    #1072923

    Hey valianthosting,

    Thank you for using Enfold.

    What did you add in the “header-two” widget area? currently, we can only see a single widget in the header container. Please add a widget to it so that we can inspect the element and provide the necessary css code.

    Best regards,
    Ismael

    #1072931

    Hi Ismael,
    Thanks for your note! Added in the text the client is wanting: https://keysplease.net/safe/
    As you can see, these are tiering on top of each other – rather than being side by side. Any CSS code suggestions you can provide? Naturally with mobile, ideally it would tile the logo first, then the first block of text, then the second.

    Thanks! ~ Jess

    #1073493

    Hi,

    Thanks for the update.

    Remove this css code..

    #header_main .widget {
        float: right !important;
        padding: 10px 0 20px;
        width: 65%;
    }

    .. then replace it with the following.

    #header_main .widget {
        max-width: 380px;
        width: 40%;
        float: none !important;
        display: inline-block;
        margin-left: 5%;
    }
    
    #header_main #custom_html-2 {
        margin-left: 493px;
    }

    You may need to adjust that code using css media queries or just remove the widget altogether for mobile view.

    // https://www.w3schools.com/css/css_rwd_mediaqueries.asp

    Best regards,
    Ismael

    #1073503

    Hi Ismael,

    Unfortunately doesn’t work – please see the below:

    Second block now lands below the logo (over top of the rotating banner). Thoughts?

    Thanks, Jess

    #1074149

    Hi,

    It looks fine on my end. Please remove the browser cache or toggle the file compression settings after adding that code.

    Best regards,
    Ismael

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