删除导航中烦人的可折叠滚动条

时间:2019-02-04 07:39:40

标签: html css twitter-bootstrap

我似乎无法取出位于我的可折叠引导程序中导航链接下方的此烦人的水平滚动条。我尝试了“最大宽度:100%;溢出-x:隐藏;”在导航栏的div容器中,“ margin:0;”在body标签中,但什么也没发生,问题仍然存在。

这个问题也只出现在我的标题导航栏中,并且仅在调整窗口大小时出现可折叠显示。

enter image description here

HTML:

Try-
Add in controller function-

$categoryList = Category::getCategories();

and assign the variable in smarty.

$this->smarty->assign(array(
'displayCategoryList' => $categoryList,
                ));
Add in tpl file-

{$displayCategoryList|@print_r}

CSS:

      <div class="wrapper container nav-header">
        <br>

        <nav class="navbar">
          <div class="container-fluid">
            <div class="navbar-header logo">
              <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
              </button>
                <a href="main" class="navbar-left"><img src="img/logo_png_solo.png"></a>
            </div>

          <div class="collapse navbar-collapse" id="myNavbar">
            <ul class="nav navbar-nav navbar-left" id="nav-design">
              <li><a href="main" class="mwc-font-small">Home</a></li>
              <li><a href="about" class="mwc-font-small">About Us</a></li>
              <li><a href="faq" class="mwc-font-small">FAQ</a></li>
              <?php
                // Check Session Credentials and auto-login
                if (isset($_SESSION['usrcustomername'])) {
              ?>
              <li><a href="cards/membership.php" class="mwc-font-small">Membership</a></li>
              <li><a href="cards/list-claimed.php" class="mwc-font-small">Cards</a></li>
              <li><a href="cards/settings-profile.php" class="mwc-font-small">Settings</a></li>

              <?php } ?>
            </ul>

            <div class="text-align-center navbar-nav navbar-right">
              <?php
                // Check Session Credentials and auto-login
                if (isset($_SESSION['usrcustomername'])) {
                  echo($_SESSION['usrcustomername']);
              ?>
                <a href="signout" class="small color-orange spacer-left">SIGN OUT</a>
                <hr>
                <?php
                  $packageid = $_SESSION['usrcustomer_packageid'];

                  if ($packageid == 0) {
                  $ribbon = 'ribbon-guest';
                } else if ($packageid <= 1) {
                  $ribbon = 'ribbon-elite';
                } else if ($packageid == 2) {
                  $ribbon = 'ribbon-premium';
                } else if ($packageid == 3) {
                  $ribbon = 'ribbon-luxury';
                }

                echo('Status: <a href="membership.php"><img src="img/'.$ribbon.'.png" class="small-icon"></a> ');

                  if ($packageid == 0) {
                  echo ('Guest <br/>');
                } else if($packageid == 1) {
                  echo('Elite Member <br/>');
                } else if($packageid == 2) {
                  echo('Premium Member <br/>');
                } else if($packageid == 3) {
                  echo('Luxury Member <br/>');
                }

                if (isset($_SESSION['usrexpirationdays']) <= 0 ) {
                  $packageid == 0;
                } else if ($packageid >= 1) {
                echo(' <small>(Expiry: ' . $_SESSION['usrexpirationdate'] . ', ' . $_SESSION['usrexpirationdays'] . ' days remaining)</small>');
                //echo(' (Expiry: ' . $_SESSION['usrexpirationdate'] . ') </a>' );
                }
                ?>
            </div>
                <?php } else { ?>

            <ul class="nav navbar-nav" id="nav-design">
              <li><a href="cards" class="mwc-font-small">Login</a></li>
              <li><a href="cards/register.php" class="mwc-font-small">Register</a></li>
            <?php } ?>
            </ul>
          </div>
        </nav>
      </div>

      <div id="myCarousel" class="carousel slide" data-ride="carousel">
        <ol class="carousel-indicators">
          <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
          <li data-target="#myCarousel" data-slide-to="1"></li>
          <li data-target="#myCarousel" data-slide-to="2"></li>
        </ol>

        <div class="carousel-inner" role="listbox">
          <div class="item active"><img src="img/banner1.JPG"></div>
          <div class="item"><img src="img/banner2.jpg"></div>
          <div class="item"><img src="img/banner3.JPG"></div>
        </div>

        <!-- Slider Controls -->
        <a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
        <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
        <span class="sr-only">Previous</span>
        </a>

        <a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
        <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
        <span class="sr-only">Next</span>
        </a>
      </div>

<br>
<div class="container">
  <div class="row">
      <div class="col-md-12 text-align-center">
        <h2 class="mwc-font-med">A WEALTH OF DEALS FOR WELLNESS</h2><br>
      </div>

      <div class="col-md-4 col-xs-12">
        <a href="cards/list.php?tn=beauty">
        <div class="hvrbox">
            <img src="img/mwc_beauty.jpg" class="img-responsive hvrbox-layer_bottom">
            <div class=" hvrbox-mwc-orange hvrbox-layer_top hvrbox-layer_slidedown">
            <div class="hvrbox-text">
              <img src="img/icon-beauty-white.png" class="img-responsive">
              <h2>BEAUTY</h2>
            </div>
            </div>
        </div>
        </a>
      </div>

      <div class="col-md-4 col-xs-12">
        <a href="cards/list.php?tn=health">
        <div class="hvrbox">
            <img src="img/mwc_health.jpg" class="img-responsive hvrbox-layer_bottom">
            <div class="hvrbox-mwc-orange hvrbox-layer_top hvrbox-layer_slidedown">
            <div class="hvrbox-text">
              <img src="img/icon-health-white.png" class="img-responsive">
              <h2>HEALTH</h2>
            </div>
            </div>
        </div>
        </a>
      </div>

      <div class="col-md-4 col-xs-12">
        <a href="cards/list.php?tn=wellness">
        <div class="hvrbox">
            <img src="img/mwc_wellness.jpg" class="img-responsive hvrbox-layer_bottom">
            <div class="hvrbox-mwc-orange hvrbox-layer_top hvrbox-layer_slidedown">
                <div class="hvrbox-text">
              <img src="img/icon-wellness-white.png" class="img-responsive">
              <h2>WELLNESS</h2>
            </div>
            </div>
        </div>
       </a>
      </div>
  </div>
</div>

        </div>

0 个答案:

没有答案