I need to give a gap of 15px between two rows and two columns. I don't know how to give the gaps on desktop and mobile devices using bootstrap only. There is something to do with margins but don't know the ideal way to do it.
For the 2nd row, I have two columns that will be displayed side by side on greater than tablet devices and it will display one below the other on mobile devices. I am getting difficulty in setting the gaps in the mobile devices only.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Gap</title>
<link
rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm"
crossorigin="anonymous" />
</head>
<body>
<div class="container mt-5">
<div class="row">
<div class="col-12 p-3" style="
background-color: #f8d7da;
color: #721c24;
border: 1px solid #f5c6cb;
">
B
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-6 p-3" style="
color: #004085;
background-color: #cce5ff;
border: 1px solid #b8daff;
">
A
</div>
<div class="col-xs-12 col-sm-6 p-3" style="
color: #004085;
background-color: #cce5ff;
border: 1px solid #b8daff;
">
C
</div>
</div>
</div>
</body>
</html>