从bootstrap3.3.6升级到4.0 Beta布局问题对齐问题

时间:2017-11-29 17:36:08

标签: html css asp.net-mvc twitter-bootstrap

在我的布局页面中,我有Header内容和页脚。当我使用bootstrap 3.3.6时,页面中的元素完全对齐。

最近我将bootstrap升级到4.0.0测试版并且我的布局页面的对齐已经消失了

下面我在jsfiddle中发布了这个问题

标题和内容重叠并包装在下一行。

实际上它应该是标题行然后在下一行(没有填充或边距)应该有两个deparment图像,其中Depatment Name在中间的下一行应该从视图渲染主体然后是页脚。

任何帮助将不胜感激。

Here is the link for issue

        <nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
      <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCustom">
        <i class="fa fa-bars fa-lg py-1 text-white"></i>
      </button>
      <div class="navbar-collapse collapse col-md-12" id="navbarCustom">
        <ul class="nav navbar-nav ml-auto">
          <li>
            <a class="nav-link" href="#" style="color:white;">
                                Review Queue
                            </a>
          </li>
          <li>
            <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="color:white;">
              <i class="fa fa-user fa-fw"></i>
            </a>
            <ul class="dropdown-menu" aria-labelledby="navbarDropdown" style="right:0; left: auto; top: 50px;">
              <li>
                Logged In @User.Identity.Name
              </li>
              <li class="divider"></li>
              <li>
                <a href="/Account/Logout"><i class="fa fa-sign-out fa-fw"></i> Logout</a>
              </li>
            </ul>
          </li>
        </ul>
      </div>
    </nav>
    <div class="container-fluid">
      <div class="container-fluid">
        <div class="navbar">
          <div style="width:100%; background-color: #f8f8f8; border-color: #e7e7e7; background-repeat: repeat-x; border-radius: 4px; height:125px;">
            <div class="col-xs-6 col-sm-3">
              <div class="nav navbar-nav navbar-left">
                <a class="navbar-brand" rel="home" href="#" title="NYC Logo">
                  <img src="http://www.altpress.com/images/uploads/news/Hello_Kitty.jpg" alt="Logo1" class="img-rounded" style="height:4em; width: 4em; vertical-align:middle; text-align: center;" />
                </a>
              </div>
            </div>
            <div class="col-xs-6 col-sm-6">
              <div style="text-align : center">
                <h3>My Company's Name</h3>
              </div>
            </div>
            <div class="col-xs-6 col-sm-3">
              <div class="nav navbar-nav navbar-right">
                <a class="navbar-brand" rel="home" href="#" title="My Department">
                  <img src="http://www.altpress.com/images/uploads/news/Hello_Kitty.jpg" alt="Logo2" class="img-rounded" style="height:4em; width: 4em; vertical-align:middle; text-align: center;"/>
                </a>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="container-fluid body-content">
        <section class="content-wrapper main-content clear-fix">
          @RenderBody()
        </section>
      </div>
    </div>
     <footer class="footer">
      <div class="container-fluid">
        <div class="float-left">
          <p style="font-style:normal; color:#9c9c9c;text-align:left; vertical-align:middle;">&copy; @DateTime.Now.Year </p>
        </div>
      </div>
    </footer>

0 个答案:

没有答案