Reputation: 21
I have a problem with Bootstrap. I have an h2
-Heading and on mobile screens it goes out of range. I cant post an image-example, because I'm a newbie.
<body data-spy="scroll" data-target="#navbar" data-offset="0">
<header id="header" role="banner">
...
</header>
<section id="section1">
<div class="container">
<div class="box box-one">
<div class="center gap">
<h2>Sadipscing Takimata sanctus est</h2>
</div>
</div>
</div>
</section>
CSS:
.box {
padding: 50px 30px;
background: #fff;
border-bottom: 1px solid #e9e9e9;
position: relative;
}
#section1 .box-one {
border-radius: 5px 5px 0 0;
}
.gap {
margin-bottom: 40px;
}
What cause this experience?
Regards
Upvotes: 0
Views: 729
Reputation: 388
<section class="container" id="section1">
<div class="row">
<div class="col-md-12">
<div class="box box-one">
<div class="center gap">
<h2>Sadipscing Takimata sanctus est</h2>
</div>
</div>
</div>
</div>
</section>
I am assuming that you are using the heading for full width if not then change the col-md-12
to col-md-11
or just decrease that number further play around with it
CSS
.box {
padding: auto;
background: #fff;
border-bottom: 1px solid #e9e9e9;
position: relative;
}
#section1 .box-one {
border-radius: 5px 5px 0 0;
}
.gap {
margin-bottom: auto;
}
@media all and (mix-width: 699px)
{
.box{padding: 50px 30px;}
.gap {margin-bottom: 40px;}
}
Upvotes: 1