WordPress.org

Forums

Customizr
[resolved] Lost responsiveness on navbar (5 posts)

  1. deputy05
    Member
    Posted 1 year ago #

    I am extremely new to all of this (day 4), so please keep this in mind. I am working with a child theme and the site is not public yet.

    I changed the widths of my logo and navbar to span4 and span8 respectively (see code below for reference). When resizing my browser, I have lost responsiveness of the navbar between 767 and 979 px. I tried to fix this in the stylesheet but apparently am not making the proper arguments. Any assistance would be greatly appreciated.

    code below:

    /* CHANGE LOGO AND NAVBAR WIDTHS */
    
    add_filter('tc_navbar_display', 'new_navbar_display');
    function new_navbar_display($output) {
    return preg_replace('|navbar-wrapper clearfix span9|', 'navbar-wrapper clearfix span8', $output);
    }
    
    add_filter('tc_logo_text_display', 'new_brand_display');
    add_filter('tc_logo_img_display', 'new_brand_display');
    function new_brand_display($output) {
    return preg_replace('|span3|', 'span4', $output);
    }

    Thank you.

  2. deputy05
    Member
    Posted 1 year ago #

    Further information:

    After further attempts to correct this, it is now happening between 844 and 1076 px...maybe I was mistaken the first time, I don't know.

    @media arguments in stylesheet become numerous to keep this moving fluidly...hoping a better solution is available. Maybe, I just need to undo the original change...but the left side of the logo (290x90) was being chopped off on 4:3 displays.

  3. deputy05
    Member
    Posted 1 year ago #

    Update:

    Used the following code in stylesheet and it appears to work fairly well.

    /* ADJUST RESPONSIVENESS FOR NAVBAR SPAN ADJUSTMENT */
    @media (max-width: 979px) and (min-width: 768px){
    .navbar.resp {
    width: 144%;
    }
    }

    Anyone see any problems with any of this?

    Thank you.

  4. d4z_c0nf
    Member
    Posted 1 year ago #

    Mah :), there's nothing wrong in it.
    Anyway a link to your would be useful.

  5. deputy05
    Member
    Posted 1 year ago #

    Thanks d4z_c0nf.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags