简体   繁体   English

Bootstrap网格在本地可用,但在服务器上已损坏

[英]Bootstrap grid is ok on local, but broken on server

Working on my first project with Bootstrap (and CSS in general). 使用Bootstrap(和一般的CSS)进行我的第一个项目。

In the following section, the columns look great on local for xs screen sizes, but on the server, the entire section is squashed over to the right. 在以下部分中,对于xs屏幕大小,这些列在本地看起来很不错,但是在服务器上,整个部分都压在右边。 Can't seem to figure out what's wrong. 似乎无法找出问题所在。

  <div class="container testimonials">
  <h2>What People Are Saying</h2>

  <div class="row">

  <div class="col-md-1 col-xs-0">
  </div>

  <div class="col-md-5 col-xs-6">
  <div class="quotes">
    <blockquote>Extremely helpful! How to Interview is an easy read that hits all the major concerns about interviewing - and how to handle them appropriately. I recommend it to anyone who is trying to land a job.</blockquote>
  </div>
  </div>

  <div class="col-md-5 col-xs-6">
  <div class="quotes">
    <blockquote>I interviewed at Google twice and didn't made the cut. I interviewed a third time -- trying the techniques in How to Interview -- and got the job. It changed the way I communicate and helped me get the job I wanted.</blockquote>
  </div>
  </div>

  <div class="col-md-1 col-xs-0">
  </div>

  </div> <!-- /row -->
  </div> <!-- /testimonials -->

The problem is excessive padding on the testimonials class: 问题是testimonials类的填充过多:

.testimonials {
    /* ... */
    padding-left: 190px;
    padding-right: 190px;
}

It's not leaving enough room for the content. 它没有为内容留出足够的空间。

Since those rules are coming from a separate CSS file main.css perhaps that file is different on your local server. 由于这些规则来自单独的CSS文件main.css ,因此该文件在本地服务器上可能有所不同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM