I am struggling to create a 15px gap between two rows and columns on both desktop and mobile using bootstrap. I know there is something with margins, but I can't figure out the best way to implement it.
For the second row, I want two columns to appear side by side on tablets or larger screens, and stack vertically on smaller devices like mobile. However, setting the gaps correctly only on mobile devices is proving challenging.
<!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>