简体   繁体   中英

Prevent Jquery-UI from changing styles in bootstrap nav-bar

I have built this menu with bootstrap. There is a dropdown menu that has a picture in it and next to it is a dropdown menu. On smaller resolutions, this dropdown menu arrow changes shape to a box. I want it to retain the shape of an arrow. However, something in Jquery-ui.js file is causing it to change shape on smaller resolutions. How can I prevent the jquery-ui from affecting the arrow shape? Here is the code and attached are the snapshots

Arrow shape before and after resizing

 <nav class="navbar 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" href="market.html"><img src="images/logo-inner.jpg"/ alt="B-Hive: Expand your business"></a> </div> <!-- Collect the nav links, forms, and other content for toggling --> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <!-- Form search start --> <form class="navbar-form navbar-left" role="search" class="top-search-padding"> <div class="form-group"> <div class="search-div ui-widget" > <input id="tags" type="text" class="txt-search" placeholder="Search people, products and services"> <button type="submit" class="btn-search"><img src="images/search-icon.png"/></button> </div> </div> </form> <!-- Form search end --> <ul class="nav navbar-nav navbar-right"> <li class="top-menu-links"><a href="#">MARKET</a></li> <li><a class="top-menu-links" href="#">EXHIBITIONS</a></li> <li><a class="top-menu-links" href="#">MESSAGES</a></li> <li><a class="top-menu-links" href="#">DASHBOARD</a></li> <li class="profile-pic-padding"></li> <li class="dropdown"> <a href="#" class="dropdown-toggle custom-dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><img alt = "" class=" img-profile-pic img-circle" src="images/profile-pic.fw.png"/> <span class="caret"></span></a> <ul class="dropdown-menu"> <li><a href="#">Account</a></li> <li><a href="#">Privacy</a></li> <li><a href="#">Cart</a></li> <li role="separator" class="divider"></li> <li><a href="#">Switch Accounts</a></li> <li role="separator" class="divider"></li> <li><a href="#">Language <span class="caret"></span></a> <ul class="dropdown-menu"> <li><a href="#">EN</a></li> <li><a href="#">ع</a></li> </ul> </li> </ul> </li> </ul> </div> <!-- /.navbar-collapse --> </div> <!-- /.container-fluid --> 

将css设置为!important ,则不能覆盖它

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM