I am looking to enclose my elements in a rectangular container with rounded borders and a box shadow, while ensuring they have consistent height and are responsive (this is why I do not define max height or height directly)
Here's the desired end result:
https://i.sstatic.net/0fxOs.png
And here's what I currently have:
https://i.sstatic.net/YGg7r.png
This is my current code setup:
<div class="row">
<div class="col-12">
<h2 class="sm-header-title mb-5">Nuestros viajes de esquí organizados</h2>
</div>
<div class="col-3 rectangle-holder p-5">
<h2 class="sm-header-title">Viajes escolares</h2>
</div>
<div class="col-3 rectangle-holder p-5">
<h2 class="sm-header-title">Viajes universitarios</h2>
</div>
<div class="col-3 rectangle-holder p-5">
<h2 class="sm-header-title">Viajes para empresas</h2>
</div>
<div class="col-3 rectangle-holder p-5">
<h2 class="sm-header-title">Otros tipo de grupos</h2>
</div>
</div>
Accompanied by the following CSS styling:
.sm-header-title {
font-size: 30px;
font-weight: 800;
color: #3490dc;
}
.rectangle-holder {
border-radius: 10px;
box-shadow: 0 2px 7px 0 rgba(0, 0, 0, 0.3);
background-color: white;
}
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<style>
.sm-header-title {
font-size: 30px;
font-weight: 800;
color: #3490dc;
}
.rectangle-holder {
border-radius: 10px;
box-shadow: 0 2px 7px 0 rgba(0, 0, 0, 0.3);
background-color: white;
}
</style>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-12">
<h2 class="sm-header-title mb-5">Nuestros viajes de esquí organizados</h2>
</div>
<div class="col-3 rectangle-holder p-5">
<h2 class="sm-header-title">Viajes escolares</h2>
</div>
<div class="col-3 rectangle-holder p-5">
<h2 class="sm-header-title">Viajes universitarios</h2>
</div>
<div class="col-3 rectangle-holder p-5">
<h2 class="sm-header-title">Viajes para empresas</h2>
</div>
<div class="col-3 rectangle-holder p-5">
<h2 class="sm-header-title">Otros tipo de grupos</h2>
</div>
</div>
</div>
</body>
</html>