• kevin0622

    (@kevin0622)


    Hello,

    I have a problem with my search bar in the mobile view. The width is very low (the search bar sticks to the right) and I want it to be stretched (centered) like in the normal view. My previous developer left me a js code but I don’t know how edit it accordingly.

    function calcSearchBarWidth(){
    
            var mobile = checkMobileHeader();
            var adjustment = 150;
    
            var wTopbar = 0;
            if(mobile) {
                wTopbar = $('.mobile-header-bar').width();
                adjustment = 180;
            }
            else {
                wTopbar = $('.header-bar').width();
                var adjustment = 150;
            }

    Any help is appreciated!

    Best regards,
    Kevin

    • This topic was modified 4 years ago by t-p. Reason: Code formatted
    • This topic was modified 4 years ago by t-p.
Viewing 1 replies (of 1 total)
  • Moderator t-p

    (@t-p)

    I recommend asking at your theme’s dedicated support so the theme’s developers and support community can help you with this.

Viewing 1 replies (of 1 total)
  • The topic ‘Search bar mobile width problems’ is closed to new replies.