I am struggling with maintaining consistent formatting for the center text on my splash/masthead/full page image, regardless of resizing. The image I am working with can be viewed [here]1
Originally, I attempted to incorporate the text into the background image itself, but my client found that this diminished the "luminosity" of the white compared to other elements.
The issue lies in the slight off-center positioning of the glassball element in the background, causing alignment problems.
In addition, I need a button to align to the far right of the center text on desktops and below it on mobile screens.
All my previous attempts involved adjusting padding and margins along with multiple media queries, which has proven to be inefficient.
If anyone has alternative solutions or advice to offer (particularly since my Photoshop skills are lacking), please share your insights.
Here is a snippet of my Masthead CSS:
.masthead {
height: 100vh;
background-image: url('../images/glassball2.jpeg');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
.btn {
border-radius: 34.5px;
border: none;
color: white;
}
.btn.main-cta {
font-family: $header-black;
padding: 20px;
font-size: 20px;
}
.splash-header h1 {
text-transform: uppercase;
font-family: $body-font;
color: white;
text-shadow: 0px 5px 5px rgba(0, 0, 0, 0.4);
letter-spacing: .5px;
line-height: 1.3em;
}
And here's a glimpse at my HTML structure:
<header class="masthead">
<div class="container h-100">
<div class="row h-100 align-items-center">
<div class="col-md-2">
<p></p>
</div>
<div class="splash-header col-md-7 text-center">
<h1>your industry link to trusted global marketplaces and technologies</h1>
</div>
<div class="col-md-3 text-center">
<a class="main-cta gradient btn" data-value="contact" href="#">Schedule your free <br> 30-min consultation</a>
</div>
</div>
</div>
</header>