2

Beginner project - I'm working on something with Bootstrap and have mostly finished building my Navbar. When the Navbar goes into collapsed mode I like the dropdown menu a lot and I want to have it this way at all times.

I cant for the life of me figure out what is even making it change to begin with

The left one is how it looks when it is collapsed, and how I wish to have it at all times (notice how it automatically centers the dropdown here as well): https://i.stack.imgur.com/S4ESB.jpg

I found that if I tweaked the CSS so that the page is always in collapsed mode, the dropdown still has the 2 styles and changes where collapsed mode used to kick in

Apologies - beginner here, new to StackOver flow as well, hope this makes sense to someone :) cheers

<nav class="navbar-fixed-top navbar-default">
        <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand cornerlogo" href="/">
                <img class="logo" alt="Brand" src="/img/Logo1.png">
            </a>
            <!--<p class="navbar-brand centerme">Current Client Name</p>-->
            <ul class="nav navbar-nav navbar-default centerme">
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Current Client Name <span class="caret"></span></a>
                    <ul class="dropdown-menu dropdown-menu-right scrollable-menu">
                        <li class="newclient"><a href="\NewClient.php">New Client</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="#">client1</a></li>
                        <li><a href="#">client2</a></li>
                        <li><a href="#">client3</a></li>
                    </ul>
                </li>
            </ul>
        </div>


        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">


            <!--******************php if statement here to check if client selected-->  
                <form class="navbar-form navbar-right">
                    <button type="submit" class="btn btn-default">New SABR</button>
                    <button type="submit" class="btn btn-default">Edit Client</button>
                <!--</form>-->
                <!--<form class="navbar-form navbar-right">-->

                </form>
        </div><!-- /.navbar-collapse -->
        </div><!-- /.container-fluid -->

    </nav>

I dont know how to properly show my css, but not sure its relevant as even if i disable ALL CSS on the page the behavior is the same

bdot
  • 51
  • 4
  • http://stackoverflow.com/questions/18896591/make-bootstrap-3-0-navbar-content-always-collapsed is what you seek no ? – Blag Nov 13 '16 at 21:07
  • Please post a **minimal working example** of your code (HTML/CSS/JS) in a [Snippet](https://blog.stackoverflow.com/2014/09/introducing-runnable-javascript-css-and-html-code-snippets/). See [mcve] and [ask]. – vanburen Nov 13 '16 at 21:40
  • @Blag the last comment on the thread you linked helpd out big time. Thank you!! – bdot Nov 13 '16 at 22:22

0 Answers0