WordPress.org

Forums

Customizr
[resolved] Responsive menu items (5 posts)

  1. jasonkanzler
    Member
    Posted 1 year ago #

    I have been messing around in Chrome's inspector and I can't seem to figure out a solution for this:

    I'm trying to change the default Customizr responsiveness. I changed the menu (with 8 links) to be full width, got rid of the social icons, and gave each menu item width: 12.5% in order to evenly fill the full 100%.

    What I want to do: I'm trying to make it so that when my viewport is less than 800px the menu bar wraps and I get 2 rows of 4 links. Then, when the viewport goes below 500px, I want 4 rows of 2 links.

    I can't for the life of me get the menu items to wrap. Help would be greatly appreciated. The website is jasonkanzler.com

    Edit: It would be helpful if I could find the piece of CSS (or is it a PHP template?) that is causing my menu to disappear at viewport widths below 800px...

  2. rdellconsulting
    Member
    Posted 1 year ago #

    Did you see this:
    http://www.themesandco.com/snippet/media-queries-responsiveness/

    Customizr responsiveness is based on Twitter Bootstrap, so I would recommend you to try to use it rather than hacking core code around. Changing CSS with @media should be achievable.

  3. jasonkanzler
    Member
    Posted 1 year ago #

    @rdellconsulting Yes I have read through that article. I'm aware it's built off the bootstrap framework. I have been trying to change the CSS with @media queries but with no luck. Like I said in the OP, my menu disappears at widths below 800px and I cannot find the CSS that is causing this.

  4. jasonkanzler
    Member
    Posted 1 year ago #

    Did brute force trial and error in Chrome's inspector and figured it out.

    Here's the code I had to add to my child theme's style.css (for those interested):

    @media (max-width: 979px) {
    .nav-collapse .nav > li {
    width: 25%;
    float: left;
    border-right: none;
    }
    .navbar.resp {
    display: block;
    }
    .nav-collapse, .nav-collapse.collapse {
    overflow: visible;
    position: relative;
    right: 0;
    top: 0;
    }
    }

    @media (max-width: 499px) {
    .nav-collapse .nav > li {
    width: 50%;
    }
    }

    Follow up question here.

  5. foamagency
    Member
    Posted 1 year ago #

    Thanks!! This is exactly the piece of code I needed.

    Only one question... My menu bar wraps, but the black icon from the drop-down menu keeps appearing. How do I keep it from showing up?

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic