dslijian2015 2018-02-14 11:56
浏览 73
已采纳

在Laravel中应用Bootstrap之后,页面已经装箱了

I have two divs on this page, the second div has an iframe in it. It looks, works, feels fine, however, after applying bootstrap css and js, the whole page gets a wrapped look, and everything is stuffed into the middle (see pics attached.) Maybe my other css file has something to do with it?

My css:

* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

html,body,.container {
    height:100%;
}

body {
    margin: 0;
    background: #f7f7f7;
    color: #363636;
    font-family: 'Source Sans Pro', 'Helvetica', 'Arial', sans-serif;
    font-size: 16px;
    line-height: 1.42857143;
}

.logo {
    display: block;
    margin: 30px auto;
}

.form {
    max-width: 400px;
    padding: 20px;
    margin: 30px auto;
}

.form-group {
    margin-bottom: 30px;
}

.form-group label {
    display: block;
}

.form-control {
    margin: 0;
    display: block;
    width: 100%;
    height: 36px;
    padding: 6px 12px;
    font-size: 16px;
    line-height: 1.42857143;
    color: #363636;
    background-color: #ffffff;
    background-image: none;
    border: 1px solid #cccccc;
    border-radius: 0;
    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
    -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
    -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
    transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}

.btn {
    display: block;
    width: 100%;
    margin-bottom: 0;
    font-weight: normal;
    text-align: center;
    vertical-align: middle;
    touch-action: manipulation;
    cursor: pointer;
    white-space: nowrap;
    padding: 9px 22px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    color: #ffffff;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.15);
    background-image: none;
    border: 0;
    height: 50px;
    font-size: 20px;
    line-height: 1.3333333;
    border-radius: 0;
    font-weight: 700;
    -webkit-transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    -o-transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.btn:focus {outline: 0;}
.btn:hover {background-color: #398023;}
.btn:active {
    outline: 0;
    background-image: none;
    -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    -webkit-transform: scale(0.95);
    -ms-transform: scale(0.95);
    -o-transform: scale(0.95);
    transform: scale(0.95);
}

/* Zebra
.btn {background-color: #00a66e;}*/

/* EASI'R */
/*.btn {background-color: #81c074;}*/

/* Skoda */
.btn {background-color: #4ba82e;}

.contentbar {
    /*border: 1px solid red;*/
    width: 100%;
    height: 110px;
}

.mainContent {
    border: 1px solid gray;
    width:100%;
    height:100%;
}

.mainContent iframe {
    /*border: 1px solid green;*/
    width:100%;
    height: 100%;
    /*height:calc(100% - 150px);*/
}

I use the following to apply bootstrap:

<link rel="stylesheet" type="text/css" href="/css/bootstrap/bootstrap.css">
<script src="/js/bootstrap/bootstrap.js"></script>

See here my attached before and after pics. Thanks![enter image description here

enter image description here

  • 写回答

1条回答 默认 最新

  • dsfs587465 2018-02-14 12:00
    关注

    you might using a div with class "container" in html that's why everything is coming center.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog