Bootstrap行彼此重叠

时间:2016-02-19 18:49:05

标签: html css twitter-bootstrap

当我调整浏览器窗口大小时,我网站的第一部分在移动设备上显示效果非常差。

我正在使用引导程序,并且在我的生活中无法弄清楚为什么会发生这种情况。

基本上:我的h1标题没有缩小,然后我的h2副标题覆盖在greenpromobox div的顶部,它本身被下一行覆盖!

实例 http://185.123.96.102/~kidsdrum/moneynest.co.uk/(调整浏览器窗口大小以查看响应较差的布局)。

格式错误的HTML部分:

<div class="special">
<div class="jumbotron">
  <div class="container text-center">
    <div class="h1extrapadding hidden-xs hidden-sm"></div>  <h1 class="boldme">Aged 20-30 & frustrated with money?</h1> 
    <div class="greenpromobox">
    <div class="h2extrapadding hidden-xs hidden-sm"></div>  <h2 class="boldme">Take our free <b class="jumpstarttext">Jumpstart Your Finances</b> class to<br /> quickly gain control over your finances</h2>


            <!-- Begin MailChimp Signup Form -->
<div id="mc_embed_signup">
<form action="//moneynest.us11.list-manage.com/subscribe/post?u=9ccf2d2219536b32eaae3c3d1&amp;id=299de51b4e" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
    <div id="mc_embed_signup_scroll">


                   <img src="http://185.123.96.102/~kidsdrum/moneynest.co.uk/img/hand-drawn-arrow.png" id="handarrow" class="hidden-xs hidden-sm" alt="arrow"><input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="Enter your email address" required autofocus>
    <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
    <div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_9ccf2d2219536b32eaae3c3d1_299de51b4e" tabindex="-1" value=""></div>
    <div class="clear"><input type="submit" value="Start Class Now" name="subscribe" id="mc-embedded-subscribe" class="text-uppercase btn btn-primary btn-lg"></div>
    </div>
</form>
</div>

<!--End mc_embed_signup-->

</div>
</div>

 </div>
</div>
  </div>

<div class="container-fluid bg-3 text-center">    
  <h3 class="h3big">What do you need help with?</h3><br>
  <div class="row">
    <div class="col-sm-4">
         <img src="http://185.123.96.102/~kidsdrum/moneynest.co.uk/img/button-1.png" alt="button-1">
         <div class="box-content">
                       <p class="alltextbig text-uppercase"><b>Living</b> paycheque to paycheque?</p>
                       <figure><img src="http://185.123.96.102/~kidsdrum/moneynest.co.uk/img/pound-coins.jpg" alt="saving money image" title="Saving money" class="tripleimage">
                       <figcaption>Lesson 1 - Learn how to stop the pay cheque to pay cheque cycle.</figcaption>

                       </figure>


<input type="submit" value="Start Class Now" name="subscribe" id="mc-embedded-subscribe" class="text-uppercase btn btn-primary btn-lg btn-middle" style="margin-top: 9%">

              </div>
              </div>
    <div class="col-sm-4 columnBorder"> 

       <img src="http://185.123.96.102/~kidsdrum/moneynest.co.uk/img/button-2.png" alt="button-1">
       <div class="box-content column-border">
           <p class="alltextbig text-uppercase"><b>Saving</b> to buy a home?</p>
           <figure>
             <img src="http://185.123.96.102/~kidsdrum/moneynest.co.uk/img/saving-to-buy-a-home.jpg" alt="Buying a house" title="Saving to buy a house" class="tripleimage"><figcaption>
             Lesson 2 - Tips to rapidly save for your future home.
             </figcaption>
             </figure>

           <input type="submit" value="Start Class Now" name="subscribe" id="mc-embedded-subscribe" class="text-uppercase btn btn-primary btn-lg btn-middle" style="margin-top: 9%">
      </div>
      </div>
    <div class="col-sm-4"> 
       <img src="http://185.123.96.102/~kidsdrum/moneynest.co.uk/img/button-3.png" alt="button-1">
       <div class="box-content">
      <p class="alltextbig text-uppercase"><b>Going</b> travelling?</p>
      <figure>
        <img src="http://185.123.96.102/~kidsdrum/moneynest.co.uk/img/going-travelling.jpg" alt="Travelling" title="Travelling"  class="tripleimage">
        <figcaption>Lesson 3 - How I personally travelled for 13 months with only £2,000 (yes I had a roof over my head every night!).
        </figcaption>
        </figure>

    <input type="submit" value="Start Class Now" name="subscribe" id="mc-embedded-subscribe" class="text-uppercase btn btn-primary btn-lg btn-middle">

    </div>
    </div>
  </div>
</div><br>

2 个答案:

答案 0 :(得分:0)

请更新此课程。您的重叠问题将得到修复

.special, .special .jumbotron {
  height: auto;
  overflow: hidden;
  width: 100%;
}

答案 1 :(得分:0)

您需要在图片上加max-width: 100%;。这将阻止重叠,但仍然可以在更大的屏幕尺寸上保持响应。

我还会将您的边界从.column-border移到.columnBorder。这样的空间会更好。

img { 
  max-width: 100%; 
}
.columnBorder {
  border-left: 1px solid #ccc;
  border-right: 1px solid #ccc;
}