Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1295769
    applegatetech
    Participant

    Not quite. The image size is too large and the search bar have shifted down.
    I updated the code in one other place on Global CSS and Global Javascript.

    .x-topbar-inner > a img {
        width: 27%;
        min-width: 250px;
        max-width: 250px;
        float: left !important;
        clear: none !important;
    }
    .my-custom-shortcode {
        float: right;
        width: 35%;
    }
    .product-search-form .product-search-field {
        float: left;
        max-width: 270px;
    }
    
    .product-search-form [type="submit"] {
        float: right;
    }
    
    @media screen and (max-width: 959px) {
    .top-menu {
        float: none !important;
        width: 100% !important;
        text-align: center !important;
    }
    .x-topbar-inner > a img {
        float: none !important;
    }
    .my-custom-shortcode {
        float: none !important;
        width: 100% !important;
    }
    .my-custom-shortcode .product-search {
        width: 100% !important;
        float: none !important;
    }
    (function($) {
       $('.x-topbar-inner > a img').insertAfter('.top-menu');
    })(jQuery);

    Thank for the help.

    #1295881
    Joao
    Moderator

    Hi There,

    You can add the following code to Appereance > Customizer > Custom > CSS

    .x-topbar img {
      width: 200px !important;
    }
    

    Hope it helps

    Joao

    #1295968
    applegatetech
    Participant

    That makes the image not a link anymore.

    #1296065
    Jade
    Moderator

    Hi there,

    Please add a class to the <a> tag that wraps the image then update this CSS:

    .x-topbar-inner > a img {
        width: 27%;
        min-width: 250px;
        max-width: 250px;
        float: left !important;
        clear: none !important;
    }

    to

    .x-topbar-inner a.the_class img {
        width: 27%;
        min-width: 250px;
        max-width: 250px;
        float: left !important;
        clear: none !important;
    }

    Hope this helps.

    #1296143
    applegatetech
    Participant

    It works great now. I did this for my _topbar.php file

    ?>
    
    <?php if ( x_get_option( 'x_topbar_display' ) == '1' ) : ?>
    
      <div class="x-topbar">
        <div class="x-topbar-inner x-container max width">
        <a class="topbarlogo" href="http://strictlyseeds.com" target="_blank"><img src="http://strictlyseeds.com/wp-content/uploads/2016/12/StrictlyLogo.png"></a>
          <?php if ( x_get_option( 'x_topbar_content' ) != '' ) : ?>
          <p class="p-info"><?php echo x_get_option( 'x_topbar_content' ); ?></p>
          <?php endif; ?>
          <?php
    
            wp_nav_menu( array(
                'menu'           => 'topbar-menu',
                'container'      => false,
                'menu_class'     => 'x-nav sf-menu',
                'container'       => 'div',
                'container_class' => 'top-menu',
            ) );
          ?>
          <?php x_social_global(); ?>
          <div class="my-custom-shortcode"><?php echo do_shortcode('[woocommerce_product_search submit_button="yes"]'); ?></div>
        </div>
      </div>
    
    <?php endif; ?>

    Under customize I added
    Global CSS

    .x-topbar-inner > a.topbarlogo img {
        width: 27%;
        min-width: 250px;
        max-width: 250px;
        float: left !important;
        clear: none !important;
    }

    and

    @media screen and (max-width: 959px) {
    .top-menu {
        float: none !important;
        width: 100% !important;
        text-align: center !important;
    }
    .x-topbar-inner > a.topbarlogo img {
        float: none !important;
    }
    .my-custom-shortcode {
        float: none !important;
        width: 100% !important;
    }
    .my-custom-shortcode .product-search {
        width: 100% !important;
        float: none !important;
    }

    Global Javascript

    (function($) {
       $('.x-topbar-inner > a.topbarlogo').insertAfter('.top-menu');
    })(jQuery);

    How do I force the link to open in the same window?
    Thanks.

    #1296322
    Friech
    Moderator

    On the _topbar.php file, remove the target="_blank" from the line:

    <a class="topbarlogo" href="http://strictlyseeds.com" target="_blank"><img src="http://strictlyseeds.com/wp-content/uploads/2016/12/StrictlyLogo.png"></a>

    Hope it helps, Cheers!

    #1296410
    applegatetech
    Participant

    Amazing support! Thanks.

    #1296411
    Christopher
    Moderator

    You’re welcome.

  • <script> jQuery(function($){ $("#no-reply-1292240 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>