2016-02-19 4 views
0

Первый раздел моего сайта очень плохо отображается на мобильном устройстве/при изменении размера окна браузера.Строки бутстрапа, перекрывающиеся друг с другом

Я использую bootstrap и не могу для жизни меня понять, почему это происходит.

По существу: мой заголовок h1 не масштабируется, тогда моя подзаголовок h2 накладывается на верхнюю ветвь greenpromobox, которая сама накладывается следующей строкой!

Живой пример: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> 

ответ

0

Вам нужно положить max-width: 100%; на изображениях. Это остановит перекрытие, но все равно будет реагировать на большие размеры экрана.

Я бы также переместил ваши границы с .column-border и на .columnBorder. Это будет лучше.

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

Пожалуйста, обновите этот класс. ваша перекрывающаяся проблема будет исправлена ​​

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

Это лучше всего работает с решениями, но скрывает разделитель greenpromobox, а также скрывает половину названия h1 при изменении размера. Любая идея почему? –

Смежные вопросы