Hide image overlay before hover, css animation - css

I would like the overlay content to come from bottom of the image when hovered, but for some reason it's always visible, am I missing something with positioning? Here's the pen: http://codepen.io/anon/pen/PbjVgy
* {
background-color: grey;
color: white;
}
.about__images {
max-width: 800px;
margin: 0 auto;
}
.about__inner {
margin-top: 60px;
}
.about__inner img {
max-width: 100%;
margin-right: 20px;
}
/**/
.about .about__inner {
position: relative;
}
.about .about__inner .about__inner--overlay {
position: absolute;
top: 100%;
left: 15px;
text-align: center;
background: rgba(0, 0, 0, 0.8);
width: 89%;
height: 100%;
transition: all 0.1s ease-in;
}
p {
margin-top: 60px;
}
.about .about__inner:hover .about__inner--overlay {
top: 0;
}
<section class="about">
<h5 class="small__title">Lorem ipsum</h5>
<p class="description">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Beatae commodi nisi aut animi, excepturi impedit dicta natus culpa. Veniam atque sapiente assumenda fugiat tempore ipsam eos quae</p>
<div class="container">
<div class="about__images">
<div class="row">
<div class="about__inner col-md-4">
<img src="https://placeholdit.imgix.net/~text?txtsize=37&txt=390%C3%97259&w=390&h=259" alt="">
<div class="about__inner--overlay">
<p>overlay content</p>
</div>
</div>
<div class="about__inner col-md-4">
<img src="https://placeholdit.imgix.net/~text?txtsize=37&txt=390%C3%97259&w=390&h=259" alt="">
<div class="about__inner--overlay">
<i class="fa fa-user" aria-hidden="true"></i>
<p>overlay content</p>
</div>
</div>
<div class="about__inner col-md-4">
<img src="https://placeholdit.imgix.net/~text?txtsize=37&txt=390%C3%97259&w=390&h=259" alt="">
<div class="about__inner--overlay">
<i class="fa fa-user" aria-hidden="true"></i>
<p>overlay content</p>
</div>
</div>
</div>
</div>
</div>
</section>

Add overflow: hidden to .about__inner
.about__inner {
margin-top: 60px;
overflow: hidden;
}
http://codepen.io/anon/pen/ENXMxW

Related

pictures expand inside the class without being distorted

How do I make the pictures expand inside the class without being distorted and without edges or spaces between each other?
is there any other way to do this with Flexbox? there does not have to be a scrollbar and the .portof {class should not be too big in terms of height
How do I make the pictures expand inside the class without being distorted and without edges or spaces between each other?
is there any other way to do this with Flexbox? there does not have to be a scrollbar and the .portof {class should not be too big in terms of height
<pre>
<section class="Gallery">
<h1>Unsere Praxis</h1>
<p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Voluptatibus tempora accusantium provident ipsum placeat dolorem, dolores tempore optio, dignissimos eaque similique vel ea ullam nobis quas quae fugit laudantium sed!</p>
</section>
<!-- Portofolie -->
<section class="portof">
<div class="row">
<div class="wrapper">
<div class="container"> <img src="https://picsum.photos/350/250/?random=71" alt="?"></div>
<div class="container"> <img src="https://picsum.photos/350/250/?random=41" alt="?"></div>
<div class="container"> <img src="https://picsum.photos/350/250/?random=51" alt="?"></div>
<div class="container"> <img src="https://picsum.photos/350/250/?random=14" alt="?"></div>
<div class="container"> <img src="https://picsum.photos/350/250/?random=1" alt="?"></div>
<div class="container"> <img src="https://picsum.photos/350/250/?random=9" alt="?"></div>
<div class="container"> <img src="https://picsum.photos/350/250/?random=5" alt="?"></div>
<div class="container"> <img src="https://picsum.photos/350/250/?random=2" alt="?"></div>
<div class="container"> <img src="https://picsum.photos/350/250/?random=11" alt="?"></div>
<div class="container"> <img src="https://picsum.photos/350/250/?random=10" alt="?"></div>
</div>
<!-- <div class="gallery-row2">
sssdsd
</div>
--> </div>
</section>
</pre>
.Gallery{
width: 80%;
padding: 2% 0 0 0;
text-align: center;
margin: auto;
}
.Gallery h1{
font-size: 30px;
font-weight: 800;
color: #87CEEB;
}
.Gallery p{
padding-top: 10px;
font-family: 'Poppins', sans-serif;
font-weight: 30;
color: #000;
line-height: 30px;
font-size: 20px;
}
.portof{
width: 100%;
text-align: center;
background-color: royalblue;
background-image: url(img/slider_2.jpg);
background-repeat: no-repeat;
background-position: center;
background-size: cover;
background-color: rgba(0, 0, 0, 0.8);
background-blend-mode: multiply;
clip-path: polygon(51% 19%, 100% 13%, 100% 85%, 51% 94%, 0 85%, 0 13%);
}
.wrapper {
padding: 2% 0 0 0;
font-size: 0;
display: block;
}
.container {
display: inline-block;
width: 20%;
}
img {
display: inline-block;
max-width: 100%;
}
.container:hover{
background-color: rosybrown;
}
Just update CSS class .wrapper display property to be flex and give the container zero padding as following
.wrapper {
padding: 2% 0 0 0;
font-size: 0;
display: flex;
}
.container {
display: inline-block;
width: 20%;
padding: 0;
}

How to put icons under an image and paragraph on the right?

I am using Bootstrap CSS. How can I make this styling using CSS:
I have used this content. this is the result i m getting
html
<div class="container">
<img class="post-thumb" src="https://image.ibb.co/gmbNQT/matthew.png" alt="matthew">
<ul>
<li>
<a href="https://github.com/ankul007" target="_blank">
<i class="fa fa-github-square" style="font-size:48px;color:purple"></i>
</a>
</li>
.
.
</ul>
<p class="post-content" >...........</p>
</div>
using this css
.post-thumb {
float: left;
border-radius: 50%;
display: inline-block;
height: 300px;
widows: 300px;
}
li {
list-style-type: none;
display: inline-block;
margin-right: 30px;
padding-top: 4px;
text-align: center;
}
.post-content {
margin-left: 350px;
text-align: justify;
}
Put both the icons and the image in a single parent and float them left:
.post-thumb {
float: left;
}
.post-thumb img {
border-radius: 50%;
display: inline-block;
height: 300px;
widows: 300px;
}
.post-thumb li {
list-style-type: none;
display: inline-block;
margin-right: 30px;
padding-top: 4px;
text-align: center;
font-size: 48px;
}
.post-content {
margin-left: 350px;
text-align: justify;
}
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
<div class="container">
<figure class="post-thumb">
<img src="https://image.ibb.co/gmbNQT/matthew.png" alt="matthew">
<ul>
<li>
<a href="https://github.com/ankul007" target="_blank">
<i class="fa fa-github-square"></i>
</a>
</li>
<li>
<a href="https://github.com/ankul007" target="_blank">
<i class="fa fa-facebook-square"></i>
</a>
</li>
<li>
<a href="https://github.com/ankul007" target="_blank">
<i class="fa fa-twitter-square"></i>
</a>
</li>
</ul>
</figure>
<p class="post-content">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Iusto culpa eaque a laboriosam mollitia nulla tempora ab in autem doloremque praesentium, facilis, assumenda incidunt earum delectus. Sequi suscipit ad voluptates.</p>
</div>
Preview

Bootstrap column spacing inconsistent

I have columns on the home page of a website I am building, each containing an icon and text. On mobile, however, the columns stack on top of each other and have inconsistent vertical spacing, due to the inconsistent length of the text. Is there any way to force the columns to have consistent spacing in mobile view?
(If you run the below code snippet, press full page to see the spacing issue I am referring to)
.info-blocks {
margin-bottom: 15px;
/* background: #efefef; */
}
.info-blocks i.icon-info-blocks {
float: left;
color: #FFEB3B;
font-size: 30px;
min-width: 50px;
margin-top: 7px;
text-align: center;
background: #002e5b;
width: 72px;
height: 72px;
padding-top: 7px;
border: 1px solid #002e5b;
border-radius: 50%;
}
.info-blocks .info-blocks-in {
padding: 0 10px;
overflow: hidden;
}
.info-blocks .info-blocks-in h3 {
color: #002e5b;
font-size: 18px;
line-height: 28px;
margin: 0px;
margin-bottom: 8px;
font-family: 'Montserrat', sans-serif;
font-weight: 600;
}
.info-blocks .info-blocks-in p {
font-size: 14px;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" />
<script src="https://code.iconify.design/1/1.0.3/iconify.min.js"></script>
<br>
<body>
<div class="container">
<div class="row">
<div class="col-sm-4 info-blocks">
<i class="icon-info-blocks"><span class="iconify" data-icon="mdi:map-legend" data-inline="false"></span></i>
<div class="info-blocks-in">
<h3>Explore</h3>
<p>Lorem ipsum dolor sit amet</p>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-4 info-blocks">
<i class="icon-info-blocks"><span class="iconify" data-icon="mdi:map-legend" data-inline="false"></span></i>
<div class="info-blocks-in">
<h3>Explore</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras ut magna eleifend, fermentum arcu et, euismod neque. Sed ante elit.</p>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-4 info-blocks">
<i class="icon-info-blocks"><span class="iconify" data-icon="mdi:map-legend" data-inline="false"></span></i>
<div class="info-blocks-in">
<h3>Explore</h3>
<p>Lorem Ipsum</p>
</div>
</div>
</div>
</div>
</body>
You can assign a fixed height to .info-blocks .info-blocks-in
See snippet below (test it at different screen width):
.info-blocks {
margin-bottom: 15px;
/* background: #efefef; */
}
.info-blocks i.icon-info-blocks {
float: left;
color: #FFEB3B;
font-size: 30px;
min-width: 50px;
margin-top: 7px;
text-align: center;
background: #002e5b;
width: 72px;
height: 72px;
padding-top: 7px;
border: 1px solid #002e5b;
border-radius: 50%;
}
.info-blocks .info-blocks-in {
padding: 0 10px;
height:80px;
overflow: hidden;
}
.info-blocks .info-blocks-in h3 {
color: #002e5b;
font-size: 18px;
line-height: 28px;
margin: 0px;
margin-bottom: 8px;
font-family: 'Montserrat', sans-serif;
font-weight: 600;
}
.info-blocks .info-blocks-in p {
font-size: 14px;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" />
<script src="https://code.iconify.design/1/1.0.3/iconify.min.js"></script>
<br>
<body>
<div class="container">
<div class="row">
<div class="col-sm-4 info-blocks">
<i class="icon-info-blocks"><span class="iconify" data-icon="mdi:map-legend" data-inline="false"></span></i>
<div class="info-blocks-in">
<h3>Explore</h3>
<p>Lorem ipsum dolor sit amet</p>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-4 info-blocks">
<i class="icon-info-blocks"><span class="iconify" data-icon="mdi:map-legend" data-inline="false"></span></i>
<div class="info-blocks-in">
<h3>Explore</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras ut magna eleifend, fermentum arcu et, euismod neque. Sed ante elit.</p>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-4 info-blocks">
<i class="icon-info-blocks"><span class="iconify" data-icon="mdi:map-legend" data-inline="false"></span></i>
<div class="info-blocks-in">
<h3>Explore</h3>
<p>Lorem Ipsum</p>
</div>
</div>
</div>
</div>
</body>

Why are my animated container's children not animating as well?

I am trying to animate the entrance of new rows of content. I am using keyframes animations so I can later add easing. Why are my animated container's contents not animating?
I would expect the contents of each box in the row that is entering the page to expand or be hidden until enough height is available to show it.
I tried to create a stackoverflow snippet, but here is a codepen that seems to work better. https://codepen.io/AlgeoMA/pen/XgKWMq
$('#addMore').click(() => {
$('.row.last').removeClass('last');
let rowClone = $('.container .row:eq(0)').clone();
rowClone.addClass('animating');
$('.rows').append(rowClone);
})
$('#restart').click(() => {
let rowClone = $('.container .row:eq(0)').clone();
$('.rows .row').remove('.row');
$('.rows').append(rowClone);
})
.container .rows {
position: relative;
}
.container .rows .row {
display: flex;
}
.container .rows .row .block {
display: inline-block;
text-align: center;
border: 1px solid gray;
width: 200px;
height: 230px;
}
.container .rows .row .block .name, .container .rows .row .block button {
margin-top: 20px;
}
.container .rows .row .block img {
width: 90px;
height: 90px;
}
.container .rows .row.animating .block {
animation-duration: 1s;
animation-name: slidein;
}
#keyframes slidein {
from {
max-height: 0;
}
to {
max-height: 230px;
}
}
/* -------------------------------------- mostly just cruft below here ----------------------------------- */
#addMore, #restart {
position: fixed;
top: 50px;
left: 50px;
font-size: 14px;
cursor: pointer;
}
#restart {
top: 100px;
}
.bod {
background-color: lightgray;
}
.container {
display: block;
margin: auto;
width: 800px;
min-height: 1000px;
background-color: white;
}
.other-stuff {
font-size: 20px;
line-height: 2;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="bod">
<div class="container">
<button id="addMore">Add row</button>
<button id="restart">reboot</button>
<div class="rows">
<div class="row initial">
<div class="block">
<img src="https://files.slack.com/files-tmb/T0FP5QN3G-F5SA2R6UB-775bec889e/pasted_image_at_2017_06_12_12_30_pm_360.png" alt="" />
<div class="name">john doe</div>
<div class="name">stuff stuff stuff stuff stuff</div>
<button>this button does nothing</button>
</div>
<div class="block">
<img src="https://files.slack.com/files-tmb/T0FP5QN3G-F5SA2R6UB-775bec889e/pasted_image_at_2017_06_12_12_30_pm_360.png" alt="" />
<div class="name">john doe</div>
<div class="name">stuff stuff stuff stuff stuff</div>
<button>this button does nothing</button>
</div>
<div class="block">
<img src="https://files.slack.com/files-tmb/T0FP5QN3G-F5SA2R6UB-775bec889e/pasted_image_at_2017_06_12_12_30_pm_360.png" alt="" />
<div class="name">john doe</div>
<div class="name">stuff stuff stuff stuff stuff</div>
<button>this button does nothing</button>
</div>
</div>
</div>
<div class="other-stuff">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illo repellendus praesentium, tempora totam accusantium temporibus libero. Cupiditate, eveniet, consectetur sequi, esse reiciendis mollitia enim temporibus minima tenetur fuga voluptas quis?
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Tempora reiciendis enim doloribus, perspiciatis excepturi officiis velit non placeat. Consectetur totam molestias ut aliquam enim vero iure sit ipsam magnam facere.</div>
</div>
</div>
The image, text and button should not escape the border as the new row is expanding
Add overflow: hidden to .block
$('#addMore').click(() => {
$('.row.last').removeClass('last');
let rowClone = $('.container .row:eq(0)').clone();
rowClone.addClass('animating');
$('.rows').append(rowClone);
})
$('#restart').click(() => {
let rowClone = $('.container .row:eq(0)').clone();
$('.rows .row').remove('.row');
$('.rows').append(rowClone);
})
.container .rows {
position: relative;
}
.container .rows .row {
display: flex;
}
.container .rows .row .block {
display: inline-block;
text-align: center;
border: 1px solid gray;
width: 200px;
height: 230px;
}
.container .rows .row .block .name, .container .rows .row .block button {
margin-top: 20px;
}
.container .rows .row .block img {
width: 90px;
height: 90px;
}
.container .rows .row.animating .block {
animation-duration: 1s;
animation-name: slidein;
}
#keyframes slidein {
from {
max-height: 0;
}
to {
max-height: 230px;
}
}
/* -------------------------------------- mostly just cruft below here ----------------------------------- */
#addMore, #restart {
position: fixed;
top: 50px;
left: 50px;
font-size: 14px;
cursor: pointer;
}
#restart {
top: 100px;
}
.bod {
background-color: lightgray;
}
.container {
display: block;
margin: auto;
width: 800px;
min-height: 1000px;
background-color: white;
}
.other-stuff {
font-size: 20px;
line-height: 2;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="bod">
<div class="container">
<button id="addMore">Add row</button>
<button id="restart">reboot</button>
<div class="rows">
<div class="row initial">
<div class="block">
<img src="https://files.slack.com/files-tmb/T0FP5QN3G-F5SA2R6UB-775bec889e/pasted_image_at_2017_06_12_12_30_pm_360.png" alt="" />
<div class="name">john doe</div>
<div class="name">stuff stuff stuff stuff stuff</div>
<button>this button does nothing</button>
</div>
<div class="block">
<img src="https://files.slack.com/files-tmb/T0FP5QN3G-F5SA2R6UB-775bec889e/pasted_image_at_2017_06_12_12_30_pm_360.png" alt="" />
<div class="name">john doe</div>
<div class="name">stuff stuff stuff stuff stuff</div>
<button>this button does nothing</button>
</div>
<div class="block">
<img src="https://files.slack.com/files-tmb/T0FP5QN3G-F5SA2R6UB-775bec889e/pasted_image_at_2017_06_12_12_30_pm_360.png" alt="" />
<div class="name">john doe</div>
<div class="name">stuff stuff stuff stuff stuff</div>
<button>this button does nothing</button>
</div>
</div>
</div>
<div class="other-stuff">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illo repellendus praesentium, tempora totam accusantium temporibus libero. Cupiditate, eveniet, consectetur sequi, esse reiciendis mollitia enim temporibus minima tenetur fuga voluptas quis?
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Tempora reiciendis enim doloribus, perspiciatis excepturi officiis velit non placeat. Consectetur totam molestias ut aliquam enim vero iure sit ipsam magnam facere.</div>
</div>
</div>

Internet Explorer/Safari Flexbox(?) and Alignment Issues

I'm having some issues with item alignment in IE and Safari and I'm not that good on cross-browser compatibility so would appreciate it if someone could suggest what I'm doing wrong with the following or what may be a good general fix.
Codepen: http://codepen.io/nickwcook/pen/vxjavM?editors=0110.
EDIT: Home image alignment sorted, but still having issues with the following:
The text in the About section of the page is fine in other browsers, but in IE its not taking into account the horizontal padding (30px) of the parent, and is actually overflowing past the sides of the viewport.
HTML:
<body ng-app="portfolioApp" data-spy="scroll" data-target="#navbar">
<div id="borderTop"></div>
<div id="borderRight"></div>
<div id="borderBottom"></div>
<div id="borderLeft"></div>
<div id="logo">
<img src="img/logo-basic-dark.png" alt="Logo">
</div>
<div class="container-fluid">
<nav class="navbar navbar-default navbar-fixed-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="navbar">
<ul class="nav navbar-nav pull-right">
<li class="navLink">Home</li>
<li class="navLink">About</li>
<li class="navLink">Work</li>
<li class="navLink">Contact</li>
</ul>
</div>
</nav>
</div>
<main>
<section id="home">
<div class="sectionContent">
<div id="homeText">
<h1 id="homePrimary">Home Text Primary</h1>
<h2 id="homeSecondary">Home Text Secondary</h2>
</div>
<div id="homeImageContainer">
<div id="homeImage" class="blend-red-blue">
<div id="homeImageMask"></div>
</div>
</div>
</div>
</section>
<section id="about" ng-controller="skillsController">
<div class="sectionContent">
<div class="row">
<div class="col-xs-12 col-md-8 col-md-push-2">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<div id="skillsList">
<p>My skills include:</p>
<p ng-repeat="skill in skills" class="skillItem">{{skill.name}}</p>
</div>
</div>
</div>
</div>
</section>
<section id="work" ng-controller="projectsController">
<div class="sectionContent">
<div class="row">
<div class="project col-xs-12 col-md-6 col-lg-3">
<div>
<h2>Project One</h2>
<h4>Project Description</h4>
<a ng-href="#" target="blank_">View Project</a>
</div>
</div>
<div class="project col-xs-12 col-md-6 col-lg-3">
<div>
<h2>Project One</h2>
<h4>Project Description</h4>
<a ng-href="#" target="blank_">View Project</a>
</div>
</div>
<div class="project col-xs-12 col-md-6 col-lg-3">
<div>
<h2>Project One</h2>
<h4>Project Description</h4>
<a ng-href="#" target="blank_">View Project</a>
</div>
</div>
<div class="project col-xs-12 col-md-6 col-lg-3">
<div>
<h2>Project One</h2>
<h4>Project Description</h4>
<a ng-href="#" target="blank_">View Project</a>
</div>
</div>
</div>
</div>
</section>
<section id="contact">
<div class="sectionContent">
</div>
</section>
</main>
</body>
CSS:
/* GENERAL LAYOUT */
html, body
{
padding: 0;
margin: 0;
background-color: #fefefe;
overflow-x: hidden;
}
/* SECTIONS */
section
{
display: block;
margin: 0;
background: transparent;
z-index: 90;
}
.sectionContent
{
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
padding: 100px 30px;
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
}
/* HOME SECTION */
#home #homeImageContainer
{
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
#home #homeImage
{
position: absolute;
height: 30vw;
width: 30vw;
background-image: url('../img/laptop-hands.png');
background-position: center center;
background-size: cover;
z-index: 90;
-webkit-box-shadow: 3px 3px 100px 4px rgba(153,153,153,1);
-moz-box-shadow: 3px 3px 100px 4px rgba(153,153,153,1);
box-shadow: 3px 3px 100px 4px rgba(153,153,153,1);
}
#home #homeImage > #homeImageMask
{
height: 100%;
width: 100%;
background-color: rgba(84, 17, 200, 0.6);
z-index: 91;
}
#home #homeText
{
z-index: 95;
}
#homeText h1#homePrimary,
#homeText h2#homeSecondary
{
color: #000;
text-align: center;
}
#homeText h1#homePrimary
{
font-size: 30px;
font-weight: 600;
margin-bottom: 10px;
}
#homeText h2#homeSecondary
{
font-family: 'Open Sans', sans-serif;
font-size: 16px;
font-weight: 600;
}
/* ABOUT SECTION */
#about p
{
line-height: 26px;
text-align: center;
}
#about #skillsList
{
width: 100%;
text-align: center;
margin-top: 50px;
}
#about #skillsList p:first-of-type
{
margin-bottom: 10px;
}
#about #skillsList p.skillItem
{
display: inline;
margin: 0 15px;
}
what about simplifying like this:
body, h1, h2 {
margin: 0;
}
.box-content {
width: 30vw;
height: 30vw;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
padding: 100px 30px;
box-sizing: border-box;
background: rgba(84, 17, 200, 0.6);
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: auto;
box-shadow: 3px 3px 100px 4px rgba(153, 153, 153, 1);
text-align: center;
}
<div class="sectionContent">
<div id="homeText" class="box-content">
<h1 id="homePrimary">Home Text Primary</h1>
<h2 id="homeSecondary">Home Text Secondary</h2>
</div>
</div>
You can remove absolute css property from selector '#home #homeImage' issue is fixed at my end

Resources