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.

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

报告相同问题?

悬赏问题

  • ¥20 双层网络上信息-疾病传播
  • ¥50 paddlepaddle pinn
  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 请问这个是什么意思?
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
  • ¥15 模糊pid与pid仿真结果几乎一样