As I delve into front-end web development, my current learning focus is on mastering Bootstrap. An element of my project includes a jumbotron with a blurred image background under the navigation bar. While I have successfully blurred the image without affecting the text, I am struggling to center the h1 and p vertically within the jumbotron.
View the jumbotron image here: https://i.sstatic.net/9E9Ud.png
.jumbotron-fluid {
text-shadow: #444 0 1px 1px;
color: #FFF;
position: relative;
height: 40vh;
}
.jumbotron-fluid .container-fluid {
position: relative;
z-index: 2;
}
.jumbotron-fluid .bg {
background: url("../code.png") top center no-repeat;
width: 100%;
height: 100%;
-webkit-background-size: cover;
-moz-background-size: cover;
background-size: cover;
-o-background-size: cover;
overflow: hidden;
position: absolute;
filter: blur(5px);
top: 0;
left: 0;
z-index: 1;
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
<div class="bg"></div>
<div class="jumbotron jumbotron-fluid">
<div class="bg"></div>
<div class="container-fluid text-center">
<h1 class="display-4">Welcome!</h1>
<p class="lead">This site contains various projects I have worked on</p>
</div>
</div>