I have a page divided in half. On one side I have a giant box and on the other side I have a set of cards. When I inspect the page or increase / reduce its size, the cards are no longer responsive. The small cards are above the large box. The goal is that when they cross, the cards will go down.
Does anyone help me make this responsive?
Thank you very much
HTML
<div class="col-md-6">
<div class="row">
<div class="col-6">
<div class="card" style="margin-left: 16px; margin-right: 16px; line-height: 1;">
<div class="card-header header">
<h1> M </h1>
</div>
<div class="card-body">
</div>
</div>
</div>
<div class="col-6">
<div class="card" style="margin-left: 8px; margin-right: 16px;">
<div class="card-header header">
<h1> I </h1>
</div>
<div class="card-body">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<div class="card card-small" style="margin-left: 16px; margin-right: 16px; margin-top: 16px;">
<div class="card-header header">
<h1> C </h1>
</div>
<div class="card-body" style="overflow: auto;">
</div>
</div>
</div>
<div class="col-6">
<div class="card card-small" style="margin-left: 8px; margin-right: 16px; margin-top: 16px;">
<div class="card-header header">
<h1> D </h1>
</div>
<div class="card-body" style="overflow: auto;">
</div>
</div>
</div>
<div class="col-6">
<div class="card card-small" style="margin-left: 16px; margin-right: 16px; margin-top: 16px;">
<div class="card-header header">
<h1> S </h1>
</div>
<div class="card-body" style="overflow: auto;">
</div>
</div>
</div>
<div class="col-6">
<div class="card card-small" style="margin-left: 8px; margin-right: 16px; margin-top: 16px;">
<div class="card-header header">
<h1> T </h1>
</div>
<div class="card-body" style="overflow: auto;">
</div>
</div>
</div>
</div>
</div>
</div>
CSS:
.Title{
width: 150px;
height: 30px;
font-family: 'Noto Sans';
font-size: 20px;
letter-spacing: 0;
color: #4D4F5C;
}
.header{
width: 435px;
height: 40px;
background: #ECF2F9 0% 0% no-repeat padding-box;
border-radius: 8px 8px 0px 0px;
}
.header h1{
text-align: center;
font-family:'Noto Sans';
font-size: 14px;
letter-spacing: 0;
color: #4D4F5C;
}
The reason they aren't responsive is because you have the cards and the .drop item set to fix widths using px's. Try setting the width of the items using percentages.
Related
How can I make the hover to be equal in size despite the line difference in the paragraph? As of now the size of my hover in 'content' class is different since my p.../p in the second and third card is different in the first and fourth card. Is there a way to make my hover size to be equal in all cards? Please see below codes. Thank you
.card .content {
width: 100%;
background: #fff;
opacity: 0.65;
position: absolute;
bottom: -60%;
margin-left: -4px;
transition: all ease 0.5s;
border-radius: 4px;
box-shadow: 0px -3px 4px rgba(10, 10, 10, 0.09)
}
.card .content .category {
font-size: 17px;
font-weight: 600
}
.card .content .price {
font-size: 17px;
font-weight: 500;
color: #0d6efd
}
.card .content p {
font-weight: 500;
font-size: 12px;
text-align: center;
}
.card:hover .content {
bottom: 0%
}
.buttons button {
border-radius: 1px;
margin-bottom: 10px;
transition: all ease 0.3s
}
.content {
padding: 10px
}
hr {
border: 0;
height: 1px;
width: 60%;
position: relative;
margin: 15px auto;
}
.d-flex {
font-weight: 500;
font-size: 12px;
margin: 15px auto;
}
.fa-play-circle {
padding-right: 4px;
padding-top: 3px;
}
<body>
<div id="image">
<div class="row">
<div class="image-column col-lg-3 col-md-6">
<div class="card h-100 p-1 card-container">
<div class="card-header">
<h3>GABEL LOFFEL</h3>
</div>
<div class="card-img-wrapper ">
<img src="assets\image_1.jpg" alt="">
<div class="content">
<hr>
<p>Get out your <br> Lederhosen!</p>
<hr>
<div class="d-flex justify-content-center"> <i class="far fa-play-circle"></i> More </div>
</div>
</div>
</div>
</div>
<div class="image-column col-lg-3 col-md-6">
<div class="card h-100 p-1 card-container">
<div class="card-header">
<h3>GARY GARI</h3>
</div>
<div class="card-img-wrapper ">
<img src="assets\image_2.jpg" alt="">
<div class="content">
<hr>
<p>The delicious <br> headquarters for all <br> your ginger related <br> needs!</p>
<hr>
<div class="d-flex justify-content-center"> <i class="far fa-play-circle"></i> More </div>
</div>
</div>
</div>
</div>
<div class="image-column col-lg-3 col-md-6">
<div class="card h-100 p-1 card-container">
<div class="card-header">
<h3>IL PIATTO</h3>
</div>
<div class="card-img-wrapper ">
<img src="assets\image_3.jpg" alt="">
<div class="content">
<hr>
<p>Got wild finicky kids? <br> Head for Il Piatto for <br> kid-friendly Italian <br> Fun!</p>
<hr>
<div class="d-flex justify-content-center"> <i class="far fa-play-circle"></i> More </div>
</div>
</div>
</div>
</div>
<div class="image-column col-lg-3 col-md-6">
<div class="card h-100 p-1 card-container">
<div class="card-header">
<h3>PIERRE PLATTERS</h3>
</div>
<div class="card-img-wrapper ">
<img src="assets\image_4.jpg" alt="">
<div class="content">
<hr>
<p>Smart talks, Smart <br> eats!</p>
<hr>
<div class="d-flex justify-content-center"> <i class="far fa-play-circle"></i> More </div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#5.0.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"></script>
enclosed your <p></P> in content class inside a div give one custom class para and other bootstrap flex classes to justify and align center
and given css to .content
height: 280px !important;
and given css to .content .para
.content .para{ height: 100px !important; }
.card .content {
width: 100%;
background: #fff;
opacity: 0.65;
position: absolute;
bottom: -60%;
margin-left: -4px;
transition: all ease 0.5s;
border-radius: 4px;
box-shadow: 0px -3px 4px rgba(10, 10, 10, 0.09)
}
.card .content .category {
font-size: 17px;
font-weight: 600
}
.card .content .price {
font-size: 17px;
font-weight: 500;
color: #0d6efd
}
.card .content p {
font-weight: 500;
font-size: 12px;
text-align: center;
}
.card:hover .content {
bottom: 0%
}
.buttons button {
border-radius: 1px;
margin-bottom: 10px;
transition: all ease 0.3s
}
.content {
height: 280px !important;
padding: 10px;
}
.content .para {
height: 100px !important;
}
hr {
border: 0;
height: 1px;
width: 60%;
position: relative;
margin: 15px auto;
}
.d-flex {
font-weight: 500;
font-size: 12px;
margin: 15px auto;
}
.fa-play-circle {
padding-right: 4px;
padding-top: 3px;
}
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<div id="image">
<div class="row">
<div class="image-column col-lg-3 col-md-6">
<div class="card h-100 p-1 card-container">
<div class="card-header">
<h3>GABEL LOFFEL</h3>
</div>
<div class="card-img-wrapper ">
<img src="images/2.jpg" class="img-fluid" alt="">
<div class="content">
<hr>
<div class="para d-flex justify-content-center align-items-center">
<p>Get out your <br> Lederhosen!</p>
</div>
<hr>
<div class="d-flex justify-content-center"> <i class="far fa-play-circle"></i> More </div>
</div>
</div>
</div>
</div>
<div class="image-column col-lg-3 col-md-6">
<div class="card h-100 p-1 card-container">
<div class="card-header">
<h3>GARY GARI</h3>
</div>
<div class="card-img-wrapper ">
<img src="images/3.jpg" class="img-fluid" alt="">
<div class="content">
<hr>
<div class="para d-flex justify-content-center align-items-center">
<p>The delicious <br> headquarters for all <br> your ginger related <br> needs!</p>
</div>
<hr>
<div class="d-flex justify-content-center"> <i class="far fa-play-circle"></i> More </div>
</div>
</div>
</div>
</div>
<div class="image-column col-lg-3 col-md-6">
<div class="card h-100 p-1 card-container">
<div class="card-header">
<h3>IL PIATTO</h3>
</div>
<div class="card-img-wrapper ">
<img src="images/4.jpg" class="img-fluid" alt="">
<div class="content">
<hr>
<div class="para d-flex justify-content-center align-items-center">
<p>Got wild finicky kids? <br> Head for Il Piatto for <br> kid-friendly Italian <br> Fun!
</p>
</div>
<hr>
<div class="d-flex justify-content-center"> <i class="far fa-play-circle"></i> More </div>
</div>
</div>
</div>
</div>
<div class="image-column col-lg-3 col-md-6">
<div class="card h-100 p-1 card-container">
<div class="card-header">
<h3>PIERRE PLATTERS</h3>
</div>
<div class="card-img-wrapper ">
<img src="images/2.jpg" class="img-fluid" alt="">
<div class="content">
<hr>
<div class="para d-flex justify-content-center align-items-center">
<p>Smart talks, Smart <br> eats!</p>
</div>
<hr>
<div class="d-flex justify-content-center"> <i class="far fa-play-circle"></i> More </div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/#popperjs/core#2.9.2/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#5.0.1/dist/js/bootstrap.min.js"></script>
Try this code in browser to see
enclosed your <p></P> in content class inside a div give one custom class para and other bootstrap flex classes to justify and align center
and given css to .content
height: 280px !important;
and given css to .content .para
.content .para{ height: 100px !important; }
and in card img used class img-fluid
.card .content {
width: 100%;
background: #fff;
opacity: 0.65;
position: absolute;
bottom: -60%;
margin-left: -4px;
transition: all ease 0.5s;
border-radius: 4px;
box-shadow: 0px -3px 4px rgba(10, 10, 10, 0.09)
}
.card .content .category {
font-size: 17px;
font-weight: 600
}
.card .content .price {
font-size: 17px;
font-weight: 500;
color: #0d6efd
}
.card .content p {
font-weight: 500;
font-size: 12px;
text-align: center;
}
.card:hover .content {
bottom: 0%
}
.buttons button {
border-radius: 1px;
margin-bottom: 10px;
transition: all ease 0.3s
}
.content {
height: 280px !important;
padding: 10px;
}
.content .para {
height: 100px !important;
}
hr {
border: 0;
height: 1px;
width: 60%;
position: relative;
margin: 15px auto;
}
.d-flex {
font-weight: 500;
font-size: 12px;
margin: 15px auto;
}
.fa-play-circle {
padding-right: 4px;
padding-top: 3px;
}
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<div id="image">
<div class="row">
<div class="image-column col-lg-3 col-md-6">
<div class="card h-100 p-1 card-container">
<div class="card-header">
<h3>GABEL LOFFEL</h3>
</div>
<div class="card-img-wrapper ">
<img src="assets\image_1.jpg" class="img-fluid" alt="">
<div class="content">
<hr>
<div class="para d-flex justify-content-center align-items-center">
<p>Get out your <br> Lederhosen!</p>
</div>
<hr>
<div class="d-flex justify-content-center"> <i class="far fa-play-circle"></i> More </div>
</div>
</div>
</div>
</div>
<div class="image-column col-lg-3 col-md-6">
<div class="card h-100 p-1 card-container">
<div class="card-header">
<h3>GARY GARI</h3>
</div>
<div class="card-img-wrapper ">
<img src="assets\image_2.jpg" class="img-fluid" alt="">
<div class="content">
<hr>
<div class="para d-flex justify-content-center align-items-center">
<p>The delicious <br> headquarters for all <br> your ginger related <br> needs!</p>
</div>
<hr>
<div class="d-flex justify-content-center"> <i class="far fa-play-circle"></i> More </div>
</div>
</div>
</div>
</div>
<div class="image-column col-lg-3 col-md-6">
<div class="card h-100 p-1 card-container">
<div class="card-header">
<h3>IL PIATTO</h3>
</div>
<div class="card-img-wrapper ">
<img src="assets\image_3.jpg" class="img-fluid" alt="">
<div class="content">
<hr>
<div class="para d-flex justify-content-center align-items-center">
<p>Got wild finicky kids? <br> Head for Il Piatto for <br> kid-friendly Italian <br> Fun!
</p>
</div>
<hr>
<div class="d-flex justify-content-center"> <i class="far fa-play-circle"></i> More </div>
</div>
</div>
</div>
</div>
<div class="image-column col-lg-3 col-md-6">
<div class="card h-100 p-1 card-container">
<div class="card-header">
<h3>PIERRE PLATTERS</h3>
</div>
<div class="card-img-wrapper ">
<img src="assets\image_4.jpg" class="img-fluid" alt="">
<div class="content">
<hr>
<div class="para d-flex justify-content-center align-items-center">
<p>Smart talks, Smart <br> eats!</p>
</div>
<hr>
<div class="d-flex justify-content-center"> <i class="far fa-play-circle"></i> More </div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/#popperjs/core#2.9.2/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#5.0.1/dist/js/bootstrap.min.js"></script>
I divided a page into two columns. When I reduce the screen, is there any way to put everything in just one column?
At this moment, when I reduce the screen, the width of the cards decreases (as shown in the image). Is there a way to put all the cards in just one column (on mobile) in order to keep the width at 100%?
Is there a way to put everything in just one column and with a margin top between the elements?
Thanks.
Stackblitz - DEMO
Code
<div style="width: 100%; height: 100%; overflow-y: scroll; overflow-x: hidden;">
<div style="width: 100%; height: 85%">
<div class="modal-body row" style="overflow: auto; margin-top: 135px; height: 100%;">
<div class="col-md-6">
<div style="height: 700px;">
<div class="container">
</div>
<div class="row">
<div class="Upcard">
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="row" style="height: 100%;">
<div class="col-6">
<div class="card cardBig" style="margin-left: 16px; margin-right: 16px; line-height: 1;">
<div class="card-header header">
<h1> It </h1>
</div>
<div class="card-body">
</div>
</div>
</div>
<div class="col-6">
<div class="card" style="margin-left: 8px; margin-right: 16px; line-height: 1;">
<div class="card-header header">
<h1> data </h1>
</div>
<div class="card-body">
</div>
</div>
<div class="card card-small" style="margin-left: 8px; margin-right: 16px; margin-top: 16px;">
<div class="card-header header">
<h1> T </h1>
</div>
<div class="card-body" style="overflow-y: auto; overflow-x: hidden;">
</div>
</div>
<div class="card card-small" style="margin-left: 8px; margin-right: 16px; margin-top: 16px;">
<div class="card-header header">
<h1> Att </h1>
</div>
<div class="card-body att" style="overflow-x: hidden; overflow-y: auto;">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Please try this snippet.
.card {
width: 100%;
height: 50%;
margin-bottom: 16px;
background: red 0% 0% no-repeat padding-box;
box-shadow: 0px 3px 20px #BCBCCB47;
border-radius: 8px;
opacity: 1;
border: none;
}
.cardBig {
height: calc(100% - 16px);
}
.card-small {
height: 23%;
}
/* ---------------------------UPLOAD----------------------------------- */
.container {
width: 100%;
height: 100%;
padding: 2rem;
text-align: center;
border: dashed 4px blue;
position: relative;
margin: 0 auto;
border-radius: 16px;
display: flex;
justify-content: center;
align-items: center;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<div style="width: 100%; height: 100%; overflow-y: scroll; overflow-x: hidden;">
<div style="width: 100%; height: 85%">
<div class="modal-body row" style="overflow: auto; margin-top: 135px; height: 100%;">
<div class="col-md-6 col-sm-12">
<div style="height: 700px;">
<div class="container">
</div>
<div class="row">
<div class="Upcard">
</div>
</div>
</div>
</div>
<div class="col-md-6 col-sm-12">
<div class="row" style="height: 100%;">
<div class="col-md-6 col-sm-12">
<div class="card cardBig">
<div class="card-header header">
<h1> It </h1>
</div>
<div class="card-body">
</div>
</div>
</div>
<div class="col-md-6 col-sm-12">
<div class="card">
<div class="card-header header">
<h1> data </h1>
</div>
<div class="card-body">
</div>
</div>
<div class="card card-small">
<div class="card-header header">
<h1> T </h1>
</div>
<div class="card-body" style="overflow-y: auto; overflow-x: hidden;">
</div>
</div>
<div class="card card-small">
<div class="card-header header">
<h1> Att </h1>
</div>
<div class="card-body att" style="overflow-x: hidden; overflow-y: auto;">
<p>asdasdasdasdasdasdasdas</p>
<p>asdasdasdasdasdasdasdas</p>
<p>asdasdasdasdasdasdasdas</p>
<p>asdasdasdasdasdasdasdas</p>
<p>asdasdasdasdasdasdasdas</p>
<p>asdasdasdasdasdasdasdas</p>
<p>asdasdasdasdasdasdasdas</p>
<p>asdasdasdasdasdasdasdas</p>
<p>asdasdasdasdasdasdasdas</p>
<p>asdasdasdasdasdasdasdas</p>
<p>asdasdasdasdasdasdasdas</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
I'm trying to make a row responsive in a way that mobile rows go vertically instead of horizontal and I still have all those fancy boxes, could anyone help me in any way?
I already tried changing the columns up, css-flexbox, but I'm most likely just doing something horribly wrong.
#caixas {
background-color: #58373791;
padding-top: 5px;
padding-right: 30px;
padding-bottom: 5px;
padding-left: 25px;
}
#caixas2 {
background-color: #b6696a91;
padding-top: 5px;
padding-right: 30px;
padding-left: 25px;
padding-bottom: 5px;
}
#border {
border: solid 3px red;
}
<div class='col-lg-12 col-md-12 col-sm-12'>
<div id="border" class="container">
<div class="row">
<div class="col-lg-4 col-sm-6 mb-4">
<div id="caixas" class="container">
<h3 class="h2sm" align="center">Estudante </h3>
<h4 class="h1sm " align="center">Português</h4>
</div>
<div id="caixas2" class="container">
<h3 class="h3sm" align="center">Portuguese Student</h3>
</div>
</div>
<div class="col-lg-4 col-sm-6 mb-4">
<div id="caixas" class="container">
<h3 class="h2sm" align="center">Estudante </h3>
<h4 class="h1sm " align="center">Internacional</h4>
</div>
<div id="caixas2" class="container">
<h3 class="h3sm" align="center">Internacional Student</h3>
</div>
</div>
<div class="col-lg-4 col-sm-6 mb-4">
<div id="caixas" class="container">
<h3 class="h2sm" align="center">Estudante </h3>
<h4 class="h1sm " align="center">Intercâmbio</h4>
</div>
<div id="caixas2" class="container">
<h3 class="h3sm" align="center">Exchange Student</h3>
</div>
</div>
</div>
</div>
</div>
Greetings i am kinda new to boostrap, Anyhow, I am trying to Create is, Boxes to look like this (right side):
And so far i got nothing. i used padding but it mess up my grid system, what i did was give a col-sm-8 for picture side and a col-sm-4 for boxes however it is where it gets tricky it always mess my grid system. this is my html. could you help me out a little bit?
<div class="container">
<div class="row">
<div class="col-sm-8">
<img src="xxxx" />
</div>
<div class="col-sm-4">
<div class="col-sm-6">
<div style="background-color: grey; padding: 25px; text-align: center; vertical-align: middle">
Oven
</div>
</div>
<div class="col-sm-6">
<div style="background-color: grey; padding: 25px; text-align: center; vertical-align: middle">
Cookers
</div>
</div>
<div class="col-sm-6">
<div style="background-color: grey; padding: 25px; text-align: center; vertical-align: middle">
Microwave Ovens
</div>
</div>
<div class="col-sm-6">
<div style="background-color: grey; padding: 25px; text-align: center; vertical-align: middle">
Steamers
</div>
</div>
<div class="col-sm-6">
<div style="background-color: grey; padding: 25px; text-align: center; vertical-align: middle">
Cooker hoods
</div>
</div>
<div class="col-sm-6">
<div style="background-color: grey; padding: 25px; text-align: center; vertical-align: middle">
Hobs
</div>
</div>
</div>
</div>
</div>
You are missing a row class, it's mandatory for nested rows/columns, so you can do this (go full page to see the result as you want) :
.box {
background-color: grey;
padding: 25px;
text-align: center;
vertical-align: middle;
margin: 10px;
}
img {
max-width: 100%;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<div class="container">
<div class="row">
<div class="col-sm-8">
<img src="https://lorempixel.com/800/400/" />
</div>
<div class="col-sm-4">
<div class="row">
<div class="col-sm-6">
<div class="box">
Oven
</div>
</div>
<div class="col-sm-6">
<div class="box">
Cookers
</div>
</div>
<div class="col-sm-6">
<div class="box">
Microwave
</div>
</div>
<div class="col-sm-6">
<div class="box">
Steamers
</div>
</div>
<div class="col-sm-6">
<div class="box">
Cooker hoods
</div>
</div>
<div class="col-sm-6">
<div class="box">
Hobs
</div>
</div>
</div>
</div>
</div>
</div>
You can read more about grid nesting
I've managed to make the image stick to the footer but failed to make the footer stick to the bottom when entering responsive mode. I'm a newbie to bootstrap so help is appreciated.
HTML: The footer is after the table.
<div class="instructables-container" id="instructables" style="position: relative; margin-left: 0px;height: 10px; ">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h2 class="section-heading" style="color: #2E2E2E; text-align: center;">INSTRUCTABLES</h2>
<hr class="primary">
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-lg-3 col-md-6 text-center">
<div class="service-box">
<p style="font-size: 60px;">x</p>
<p>Instructables</p>
</div>
</div>
<div class="col-lg-3 col-md-6 text-center">
<div class="service-box">
<p style="font-size: 60px;">x</p>
<p>xx</p>
</div>
</div>
<div class="col-lg-3 col-md-6 text-center">
<div class="service-box">
<p style="font-size: 60px;">x</p>
<p>xx</p>
</div>
</div>
<div class="col-lg-3 col-md-6 text-center">
<div class="service-box">
<p style="font-size: 60px;">x</p>
<p>xx</p>
</div>
</div>
</div>
</div>
</div>
<div class="footer" style="height:30%; background-color: white;">
<div class="robot" style="position: absolute; margin:auto; left:0; right:0; bottom: 20px;">
<img src="http://i.imgur.com/q7GBNF1.png" />
</div>
<div class="words" style="position: absolute; width:100%;background-color:#E6E6E6; bottom:0px;">
<p style=" font-size: 13px; font-family: 'Open Sans', 'Helvetica Neue', Georgia, serif;">Contact: nerolikkh#gmail.com </p>
</div>
</div>
CSS:
.instructables-container {
margin-top: 25px;
margin-bottom: 300px;
margin-left: 0px;
letter-spacing: 2px;
line-height: 2;
font-size: 15px;
font-family: Helvetica;
}
.table{
margin-top: 80px;
text-align: center;
margin-left: 11%;
border: 0px;
}
.footer {
position: absolute;
font-family: Helvetica;
letter-spacing: 3px;
width: 100%;
height: 40px;
line-height: 20px;
font-size: 4px;
text-align: center;
height:400px;
}
.instructables-container {
margin-top: 25px;
margin-bottom: 300px;
margin-left: 0px;
letter-spacing: 2px;
line-height: 2;
font-size: 15px;
font-family: Helvetica;
}
.table{
margin-top: 80px;
text-align: center;
margin-left: 11%;
border: 0px;
}
.footer {
position: absolute;
font-family: Helvetica;
letter-spacing: 3px;
width: 100%;
height: 40px;
line-height: 20px;
font-size: 4px;
text-align: center;
height:400px;
}
.test div{
z-index:1;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class="instructables-container" id="instructables" style="position: relative; margin-left: 0px;height: 10px; ">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h2 class="section-heading" style="color: #2E2E2E; text-align: center;">INSTRUCTABLES</h2>
<hr class="primary">
</div>
</div>
</div>
<div class="container">
<div class="row test">
<div class="col-lg-3 col-md-6 col-xs-6 text-center">
<div class="service-box">
<p style="font-size: 60px;">x</p>
<p>Instructables</p>
</div>
</div>
<div class="col-lg-3 col-md-6 col-xs-6 text-center">
<div class="service-box">
<p style="font-size: 60px;">x</p>
<p>xx</p>
</div>
</div>
<div class="col-lg-3 col-md-6 col-xs-6 text-center">
<div class="service-box">
<p style="font-size: 60px;">x</p>
<p>xx</p>
</div>
</div>
<div class="col-lg-3 col-md-6 col-xs-6 text-center">
<div class="service-box">
<p style="font-size: 60px;">x</p>
<p>xx</p>
</div>
</div>
</div>
</div>
</div>
<div class="footer" style="height:30%; background-color: white;">
<div class="robot" style="position: absolute; margin:auto; left:0; right:0; bottom: 20px;">
<img src="http://i.imgur.com/q7GBNF1.png" />
</div>
<div class="words" style="position: absolute; width:100%;background-color:#E6E6E6; bottom:0px;">
<p style=" font-size: 13px; font-family: 'Open Sans', 'Helvetica Neue', Georgia, serif;">Contact: nerolikkh#gmail.com </p>
</div>
</div>
You should add the correct classes for mobile screen so you should define the width that you want for each div in mobile screen. You can use bootstrap class for that .col-xs-6 so one of these divs will be half of screen. Here is your html code and also a jsfiddle
And it's not good to use inline style you should use it as internal or external!