Page scrolling even when there's no content - html

My web page is scrolling to the right even though there's no content there and there's just empty white space there. The content isn't over 100vw and if I reduce it, then it doesn't fill the page.
Perhaps some of the CSS I've written has caused this? What do I need to change/add to my code to fix this? Thanks.
Home.css
#wrapper {padding: 0; margin: 0; box-sizing: border-box;}
.section
{
padding: 0 20px 20px 20px;
width: 100vw;
display: flex;
flex-direction: column;
text-align: justify;
top: -110px;
left: -230px;
height: 100vh;
justify-content: center;
align-items: center;
position: relative;
background-image: url(../images/background.jpg);
background-position: center;
background-size: cover;
}
h1 {
color: white;
font-size: 70px;
margin-top: 40px;
z-index: 1;
position: relative;
}
.section:after {
content: '';
width: 100%;
height: 100%;
left: 0;
position: absolute;
background: rgba(214, 87, 214, 0.03);
}
.name {
font-family: 'Amatic SC', cursive;
font-size: 62px;
margin-top: 90px;
animation-name: slideInLeft;
animation-duration: 4s;
animation-timing-function: ease-in;
}
#keyframes slideInLeft {
0% {margin-left: -1600px;}
100% {margin-left: 0px;}
}
.role {
animation-name: slideInRight;
animation-duration: 4s;
animation-timing-function: ease-in;
}
#keyframes slideInRight {
0% {margin-right: -1600px;}
100% {margin-right: 0px;}
}
/* width */
::-webkit-scrollbar {
width: 20px;
}
/* Track */
::-webkit-scrollbar-track {
background: #ffffff;
}
::-webkit-scrollbar-thumb {
background: rgb(155, 12, 48) ;
background: radial-gradient(circle, rgb(155, 12, 48) 0%, rgb(63, 2, 87) 100%);
border-radius: 0.6em;
height: 22px;
}
.name {
color: rgb(231, 139, 139);
}
App.css
:root {
--off-white: #fafafa;
}
.nav {
background-color: var(--off-white);
position: sticky;
top: 0px;
width: 100%;
height: 80px;
z-index: 1000;
box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.15);
}
.nav-btn {
height: 60px;
width: 60px;
}
.nav .nav-content {
max-width: 900px;
padding: 0rem 3rem;
margin: 0 auto;
display: flex;
justify-content: space-between;
align-items: center;
height: 100%;
}
.nav-item {
display: inline;
top: 40px;
margin-left: 2rem;
color: white;
font-size: 18px;
z-index: 1;
position: relative;
}
.nav-item:hover {
color: black;
cursor: pointer;
}
.section-content {
max-width: 800px;
margin: 0 auto;
padding: 40px;
}

Have you tried the overflow property,
{
overflow:hidden
}

it's kinda hard to analyze it without HTML code.
But maybe that line is your problem:
.section
{
..
left: -230px;
..
}

Related

CSS not working within Reactjs like another project

CSS not working within Reactjs like another project.
I am working on a project within Reactjs and for my home page I want to have a particular UI/UX and I have made it within regular HTML/CSS (see: https://replit.com/#Reverence/DistantUnconsciousFibonacci#index.html). But when I add the code to my react project (see: https://replit.com/#Reverence/MemorableExperiencedGoal#src/App.jsx) it is somewhat off and not what I had written before despite it being the same code. Is there something I'm missing?
Here is the CSS:
#import url('https://fonts.googleapis.com/css2?family=Poppins&family=Source+Sans+Pro&display=swap');
*{
box-sizing: border-box;
padding: 0;
margin: 0;
}
body{
background-color: #0d1721;
}
#box{
margin: 0;
padding: 0;
position: relative;
display: inline-block;
width: calc(32vw - 3px);
height: 100vh;
text-align: center;
}
#box:hover{
cursor: pointer;
animation: hoverAnimation 1.5s forwards;
}
#keyframes hoverAnimation {
0% {background-color: #009688; height: 0vh;}
100% {background-color: #009688; height: 100vh;}
}
#keyframes fadeInDown {
0% {opacity: 0; transform: translateY(-20px);}
100% {opacity: 1;transform: translateY(0);}
}
.title{
font-family: Poppins, sans-serif;
color: #FBFCFC;
text-align: center;
padding-top: 35vh;
display: inline-block;
height: 100vh;
font-size: 30px;
font-weight: 600;
text-decoration-line: none;
animation: fadeInDown 2s;
}
.title::after {
content: "";
display: block;
margin: 5px auto 0 auto;
height: 2px;
width: 0px;
background-color: #FBFCFC;
}
.title:hover::after {
width: 100%;
transition: all 0.5s;
}
#media screen and (max-width: 820px){
#box{width:100vw!important;padding:0!important;height:0!important;}
}
#mountains{
margin: 0;
padding: 0;
position: relative;
display: inline-block;
width: calc(33.3% - 3px);
height: 100vh;
text-align: center;
background-image: url("https://distantunconsciousfibonacci.reverence.repl.co/mountains.jpg");
}
#mountains:hover{
cursor: pointer;
animation: hoverAnimation 1.5s forwards;
}
#piedmont{
margin: 0;
padding: 0;
position: relative;
display: inline-block;
width: calc(33.3% - 3px);
height: 100vh;
text-align: center;
background-image: url("https://distantunconsciousfibonacci.reverence.repl.co/boat.png");
}
#piedmont:hover{
cursor: pointer;
animation: hoverAnimation 1.5s forwards;
}
#coast{
margin: 0;
padding: 0;
position: relative;
display: inline-block;
width: calc(33.3% - 3px);
height: 100vh;
text-align: center;
background-image: url("https://distantunconsciousfibonacci.reverence.repl.co/coastal-waterway.jpg");
}
#coast:hover{
cursor: pointer;
animation: hoverAnimation 1.5s forwards;
}

Trying to make animation on hr tag but it's not working

I'm trying to make the hr tag to animate from left to right and repeat,
and stay kinda center under the h2 tag,
but the animation not working... is anyone know why?
.div-projects {
margin-top: 200px;
display: flex;
justify-content: center;
align-items: center;
}
.div-projects h2 {
font-size: 55px;
padding: 90px;
color: white;
transform: skewY(-9deg);
}
.hr-projects {
width: 20%;
border-radius: 30px;
z-index: 2;
left: 900px;
bottom: 60px;
transform: skewY(-6deg);
border: 3px solid rgba(0, 136, 169, 1);
position: relative;
animation: alternate hr 19s infinite;
}
#keyframes hr {
from {
left: 900px;
}
to {
right: 600px;
}
}
<div class="div-projects">
<h2>Projects</h2>
</div>
<hr class="hr-projects">
You need to make animation/transition on same property.
So far example change from left 0 to left 100%, or left:50px to left:200px etc.
.div-projects {
margin-top: 200px;
display: flex;
justify-content: center;
align-items: center;
}
.div-projects h2 {
font-size: 55px;
padding: 90px;
color: white;
transform: skewY(-9deg);
}
.hr-projects {
width: 20%;
border-radius: 30px;
z-index: 2;
left: 900px;
bottom: 60px;
transform: skewY(-6deg);
border: 3px solid rgba(0, 136, 169, 1);
position:relative;
animation:alternate hr 19s infinite;
}
#keyframes hr {
from {
left: 0;
}
to {
left: 100%;
}
}
<div class="div-projects">
<h2>Projects</h2>
</div>
<hr class="hr-projects">

Footer is not aligning to the bottom of the page [duplicate]

This question already has answers here:
Footer at bottom of page or content, whichever is lower
(5 answers)
Closed 11 months ago.
I have a HTML. And i want to add the Footer to it but it is not aligning to it's bottom.
#import url(https://fonts.googleapis.com/css?family=Gudea:400,700);
#import url(https://fonts.googleapis.com/css2?family=Poppins:wght#200;300;400;500;600;700&display=swap);
#import url(https://fonts.googleapis.com/css2?family=Poppins:wght#100;200;300;400;500;600;700;800;900&display=swap);
#import url(https://fonts.googleapis.com/css2?family=Balsamiq+Sans:wght#400;700&family=Mochiy+Pop+P+One&display=swap);
:root {
--dark-one: #333;
--dark-two: #7a7a7a;
--main-color: #784cfb;
--light-one: #fff;
--light-two: #f9fafb;
--light-three: #f6f7fb;
--color_one: #ee1d52;
--color_two: #69c9d0;
--color_three: rgba(2, 0, 36, 1);
--gradient: linear-gradient(90deg, var(--color_three) 0%, var(--color_one) 35%, var(--color_three) 100%)
}
body {
perspective: 800px;
height: 100vh;
margin: 0;
overflow: hidden;
font-family: "Gudea", sans-serif;
background: #ea5c54;
background: -moz-linear-gradient(-45deg, #ea5c54 0%, #bb6dec 100%);
background: -webkit-gradient(linear, left top, right bottom, color-stop(0%, #ea5c54), color-stop(100%, #bb6dec));
background: -webkit-linear-gradient(-45deg, #ea5c54 0%, #bb6dec 100%);
background: -o-linear-gradient(-45deg, #ea5c54 0%, #bb6dec 100%);
background: -ms-linear-gradient(-45deg, #ea5c54 0%, #bb6dec 100%);
background: linear-gradient(135deg, #ea5c54 0%, #bb6dec 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#EA5C54 ', endColorstr='#bb6dec', GradientType=1);
}
body ::-webkit-input-placeholder {
color: #4e546d
}
body .authent {
display: none;
background: #35394a;
background: -moz-linear-gradient(45deg, #35394a 0%, #1f222e 100%);
background: -webkit-gradient(linear, left bottom, right top, color-stop(0%, #35394a), color-stop(100%, #1f222e));
background: -webkit-linear-gradient(45deg, #35394a 0%, #1f222e 100%);
background: -o-linear-gradient(45deg, #35394a 0%, #1f222e 100%);
background: -ms-linear-gradient(45deg, #35394a 0%, #1f222e 100%);
background: linear-gradient(45deg, #35394a 0%, #1f222e 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#35394a', endColorstr='#1f222e', GradientType=1);
position: absolute;
left: 0;
right: 90px;
margin: auto;
width: 100px;
color: white;
text-transform: uppercase;
letter-spacing: 1px;
text-align: center;
padding: 20px 70px;
top: 200px;
bottom: 0;
height: 70px;
opacity: 0
}
body .authent p {
text-align: center;
color: white
}
body .success {
display: none;
color: #d5d8e2;
margin: 40px auto;
align-items: center;
text-align: center
}
body .success p {
font-size: 14px
}
body p {
color: #5b5e6f;
font-size: 10px;
text-align: left
}
body .testtwo {
left: -320px!important
}
body .test {
box-shadow: 0px 20px 30px 3px rgba(0, 0, 0, 0.55);
pointer-events: none;
top: -100px!important;
transform: rotateX(70deg) scale(0.8)!important;
opacity: 0.6!important;
filter: blur(1px)
}
body .login {
opacity: 1;
z-index: -1;
top: 20px;
height: 300px;
width: 240px;
-webkit-transition-timing-function: cubic-bezier(0.68, -0.25, 0.265, 0.85);
transition-property: transform, opacity, box-shadow, top, left;
transition-duration: 0.5s;
transform-origin: 161px 100%;
transform: rotateX(0deg);
position: relative;
border-top: 2px solid #d8312a;
position: absolute;
left: 0;
right: 0;
margin: auto;
top: 0;
bottom: 0;
padding: 100px 40px 40px 40px;
background: #35394a;
background: -moz-linear-gradient(45deg, #35394a 0%, #1f222e 100%);
background: -webkit-gradient(linear, left bottom, right top, color-stop(0%, #35394a), color-stop(100%, #1f222e));
background: -webkit-linear-gradient(45deg, #35394a 0%, #1f222e 100%);
background: -o-linear-gradient(45deg, #35394a 0%, #1f222e 100%);
background: -ms-linear-gradient(45deg, #35394a 0%, #1f222e 100%);
background: linear-gradient(45deg, #35394a 0%, #1f222e 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#35394a', endColorstr='#1f222e', GradientType=1)
}
body .login .validation {
position: absolute;
z-index: 1;
right: 10px;
top: 6px;
opacity: 0
}
body .login .disclaimer {
position: absolute;
bottom: 20px;
left: 35px;
width: 250px
}
body .login_title {
color: #afb1be;
height: 60px;
text-align: left;
font-size: 16px
}
body .login_fields {
height: 208px;
position: absolute;
left: 0
}
body .login_fields .icon {
position: absolute;
z-index: 1;
left: 36px;
top: 8px;
opacity: 0.5
}
body .login_fields input[type="password"] {
color: #dc6180!important
}
body .login_fields input[type="text"],
body .login_fields input[type="password"] {
color: #afb1be;
width: 190px;
margin-top: -2px;
background: #32364a;
left: 0;
padding: 10px 65px;
border-top: 2px solid #393d52;
border-bottom: 2px solid #393d52;
border-right: none;
border-left: none;
outline: none;
font-family: "Gudea", sans-serif;
box-shadow: none
}
body .login_fields__user,
body .login_fields__password {
position: relative
}
body .login_fields__submit {
position: relative;
top: 35px;
left: 0;
width: 80%;
right: 0;
margin: auto
}
body .login_fields__submit .forgot {
float: right;
font-size: 10px;
margin-top: 11px;
text-decoration: underline
}
body .login_fields__submit .forgot a {
color: #606479
}
body .login_fields__submit input {
border-radius: 50px;
background: transparent;
padding: 10px 50px;
border: 2px solid #dc6180;
color: #dc6180;
text-transform: uppercase;
font-size: 11px;
transition-property: background, color;
transition-duration: 0.2s
}
body .login_fields__submit input:focus {
box-shadow: none;
outline: none
}
body .login_fields__submit input:hover {
color: white;
background: #dc6180;
cursor: pointer;
transition-property: background, color;
transition-duration: 0.2s
}
.love {
position: absolute;
right: 20px;
bottom: 0px;
font-size: 11px;
font-weight: normal
}
.love p {
color: white;
font-weight: normal;
font-family: "Open Sans", sans-serif
}
.love a {
color: white;
font-weight: 700;
text-decoration: none
}
.love img {
position: relative;
top: 3px;
margin: 0px 4px;
width: 10px
}
.brand {
position: absolute;
left: 20px;
bottom: 14px
}
.brand img {
width: 30px
}
h1 {
position: relative;
text-align: center;
color: #353535;
font-size: 50px;
font-family: "Cormorant Garamond", serif
}
p {
font-family: "Lato", sans-serif;
font-weight: 300;
text-align: center;
font-size: 18px;
color: #676767
}
.frame {
width: 90%;
margin: 40px auto;
text-align: center
}
.thumb_img {
max-width: 110%;
margin-left: -14px;
margin-top: -54px
}
button {
margin: 20px
}
.custom-btn {
width: 130px;
height: 40px;
color: #fff;
border-radius: 5px;
padding: 10px 25px;
font-family: "Lato", sans-serif;
font-weight: 500;
background: transparent;
cursor: pointer;
transition: all 0.3s ease;
position: relative;
display: inline-block;
box-shadow: inset 2px 2px 2px 0px rgba(255, 255, 255, 0.5), 7px 7px 20px 0px rgba(0, 0, 0, 0.1), 4px 4px 5px 0px rgba(0, 0, 0, 0.1);
outline: none
}
.btn {
border: none;
background: rgb(251, 33, 117);
background: linear-gradient(0deg, rgba(251, 33, 117, 1) 0%, rgba(234, 76, 137, 1) 100%);
color: #fff;
overflow: hidden;
margin: auto;
margin-top: 10px
}
.btn:hover {
text-decoration: none;
color: #fff
}
.btn:before {
position: absolute;
content: "";
display: inline-block;
top: -180px;
left: 0;
width: 30px;
height: 100%;
background-color: #fff;
animation: shiny-btn1 3s ease-in-out infinite
}
.btn:hover {
opacity: 0.7
}
.btn:active {
box-shadow: 4px 4px 6px 0 rgba(255, 255, 255, 0.3), -4px -4px 6px 0 rgba(116, 125, 136, 0.2), inset -4px -4px 6px 0 rgba(255, 255, 255, 0.2), inset 4px 4px 6px 0 rgba(0, 0, 0, 0.2)
}
#-webkit-keyframes shiny-btn1 {
0% {
-webkit-transform: scale(0) rotate(45deg);
opacity: 0
}
80% {
-webkit-transform: scale(0) rotate(45deg);
opacity: 0.5
}
81% {
-webkit-transform: scale(4) rotate(45deg);
opacity: 1
}
100% {
-webkit-transform: scale(50) rotate(45deg);
opacity: 0
}
}
#context-menu {
position: absolute;
height: auto;
display: block;
top: 10%;
left: 40%;
border-radius: 5px;
width: 200px
}
ul {
list-style-type: none
}
li.menu-items {
height: 50px;
margin-top: 7px;
background-color: #fff;
box-shadow: 0 2px 20px 2px #22222225;
width: 100%;
border-radius: 4px;
font-size: 20px;
color: #444;
line-height: 50px;
vertical-align: middle;
padding-left: 15px;
cursor: pointer;
transition: all 0.1s ease-in;
transform-origin: top left;
transform: rotateY(90deg) rotateX(45deg)
}
li.menu-items:nth-child(1) {
transition: transform 0.25s 0s cubic-bezier(0, 0.36, 0.95, -0.2), background-color 0.15s ease-in
}
li.menu-items:nth-child(2) {
transition: transform 0.25s 0.15s cubic-bezier(0, 0.36, 0.95, -0.2), background-color 0.15s ease-in
}
li.menu-items:nth-child(3) {
transition: transform 0.25s 0.3s cubic-bezier(0, 0.36, 0.95, -0.2), background-color 0.15s ease-in
}
li.menu-items:nth-child(4) {
transition: transform 0.25s 0.45s cubic-bezier(0, 0.36, 0.95, -0.2), background-color 0.15s ease-in
}
li.menu-items:hover {
background-color: coral;
color: #fff;
transform: perspective(10px)
}
a img {
border: 0
}
h1 {
font: bold 32px Helvetica, Arial, Sans-Serif;
letter-spacing: -1px;
margin: 50px 0 20px 0
}
p {
margin: 0 0 20px 0
}
.close-icon:hover {
background: #efefef
}
*,
*::before,
*::after {
margin: 0;
padding: 0
}
html {
scroll-behavior: smooth
}
#header {
font-family: "Poppins", sans-serif
}
#header a {
text-decoration: none
}
#header ul {
list-style: none
}
#header img {
width: 100%
}
#header .container {
position: relative;
z-index: 5;
max-width: 92rem;
padding: 0 4rem;
margin: 0 auto
}
.stop-scrolling {
height: 150%;
overflow: hidden
}
#header .grid-2 {
display: grid;
grid-template-columns: repeat(2, 1fr);
align-items: center;
justify-content: center
}
#header .text {
font-size: 1.25rem;
color: var(--dark-two);
line-height: 1.6
}
.column-1 {
margin-right: 1.5rem
}
.column-2 {
margin-left: 1.5rem
}
#header .image {
position: relative;
display: flex;
align-items: center;
justify-content: center
}
.z-index {
position: relative;
z-index: 2
}
#header .overlay {
position: absolute;
width: 100%;
height: 100%;
overflow: hidden;
top: 0;
left: 0
}
#header .overlay .shape {
width: initial;
opacity: 0.13;
position: absolute
}
#header .overlay.overlay-lg .shape {
height: 55px
}
#header .overlay.overlay-lg .shape.wave {
height: initial;
width: 88px
}
#header .overlay.overlay-lg .shape.xshape {
height: 38px
}
#header .overlay.overlay-sm .shape {
filter: brightness(0) invert(1);
opacity: 0.15;
height: 40px
}
#header .overlay.overlay-sm .shape.wave {
height: initial;
width: 70px
}
#header .overlay.overlay-sm .shape.xshape {
height: 30px
}
#header .points {
opacity: 0.3;
position: absolute
}
#header .section {
padding: 7rem 0;
overflow: hidden
}
.section-header {
text-align: center;
margin-bottom: 1.5rem
}
#header .title {
position: relative;
display: inline-block;
padding-bottom: 1rem;
line-height: 1;
font-size: 2.8rem;
margin-bottom: 0.6rem
}
#header .title:before {
content: attr(data-title);
display: block;
margin-bottom: 0.4rem;
color: var(--main-color);
font-size: 1.15rem;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 3px
}
#header .title:after {
content: "";
position: absolute;
width: 90px;
height: 5px;
border-radius: 3px;
background-color: var(--main-color);
bottom: 0;
left: 50%;
transform: translateX(-50%)
}
#header .section-header .text {
max-width: 600px;
margin: 0 auto
}
#header .title-sm {
color: var(--dark-one);
font-weight: 600;
font-size: 1.6rem
}
#header .points-sq {
width: 210px
}
#header .btn {
display: inline-block;
padding: 0.85rem 2rem;
background-color: var(--main-color);
color: var(--light-one);
border-radius: 2rem;
font-size: 1.05rem;
text-transform: uppercase;
font-weight: 500;
transition: 0.3s
}
#header .btn:hover {
background-color: #6b44e0
}
#header .btn.small {
padding: 0.7rem 1.8rem;
font-size: 1rem
}
header {
width: 100%;
background-color: var(--light-three);
overflow: hidden;
position: relative
}
#header nav {
width: 100%;
position: relative;
z-index: 50
}
#header nav .container {
display: flex;
justify-content: space-between;
height: 4.5rem;
align-items: center
}
#header .logo {
width: 65px;
display: flex;
align-items: center
}
.links ul {
display: flex
}
.links a {
display: inline-block;
padding: 0.9rem 1.2rem;
color: var(--dark-one);
font-size: 1.05rem;
text-transform: uppercase;
font-weight: 500;
line-height: 1;
transition: 0.3s
}
.links a.active {
background-color: var(--main-color);
color: var(--light-one);
border-radius: 2rem;
font-size: 1rem;
padding: 0.9rem 2.1rem;
margin-left: 1rem
}
.links a:hover {
color: var(--main-color)
}
.links a.active:hover {
color: var(--light-one);
background-color: #6b44e0
}
.hamburger-menu {
width: 2.7rem;
height: 3rem;
z-index: 100;
position: relative;
display: none;
align-items: center;
justify-content: flex-end
}
.hamburger-menu .bar {
position: relative;
width: 2.1rem;
height: 3px;
border-radius: 3px;
background-color: var(--dark-one);
transition: 0.5s
}
.bar:before,
.bar:after {
content: "";
position: absolute;
width: 2.1rem;
height: 3px;
border-radius: 3px;
background-color: var(--dark-one);
transition: 0.5s
}
.bar:before {
transform: translateY(-9px)
}
.bar:after {
transform: translateY(9px)
}
nav.open .hamburger-menu .bar {
background-color: transparent;
transform: rotate(360deg)
}
nav.open .hamburger-menu .bar:before {
transform: translateY(0) rotate(45deg);
background-color: var(--light-one)
}
nav.open .hamburger-menu .bar:after {
transform: translateY(0) rotate(-45deg);
background-color: var(--light-one)
}
nav.open .links {
transform: translateX(0)
}
.header-content .container.grid-2 {
grid-template-columns: 2.5fr 3.5fr;
min-height: calc(100vh - 6rem);
padding-bottom: 2.5rem;
text-align: left
}
.header-title {
font-size: 3.8rem;
line-height: 0.8;
color: var(--dark-one)
}
.header-content .text {
margin: 2.15rem 0
}
.header-content .image .img-element {
max-width: 750px
}
header .points1 {
width: 420px;
bottom: -75px;
left: -150px
}
header .points2 {
width: 70%;
top: 65%;
left: 71%
}
header .square {
right: 68%;
top: 71%
}
header .triangle {
right: 7%;
bottom: 75%
}
header .xshape {
right: 4%;
bottom: 50%
}
header .half-circle1 {
left: 50%;
bottom: 82%
}
header .half-circle2 {
left: 5%;
top: 67%
}
header .wave1 {
bottom: 75%;
left: 20%
}
header .wave2 {
bottom: 8%;
right: 55%
}
header .circle {
left: 38%;
bottom: 63%
}
.letters {
position: absolute;
width: 13.5%;
top: -5px;
left: 15px;
opacity: 0.06
}
#media (max-width:1280px) {
.overlay.overlay-lg .shape {
height: 35px
}
.overlay.overlay-lg .shape.wave {
height: initial;
width: 63px
}
.overlay.overlay-lg .shape.xshape {
height: 24px
}
header .points1 {
width: 270px;
bottom: -50px;
left: -75px
}
header .letters {
width: 11%
}
nav .container {
height: 4.5rem
}
.logo {
width: 65px
}
.links a {
font-size: 0.8rem;
padding: 0.65rem 0.7rem
}
.links a.active {
font-size: 0.7rem;
padding: 0.7rem 1.7rem;
margin-left: 0.6rem
}
}
#media (max-width:425px) {
.connection-wrapper .toast {
width: 300px
}
}
#media (max-width:850px) {
.hamburger-menu {
display: flex;
margin-right: -2rem
}
#header img {
margin-left: -3rem
}
.links {
position: fixed;
width: 100%;
height: 100vh;
top: 0;
right: 0;
background-color: #252525;
display: none;
align-items: center;
justify-content: center;
text-align: center;
transform: translateX(100%);
transition: 0.5s
}
.links ul {
flex-direction: column
}
.links a {
color: var(--light-one)
}
.links a.active {
margin-left: 0;
margin: 0.5rem 0
}
.letters,
header .half-circle2,
header .points1,
header .wave2 {
display: none
}
header .half-circle1 {
bottom: 55%;
left: 23%
}
header .circle {
left: 8%;
bottom: 40%
}
header .wave1 {
bottom: 87%;
left: 75%
}
header .square {
top: initial;
bottom: 5%;
left: 13%
}
header .triangle {
right: 14%;
bottom: 63%
}
header .xshape {
left: 90%;
top: 54%
}
}
#media (max-width:560px) {
.container {
padding: 0 2rem
}
.overlay.overlay-lg .shape {
height: 28px
}
.overlay.overlay-lg .shape.wave {
height: initial;
width: 52px
}
.overlay.overlay-lg .shape.xshape {
height: 22px
}
}
footer {
bottom: 0;
color: #14171a;
font-family: "Balsamiq Sans", sans-serif
}
footer a,
footer a:hover {
text-decoration: none;
color: inherit
}
.page-footer {
margin-top: 35px;
border-top: 1px solid #e6e5e6
}
.primary-footer {
padding: 36px 0!important;
background-color: #f2f3f5;
color: #666;
font-size: 14px;
line-height: 24px
}
.primary-footer ul {
margin: 0;
padding: 0;
list-style-type: none
}
.primary-footer .copyright {
margin-bottom: 0
}
.primary-footer ul li {
display: inline-block;
margin-right: 16px
}
.primary-footer a {
color: #737373;
font-weight: 600
}
.primary-footer .dislaimer {
border-top: 1px solid #e4e2e4;
margin: 23px 0 0;
padding-top: 23px;
font-weight: 300
}
.primary-footer a {
color: #737373;
font-weight: 600;
transition: color 0s ease-in-out
}
.primary-footer .dislaimer a {
font-weight: 300;
transition: all 0s ease
}
.primary-footer a:hover {
text-decoration: none;
color: var(--hover)
}
#media only screen and (max-width:767px) {
.primary-footer .copyright {
width: 100%;
text-align: center;
margin-top: 12px
}
.primary-footer ul {
text-align: center;
width: 100%
}
}
footer .flex {
display: flex
}
footer .flex-wrap {
flex-wrap: wrap
}
footer .justify-content-between {
justify-content: space-between
}
footer .align-items-center {
align-items: center
}
footer .text-center {
text-align: center
}
footer .position-relative {
position: relative
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<title>Download Now</title>
<link href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css" rel="stylesheet" />
<link href="https://unicons.iconscout.com/release/v3.0.6/css/line.css" rel="stylesheet" />
</head>
<body>
<header id="header">
<nav>
<div class="container">
<div class="logo">
<img src="./favicon.ico" alt="" />
</div>
<div class="links">
<ul>
<li>
Why Us?
</li>
<li>
FAQs
</li>
<li>
Stats
</li>
<li>
Support Group
</li>
</ul>
</div>
<div class="hamburger-menu">
<div class="bar"></div>
</div>
</div>
</nav>
</header>
<form id="download_video">
<div class="login">
<div class="login_title"><span>Download Videos Online</span></div>
<input type="hidden" name="sss" value="VideoDownloader" />
<div class="login_fields">
<div class="login_fields__user">
<div class="icon"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/217233/user_icon_copy.png" /></div>
<input type="text" id="video" name="video_url" placeholder="Video URL" />
<div class="validation"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/217233/tick.png" /></div>
</div>
<div class="login_fields__submit">
<input type="button" id="get_formats" name=jjs " value="Check Link " />
<div class="forgot ">
Supported Websites
</div>
</div>
</div>
<div class="success " id="formats ">
<img class="thumb_img " id="thumb_img " src="image/not-available.png " height="150 " align="middle " />
<br />
<br />
<label for="standard-select ">Select the preferred quality</label>
<select id="standard-select "></select>
</div>
<div class="disclaimer ">
<p>No Porn Allowed</p>
</div>
</div>
</form>
<div id="context-menu " style="display: none; ">
<ul>
<li class="menu-items ">Developer</li>
<li class="menu-items ">Support Group</li>
<li class="menu-items ">Reload</li>
<li class="menu-items ">Source Code</li>
<li class="menu-items ">Inspect</li>
</ul>
</div>
<div class="authent ">
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/217233/puff.svg " />
<p>Checking URL....</p>
</div>
<footer class="page-footer ">
<div class="primary-footer position-relative ">
<div class="container ">
<div class="flex flex-wrap justify-content-between align-items-center ">
<ul>
<li><a title="About " href="/about-us ">About</a></li>
<li><a title="Privacy Policy " href="/privacy-policy ">Privacy Policy</a></li>
<li><a title="Terms of Service " href="/terms ">Terms of Service</a></li>
<li><a title="Contact Us " href="/contact-us ">Contact Us</a></li>
</ul>
<p class="copyright ">Copyright © 2022 All rights reserved.</p>
</div>
<p class="dislaimer text-center ">
Disclaimer:- <a title="WeSing Downloader " href="/ ">DLNow.ml</a>
is Not associated with Any Supported Sites in any ways and DLNow.ml does not host any of the video or audio on our servers, and all videos or audio that you download from our tool are downloaded from their respective
CDN servers.
</p>
</div>
</div>
</footer>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js "></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js "></script>
<script src="static/js/index.js "></script>
</body>
</html>
But in it my Footer is not aligning to the bottom of the page...
I have tried setting position: absolute; but it work but it is covering the main content.
I also tried setting the bottom: 0; but it was also found not to be working.
So, kindly help me to get out of it...
Original Look
Look with absolute position
https://i.stack.imgur.com/43z0u.jpg
https://i.stack.imgur.com/nNHE2.jpg
UPDATED
I did modify some of your CSS, you can check it out here
https://jsfiddle.net/wmLvqyj4/3/
For the mobile's screen size, it's too small for your form but tablet and desktop's are good
OLD ANSWER
I cannot run your CSS properly but can suggest you to do this way https://jsfiddle.net/479dnqy2/1/
Usually, a page footer is a static content, so we briefly know its height. You can set your page content's height with this formula your content height = full page height - footer height
.page-content {
min-height: calc(100vh - 10rem); /*10rem is the size of footer*/
}
.page-footer {
height: 10rem; /*the fixed height of the footer*/
}
How about this?
footer {
position: fixed;
bottom: 0;
}
or
footer {
position: absolute;
bottom: 0;
width: 100%;
height: 2.5rem; /* Footer height */
}

Display rectangular image in quare from the center using CSS [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 years ago.
Improve this question
I had this piece of css/html code that shows 9 pictures. Some of the pictures might be rectangular, and i want them to be displayed in squares like other pictures. What css rules do i need to adjust? The structure of html is in the picture, so is the current css rules.
I had this piece of css/html code that shows 9 pictures. Some of the pictures might be rectangular, and i want them to be displayed in squares like other pictures. What css rules do i need to adjust? The structure of html is in the picture, so is the current css rules.
I had this piece of css/html code that shows 9 pictures. Some of the pictures might be rectangular, and i want them to be displayed in squares like other pictures. What css rules do i need to adjust? The structure of html is in the picture, so is the current css rules.
The code is attached below
#import url("https://fonts.googleapis.com/css?family=Montserrat");
#import url("https://fonts.googleapis.com/css?family=Open+Sans");
body, html {
width: 100%;
height: 100%;
font-family: "Montserrat";
color: #303633;
background-color: #C8D9E7;
overflow: hidden;
font-size: 1em;
font-style: normal;
-webkit-appearance: none;
outline: none;
text-rendering: geometricPrecision;
perspective: 1000px;
}
a {
position: relative;
display: inline-block;
padding: 12px 35px;
margin: 0 0 20px;
background-color: #e1306c;
color: white;
border-radius: 5px;
transition: all 0.3s;
letter-spacing: 2px;
font-size: 0.85em;
font-weight: 700;
text-decoration: none;
text-transform: uppercase;
box-shadow: 0 2px 30px rgba(225, 48, 108, 0.4);
}
a:hover {
background-color: #e75d8c;
}
.content-wrapper {
width: 300px;
max-height: 530px;
border-radius: 5px;
box-shadow: 0 2px 30px rgba(0, 0, 0, 0.2);
background: #fbfcee;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
overflow-y: scroll;
overflow-x: hidden;
text-align: center;
}
.content-wrapper::-webkit-scrollbar {
display: none;
}
.content-wrapper .img {
width: 302px;
height: 350px;
position: relative;
overflow: hidden;
}
.content-wrapper .img::after {
content: "";
display: block;
position: absolute;
top: 0;
width: 100%;
height: 100%;
background: linear-gradient(to top, rgba(88, 81, 219, 0.25), transparent);
}
.content-wrapper img {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 100%;
object-fit: contain;
}
.profile--info {
text-align: left;
padding-top: 10px;
}
.profile--info span {
font-family: "Open Sans", "Adobe Blank";
z-index: 1;
left: 15px;
top: 15px;
font-size: 0.575em;
color: rgba(84, 95, 89, 0.75);
display: block;
}
.profile--info span.username {
font-weight: 700;
font-style: normal;
font-size: 1em;
color: black;
}
.profile--info span.userquote {
margin-top: -15px;
font-size: 0.7em;
color: rgba(84, 95, 89, 0.75);
}
.user {
background-color: white;
width: 100%;
margin-top: 0;
max-height: 600px;
position: relative;
padding: 0 30px;
box-sizing: border-box;
}
.user-social-wrapper {
display: flex;
justify-content: space-around;
position: relative;
padding: 5px 0;
padding-bottom: 15px;
}
.user-social-wrapper::after, .user-social-wrapper::before {
content: "";
display: block;
position: absolute;
top: 0;
width: 100%;
height: 1px;
}
.user-social-wrapper::before {
top: initial;
bottom: 0;
}
.user-social-wrapper .user-info {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
font-weight: 200;
flex: 1 1;
}
.user-social-wrapper .user-info span:first-child {
font-size: 1.25em;
}
.user-social-wrapper .user-info span:last-child {
font-size: 0.75em;
color: rgba(84, 95, 89, 0.75);
}
.shots {
width: calc(100% + 60px);
margin-left: -30px;
position: relative;
display: flex;
flex-wrap: wrap;
}
.shots .shot {
overflow: hidden;
position: relative;
width: 100px;
height: 100px;
}
.shots .shot::after {
content: "";
display: block;
opacity: 0;
transition: all 0.255s;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
}
.shots .shot img {
transition: all 0.255s;
width: 102px;
}
#keyframes drift {
from {
transform: rotate(0deg);
}
from {
transform: rotate(360deg);
}
}
<div class="content-wrapper">
<div class="user">
<div class="shots">
<div class="shot"><img src="https://scontent-sea1-1.cdninstagram.com/vp/c2daebf39514481b7bdd696df185794a/5CB41E95/t51.2885-15/e35/44305549_353634695394272_4379074065337998962_n.jpg?_nc_ht=scontent-sea1-1.cdninstagram.com&se=7&ig_cache_key=MTkxMjA0MDQ0OTAyMTY1Njc4Mg%3D%3D.2"></div>
<div class="shot"><img src="https://scontent-sea1-1.cdninstagram.com/vp/c079f9938e0004cd465e9b3a23823638/5CB841C6/t51.2885-15/e35/41336764_2309590515939856_3014107714986624367_n.jpg?_nc_ht=scontent-sea1-1.cdninstagram.com&se=7&ig_cache_key=MTg3Nzg1Mjk1Njk0NDkwNTAwMg%3D%3D.2"></div>
<div class="shot"><img src="https://scontent-sea1-1.cdninstagram.com/vp/4c03bcf4125a52da4db64348fded2e64/5CD059B2/t51.2885-15/e35/46699770_789255231412285_7247415646102729111_n.jpg?_nc_ht=scontent-sea1-1.cdninstagram.com&se=7&ig_cache_key=MTkyMjcyMTIwOTQyODk0Mjc5NQ%3D%3D.2"></div>
<div class="shot"><img src="https://scontent-sea1-1.cdninstagram.com/vp/2ddf693641bf3e4dad7f0e4113196ed3/5C9D1D98/t51.2885-15/e35/42593422_668756993510074_548785136612309253_n.jpg?_nc_ht=scontent-sea1-1.cdninstagram.com&se=7&ig_cache_key=MTg4MjI5MDk5MzYyODEwOTk0Mw%3D%3D.2"></div>
<div class="shot"><img src="https://scontent-sea1-1.cdninstagram.com/vp/293669652704407f1519034a237110fc/5CD53EA6/t51.2885-15/e35/44442144_2039456152959656_8454847146314760657_n.jpg?_nc_ht=scontent-sea1-1.cdninstagram.com&se=7&ig_cache_key=MTkxMTEwMTUwMTEzOTEzMzk4MA%3D%3D.2"></div>
<div class="shot"><img src="https://scontent-sea1-1.cdninstagram.com/vp/0a8c6666eeaace1c7eff30c25aa672c6/5CD46203/t51.2885-15/e35/43816352_986229031581012_2433270463824730761_n.jpg?_nc_ht=scontent-sea1-1.cdninstagram.com&se=7&ig_cache_key=MTg5NTQwODg2MDE5NjA5OTA1NQ%3D%3D.2"></div>
<div class="shot"><img src="https://scontent-sea1-1.cdninstagram.com/vp/7841eff64f571f60c9ec1d169158851e/5C9BD445/t51.2885-15/e35/43621864_2280294755587222_1177965970195440793_n.jpg?_nc_ht=scontent-sea1-1.cdninstagram.com&se=7&ig_cache_key=MTg4NjY0MTkwODQ0MTE4MDcyOQ%3D%3D.2"></div>
<div class="shot"><img src="https://scontent-sea1-1.cdninstagram.com/vp/a78a72efb59d50ceeae8e6bcbaa82f92/5CCFD742/t51.2885-15/e35/42927631_265838184102659_8658034749053379565_n.jpg?_nc_ht=scontent-sea1-1.cdninstagram.com&se=7&ig_cache_key=MTkxNjkzMDk2MDM3NTMwNTUzOA%3D%3D.2"></div>
<div class="shot"><img src="https://scontent-sea1-1.cdninstagram.com/vp/77a032f68b948ae7049ea644777fc393/5CB3E901/t51.2885-15/e35/41866047_1814622118587789_2219135764187038727_n.jpg?_nc_ht=scontent-sea1-1.cdninstagram.com&se=7&ig_cache_key=MTg4NDI5OTEwNzU1ODU4OTEzMg%3D%3D.2"></div>
</div>
<div class="profile--info"><span class="username">ʏɪɴʀᴜɪ ᴅᴇɴɢ</span><span>☺#bobby_dyr</span><br><span class="userquote">In 2018, ʏɪɴʀᴜɪ ᴅᴇɴɢ received 164❤️, 7✉️ per post by average, and a total of</span></div>
<div class="user-social-wrapper">
<div class="user-info user-posts"><span>104</span><span>Shots</span></div>
<div class="user-info user-followers"><span>16,963</span><span>Likes</span></div>
<div class="user-info user-following"><span>643</span><span>Comments</span></div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://use.fontawesome.com/f09496b7cc.js"></script>
<script src="js/index.js"></script>
</div>
The following styles are enough to make your images fit:
.content-wrapper img {
width: 100%;
height: 100%;
object-fit: cover;
}
Don't forget to set height and width to 100%.
#import url("https://fonts.googleapis.com/css?family=Montserrat");
#import url("https://fonts.googleapis.com/css?family=Open+Sans");
body, html {
width: 100%;
height: 100%;
font-family: "Montserrat";
color: #303633;
background-color: #C8D9E7;
overflow: hidden;
font-size: 1em;
font-style: normal;
-webkit-appearance: none;
outline: none;
text-rendering: geometricPrecision;
perspective: 1000px;
}
a {
position: relative;
display: inline-block;
padding: 12px 35px;
margin: 0 0 20px;
background-color: #e1306c;
color: white;
border-radius: 5px;
transition: all 0.3s;
letter-spacing: 2px;
font-size: 0.85em;
font-weight: 700;
text-decoration: none;
text-transform: uppercase;
box-shadow: 0 2px 30px rgba(225, 48, 108, 0.4);
}
a:hover {
background-color: #e75d8c;
}
.content-wrapper {
width: 300px;
max-height: 530px;
border-radius: 5px;
box-shadow: 0 2px 30px rgba(0, 0, 0, 0.2);
background: #fbfcee;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
overflow-y: scroll;
overflow-x: hidden;
text-align: center;
}
.content-wrapper::-webkit-scrollbar {
display: none;
}
.content-wrapper .img {
width: 302px;
height: 350px;
position: relative;
overflow: hidden;
}
.content-wrapper .img::after {
content: "";
display: block;
position: absolute;
top: 0;
width: 100%;
height: 100%;
background: linear-gradient(to top, rgba(88, 81, 219, 0.25), transparent);
}
.content-wrapper img {
/*
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 100%;
object-fit: contain;
*/
width: 100%;
height: 100%;
object-fit: cover;
}
.profile--info {
text-align: left;
padding-top: 10px;
}
.profile--info span {
font-family: "Open Sans", "Adobe Blank";
z-index: 1;
left: 15px;
top: 15px;
font-size: 0.575em;
color: rgba(84, 95, 89, 0.75);
display: block;
}
.profile--info span.username {
font-weight: 700;
font-style: normal;
font-size: 1em;
color: black;
}
.profile--info span.userquote {
margin-top: -15px;
font-size: 0.7em;
color: rgba(84, 95, 89, 0.75);
}
.user {
background-color: white;
width: 100%;
margin-top: 0;
max-height: 600px;
position: relative;
padding: 0 30px;
box-sizing: border-box;
}
.user-social-wrapper {
display: flex;
justify-content: space-around;
position: relative;
padding: 5px 0;
padding-bottom: 15px;
}
.user-social-wrapper::after, .user-social-wrapper::before {
content: "";
display: block;
position: absolute;
top: 0;
width: 100%;
height: 1px;
}
.user-social-wrapper::before {
top: initial;
bottom: 0;
}
.user-social-wrapper .user-info {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
font-weight: 200;
flex: 1 1;
}
.user-social-wrapper .user-info span:first-child {
font-size: 1.25em;
}
.user-social-wrapper .user-info span:last-child {
font-size: 0.75em;
color: rgba(84, 95, 89, 0.75);
}
.shots {
width: calc(100% + 60px);
margin-left: -30px;
position: relative;
display: flex;
flex-wrap: wrap;
}
.shots .shot {
overflow: hidden;
position: relative;
width: 100px;
height: 100px;
}
.shots .shot::after {
content: "";
display: block;
opacity: 0;
transition: all 0.255s;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
}
.shots .shot img {
transition: all 0.255s;
width: 102px;
}
#keyframes drift {
from {
transform: rotate(0deg);
}
from {
transform: rotate(360deg);
}
}
<div class="content-wrapper">
<div class="user">
<div class="shots">
<div class="shot"><img src="https://scontent-sea1-1.cdninstagram.com/vp/c2daebf39514481b7bdd696df185794a/5CB41E95/t51.2885-15/e35/44305549_353634695394272_4379074065337998962_n.jpg?_nc_ht=scontent-sea1-1.cdninstagram.com&se=7&ig_cache_key=MTkxMjA0MDQ0OTAyMTY1Njc4Mg%3D%3D.2"></div>
<div class="shot"><img src="https://scontent-sea1-1.cdninstagram.com/vp/c079f9938e0004cd465e9b3a23823638/5CB841C6/t51.2885-15/e35/41336764_2309590515939856_3014107714986624367_n.jpg?_nc_ht=scontent-sea1-1.cdninstagram.com&se=7&ig_cache_key=MTg3Nzg1Mjk1Njk0NDkwNTAwMg%3D%3D.2"></div>
<div class="shot"><img src="https://scontent-sea1-1.cdninstagram.com/vp/4c03bcf4125a52da4db64348fded2e64/5CD059B2/t51.2885-15/e35/46699770_789255231412285_7247415646102729111_n.jpg?_nc_ht=scontent-sea1-1.cdninstagram.com&se=7&ig_cache_key=MTkyMjcyMTIwOTQyODk0Mjc5NQ%3D%3D.2"></div>
<div class="shot"><img src="https://scontent-sea1-1.cdninstagram.com/vp/2ddf693641bf3e4dad7f0e4113196ed3/5C9D1D98/t51.2885-15/e35/42593422_668756993510074_548785136612309253_n.jpg?_nc_ht=scontent-sea1-1.cdninstagram.com&se=7&ig_cache_key=MTg4MjI5MDk5MzYyODEwOTk0Mw%3D%3D.2"></div>
<div class="shot"><img src="https://scontent-sea1-1.cdninstagram.com/vp/293669652704407f1519034a237110fc/5CD53EA6/t51.2885-15/e35/44442144_2039456152959656_8454847146314760657_n.jpg?_nc_ht=scontent-sea1-1.cdninstagram.com&se=7&ig_cache_key=MTkxMTEwMTUwMTEzOTEzMzk4MA%3D%3D.2"></div>
<div class="shot"><img src="https://scontent-sea1-1.cdninstagram.com/vp/0a8c6666eeaace1c7eff30c25aa672c6/5CD46203/t51.2885-15/e35/43816352_986229031581012_2433270463824730761_n.jpg?_nc_ht=scontent-sea1-1.cdninstagram.com&se=7&ig_cache_key=MTg5NTQwODg2MDE5NjA5OTA1NQ%3D%3D.2"></div>
<div class="shot"><img src="https://scontent-sea1-1.cdninstagram.com/vp/7841eff64f571f60c9ec1d169158851e/5C9BD445/t51.2885-15/e35/43621864_2280294755587222_1177965970195440793_n.jpg?_nc_ht=scontent-sea1-1.cdninstagram.com&se=7&ig_cache_key=MTg4NjY0MTkwODQ0MTE4MDcyOQ%3D%3D.2"></div>
<div class="shot"><img src="https://scontent-sea1-1.cdninstagram.com/vp/a78a72efb59d50ceeae8e6bcbaa82f92/5CCFD742/t51.2885-15/e35/42927631_265838184102659_8658034749053379565_n.jpg?_nc_ht=scontent-sea1-1.cdninstagram.com&se=7&ig_cache_key=MTkxNjkzMDk2MDM3NTMwNTUzOA%3D%3D.2"></div>
<div class="shot"><img src="https://scontent-sea1-1.cdninstagram.com/vp/77a032f68b948ae7049ea644777fc393/5CB3E901/t51.2885-15/e35/41866047_1814622118587789_2219135764187038727_n.jpg?_nc_ht=scontent-sea1-1.cdninstagram.com&se=7&ig_cache_key=MTg4NDI5OTEwNzU1ODU4OTEzMg%3D%3D.2"></div>
</div>
<div class="profile--info"><span class="username">ʏɪɴʀᴜɪ ᴅᴇɴɢ</span><span>☺#bobby_dyr</span><br><span class="userquote">In 2018, ʏɪɴʀᴜɪ ᴅᴇɴɢ received 164❤️, 7✉️ per post by average, and a total of</span></div>
<div class="user-social-wrapper">
<div class="user-info user-posts"><span>104</span><span>Shots</span></div>
<div class="user-info user-followers"><span>16,963</span><span>Likes</span></div>
<div class="user-info user-following"><span>643</span><span>Comments</span></div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://use.fontawesome.com/f09496b7cc.js"></script>
<script src="js/index.js"></script>
</div>
object-fit: contain;
to
object-fit: cover;

CSS transition does not show when there's a background-color

I made a modal and it does not do the transition effect when I apply a background-color to my #main div which contains all the content, after removing the background the modal does do the transition effect and disappears slowly.
To ge the modal just click on register on the top navbar.
Live demo for the modal along with the background-color on #main:
http://79.179.201.217/
Live demo for the modal long without the background-color on #main:
http://79.179.201.217/test.php
Just to note that the following under #main causes the issue.
background-color: #eee;
CSS:
#main {
width: 85%;
max-width: 875px;
margin: 70px auto;
border-radius: 5px;
padding: 15px;
z-index: -600;
background-color: #eee;
}
.modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.4);
z-index: -500;
transition: opacity 0.18s linear, transform 0.18s linear;
transform: scale(1.4);
opacity: 0;
}
.modal-close {
display: block;
color: #555;
font-size: 13px;
text-decoration: none;
text-transform: uppercase;
position: absolute;
top: 6px;
right: 20px;
}
.modal-content {
display: block;
margin-top: 10px;
}
.modal-container {
display: table;
margin: 220px auto;
position: relative;
border: 1px solid #eee;
background-color: #eee;
padding: 25px;
border-radius: 3px;
box-shadow: 0 1px 10px 0 rgba(0, 0, 0, .5);
}
.modal-container.x2 {
width: 80%;
max-width: 200px;
}
.modal-container.x3 {
width: 80%;
max-width: 300px;
}
.modal-container.x4 {
width: 80%;
max-width: 400px;
}
.modal-container.x5 {
width: 80%;
max-width: 500px;
}
.modal-container.x6 {
width: 80%;
max-width: 600px;
}
.modal-container.x7 {
width: 80%;
max-width: 700px;
}
.modal-container.x8 {
width: 80%;
max-width: 800px;
}
.modal-header {
margin-bottom: 20px;
border-bottom: 1px solid gray;
font-size: 18px;
color: #555555;
font-weight: 500;
text-transform: uppercase;
}
.modal.modal-visible {
opacity: 1;
z-index: 1000000;
transform: scale(1.0);
}