asp.net - Bootstrap navbar collapse not formatting correctly -



asp.net - Bootstrap navbar collapse not formatting correctly -

below markup bootstrap navbar - generated code-behind via database - problem right aligned items beingness pushed under rest of menu items until browser width less left aligned items, acts normally.

any ideas did wrong?

thanks

markup

<div class="navbar navbar-inverse navbar-fixed-top"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a href="./" class="navbar-brand">application name</a> </div> <div id="mainnavbar" class="navbar-collapse collapse navbar-responsive-collapse"> <ul class="nav navbar-nav"> <li><a title="return home page" href="javascript:webform_dopostbackwithoptions(new webform_postbackoptions(&quot;ctl00$ctl12&quot;, &quot;&quot;, false, &quot;&quot;, &quot;default&quot;, false, true))">home</a></li> <li><a title="ways contact us" href="javascript:webform_dopostbackwithoptions(new webform_postbackoptions(&quot;ctl00$ctl14&quot;, &quot;&quot;, false, &quot;&quot;, &quot;contactus&quot;, false, true))">contact</a></li> <li class="dropdown"><a class="dropdown-toggle" aria-expanded="false" data-toggle="dropdown" title="latest news" href="#">news<b class="caret"></b></a><ul class="dropdown-menu"> <li><a title="latest news" href="javascript:webform_dopostbackwithoptions(new webform_postbackoptions(&quot;ctl00$ctl20&quot;, &quot;&quot;, false, &quot;&quot;, &quot;news/news&quot;, false, true))">news</a></li> <li><a title="view events" href="javascript:webform_dopostbackwithoptions(new webform_postbackoptions(&quot;ctl00$ctl22&quot;, &quot;&quot;, false, &quot;&quot;, &quot;events&quot;, false, true))">events</a></li> </ul> </li> <li><a title="recommended suppliers" href="javascript:webform_dopostbackwithoptions(new webform_postbackoptions(&quot;ctl00$ctl24&quot;, &quot;&quot;, false, &quot;&quot;, &quot;external&quot;, false, true))">external</a></li> <li class="dropdown"><a class="dropdown-toggle" aria-expanded="false" data-toggle="dropdown" title="property sale" href="#">property<b class="caret"></b></a><ul class="dropdown-menu"> <li><a title="property sale" href="javascript:webform_dopostbackwithoptions(new webform_postbackoptions(&quot;ctl00$ctl30&quot;, &quot;&quot;, false, &quot;&quot;, &quot;property/8&quot;, false, true))">for sale</a></li> <li><a title="property lease" href="javascript:webform_dopostbackwithoptions(new webform_postbackoptions(&quot;ctl00$ctl32&quot;, &quot;&quot;, false, &quot;&quot;, &quot;property/9&quot;, false, true))">for lease</a></li> </ul> </li> <li><a title="local info , services" href="javascript:webform_dopostbackwithoptions(new webform_postbackoptions(&quot;ctl00$ctl34&quot;, &quot;&quot;, false, &quot;&quot;, &quot;content/10&quot;, false, true))">local</a></li> </ul> <ul class="nav navbar-nav navbar-right"> <li><a href="javascript:webform_dopostbackwithoptions(new webform_postbackoptions(&quot;ctl00$ctl37&quot;, &quot;&quot;, false, &quot;&quot;, &quot;secure/landing/2&quot;, false, true))">homeowners</a></li> <li><a runat="server" href="https://oursite.com/hoa3_vendors/secure/landing/2" title="login section vendors only">vendors</a></li> </ul> </div> </div> </div>

=============update================

this seems work current setting, 'just' needs dynamic

class="snippet-code-css lang-css prettyprint-override"> @media screen , (min-width: 790px) { .collapse { display: block; } .navbar-header { display: none; } } @media screen , (max-width: 790px) { .collapse { display: none; } .navbar-header { display: block; } }

did read bootstrap documentation?

i think issue c mainly.

from getbootstrap.com >

overflowing content: since bootstrap doesn't know how much space content in navbar needs, might run issues content wrapping sec row. resolve this, can:

a) cut down amount or width of navbar items.

b) hide navbar items @ screen sizes using responsive utility classes.

c) alter point @ navbar switches between collapsed , horizontal mode. customize @grid-float-breakpoint variable or add together own media query.

asp.net twitter-bootstrap

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -