multi column dropdown

violet90 asked 8 years ago

Hi... i want to put about 30 cities in a dropdown. could you please help me making a 5 column dropdown in mynavbar? thanks...
Hi violet90, below I share you code with navbar:
<!--Navbar-->
<nav class="navbar navbar-toggleable-md navbar-dark bg-primary">
    <div class="container">
        <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarNav1" aria-controls="navbarNav1" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <a class="navbar-brand" href="#">
            <strong>Navbar</strong>
        </a>
        <div class="collapse navbar-collapse" id="navbarNav1">
            <ul class="navbar-nav mr-auto">
                <li class="nav-item active">
                    <a class="nav-link">Home <span class="sr-only">(current)</span></a>
                </li>
                <li class="nav-item">
                    <a class="nav-link">Features</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link">Pricing</a>
                </li>
                <li class="nav-item dropdown btn-group">
                    <a class="nav-link dropdown-toggle" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a>
                    <div class="dropdown-menu dropdown" aria-labelledby="dropdownMenu1">
                       
                        <div class="container">
             
                            <div class="row">

                                <div class="col-md-2 offset-md-1">
                                    <a class="dropdown-item" href="#">Link</a>
                                    <a class="dropdown-item" href="#">Link</a>
                                    <a class="dropdown-item" href="#">Link</a>
                                    <a class="dropdown-item" href="#">Link</a>
                                    <a class="dropdown-item" href="#">Link</a>
                                    <a class="dropdown-item" href="#">Link</a>
                                </div>

                                <div class="col-md-2">
                                    <a class="dropdown-item" href="#">Link</a>
                                    <a class="dropdown-item" href="#">Link</a>
                                    <a class="dropdown-item" href="#">Link</a>
                                    <a class="dropdown-item" href="#">Link</a>
                                    <a class="dropdown-item" href="#">Link</a>
                                    <a class="dropdown-item" href="#">Link</a>
                                </div>

                                <div class="col-md-2">
                                    <a class="dropdown-item" href="#">Link</a>
                                    <a class="dropdown-item" href="#">Link</a>
                                    <a class="dropdown-item" href="#">Link</a>
                                    <a class="dropdown-item" href="#">Link</a>
                                    <a class="dropdown-item" href="#">Link</a>
                                    <a class="dropdown-item" href="#">Link</a>
                                </div>

                                <div class="col-md-2">
                                    <a class="dropdown-item" href="#">Link</a>
                                    <a class="dropdown-item" href="#">Link</a>
                                    <a class="dropdown-item" href="#">Link</a>
                                    <a class="dropdown-item" href="#">Link</a>
                                    <a class="dropdown-item" href="#">Link</a>
                                    <a class="dropdown-item" href="#">Link</a>
                                </div>

                                <div class="col-md-2">
                                    <a class="dropdown-item" href="#">Link</a>
                                    <a class="dropdown-item" href="#">Link</a>
                                    <a class="dropdown-item" href="#">Link</a>
                                    <a class="dropdown-item" href="#">Link</a>
                                    <a class="dropdown-item" href="#">Link</a>
                                    <a class="dropdown-item" href="#">Link</a>
                                </div>

                            </div>

                        </div>
                        
                    </div>
                </li>
            </ul>
            <form class="form-inline waves-effect waves-light">
                <input class="form-control" type="text" placeholder="Search">
            </form>
        </div>
    </div>
</nav>
Regards

violet90 answered 8 years ago

It was really helpful...thanks a lot

xpoint answered 4 years ago

Hi all,

I need the same but the menu to be expanded, not toggable. Is the a solution?. Because if I use this method in normal menu drop-down it shrinks everything.


Krzysztof Wilk staff commented 4 years ago

Hi!

I'm not sure that I understood you right, did you mean something like this?

https://mdbootstrap.com/snippets/jquery/krzysztof-wilk/2352402#

Best regards


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No