Reputation: 594
The first section of my site displays very poorly on a mobile device/when I size my browser window down.
I am using bootstrap and can't for the life of me figure out why this is happening.
Essentially: My h1 headline isn't scaling down, then my h2 subheadline is overlaying ontop of a greenpromobox div which itself is overlayed by the next row!
Live example: http://185.123.96.102/~kidsdrum/moneynest.co.uk/ (resize the browser window to see the poor responsive layout).
HTML of badly styled section:
<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&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>
Upvotes: 0
Views: 1856
Reputation: 1083
I don't know if this would help in your case, but I've had a similar issue with bootstrap v5.3.1 two successive rows overlaps
Code not working
<div class="row">
<h1> content </h1>
</div>
<div class="row">
<p> whatever </p>
</div>
I rapped up the second row inside of another div i,e parent and it worked
Solution
<div class="row">
<h1> content </h1></div>
<div class="parent>
<div class="row">
<p> whatever </p>
</div></div>
I have no idea if that's really the issue and you just can't have two row div successively or not, but I hope it helps
Upvotes: 0
Reputation: 4113
You need to put max-width: 100%;
on your images. That'll stop the overlap, but still remain responsive on larger screen sizes.
I would also move your borders off of .column-border
and onto .columnBorder
. It'll space better that way.
img {
max-width: 100%;
}
.columnBorder {
border-left: 1px solid #ccc;
 border-right: 1px solid #ccc;
}
Upvotes: 1
Reputation: 2238
Please update this class . your overlapping issue will be fixed
.special, .special .jumbotron {
height: auto;
overflow: hidden;
width: 100%;
}
Upvotes: 1