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 乌班图ip地址配置及远程SSH
  • ¥15 怎么让点阵屏显示静态爱心,用keiluVision5写出让点阵屏显示静态爱心的代码,越快越好
  • ¥15 PSPICE制作一个加法器
  • ¥15 javaweb项目无法正常跳转
  • ¥15 VMBox虚拟机无法访问
  • ¥15 skd显示找不到头文件
  • ¥15 机器视觉中图片中长度与真实长度的关系
  • ¥15 fastreport table 怎么只让每页的最下面和最顶部有横线
  • ¥15 java 的protected权限 ,问题在注释里
  • ¥15 这个是哪里有问题啊?