Support » Theme: DevDmBootstrap3 » Adding a container Div around dropdown menu

  • Resolved Chris-Kay


    First of thanks for the template. It’s a great clean template to start building on.

    I would like to add a container div around the Dropdown menu ul so I can stretch it to full page width.

    I figured in wp_bootstrap_navwalker.php by changing line 24
    $output .= “\n$indent<ul role=\”menu\” class=\” dropdown-menu\”>\n”;
    $output .= “\n$indent<div class=\”dropdown-container\”>\n$indent<ul role=\”menu\” class=\” dropdown-menu\”>\n”;

    It works but the dropdown-container div is not getting closed off. I can’t figure out the code where you close the html tags since the ul and li are getting closed. I have limited knowledge of PHP so your assistance would be much appreciated.

    Thanks in advance.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Theme Author DevDm


    Hey Chris,

    I think you went the hard way on that one.

    You want the navbar below the header to span the length of the page? Do I have that right?

    Hey DevDM,

    Thanks for getting back to me so quick. To answer your question no, not really.

    I have the main nav in a Container. I want the dropdown background to span the full width of the page (outside the parent nav container) with the dropdown ul as a container so it get centered. Only way to achieve that is to put a wrapping container around the dropdown ul and the have the ul with margin: 0 auto center within. Hence my necessity to add a wrapping container div and then have it close again after the dropdown ul tag is closed.

    Hope you understand.

    Sry double post

    Theme Author DevDm


    I see what you are after here and honestly I’ve not encountered this request before so it is new on me.

    I’m digging into the nav-walker to see if I can get you a solution but I’m out of time for today.

    Here is a link to the github project. The author is a really cool guy and could probably answer this quickly for you.

    Ok thanks, will take a look.

    Theme Author DevDm


    Let me know what you come up with 🙂 I’ll be curious.

    Theme Author DevDm



Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Adding a container Div around dropdown menu’ is closed to new replies.