How can I fix a div class not getting styling? - html

You will see below that I attempted to create a divclass for a button - however, for some reason, only that divclass doesn't get any styling.
Please help me out to figure out why ctabutton class doesn't get styling. There were supposed to be borders around. I'm probably missing something very easy to notice - please give me wisdom.
Here is a link to codepen: https://codepen.io/CanYildiz/pen/ExEYmZb
:root {
--black: rgba(0, 0, 0, 1);
--alllports: rgba(8, 116, 183, 1);
--white: rgba(255, 255, 255, 1);
--font-size-xs: 10px;
--font-size-s: 14px;
--font-size-m: 15px;
--font-size-l: 28px;
--font-family-inter: Sans-Serif;
--font-family-lato: "Lato";
}
#import url("https://fonts.googleapis.com/css?family=Inter:400,700|Lato:500");
.container {
align-items: flex-start;
background-color: var(--white);
display: flex;
flex-direction: column;
min-height: 469px;
width: 666px;
border: 1px solid var(--black);
}
.hidden,
.hidden * {
pointer-events: none;
visibility: hidden;
}
.pflichttext {
color: #094e7c;
cursor: pointer;
font-family: var(--font-family-inter);
font-size: var(--font-size-xs);
font-weight: 400;
letter-spacing: 0;
margin-top: 8px;
min-height: 15px;
text-decoration: underline;
width: 666px;
}
.container-1 {
align-items: flex-start;
cursor: pointer;
display: flex;
flex-direction: column;
min-height: 45px;
width: 666px;
}
.ctabutton {
display: inline-block;
align-items: flex-start;
text-decoration: none;
border: 5px solid var(--allports);
border-radius: 4px;
display: flex;
height: 44px;
margin-left: 3px;
margin-top: 8px;
min-width: 106px;
padding: 14px 16px;
}
.cta-text {
color: var(--allports);
font-family: var(--font-family-lato);
font-size: var(--font-size-s);
font-weight: 500;
height: 14px;
letter-spacing: 0;
line-height: 14px;
min-width: 72px;
text-align: center;
white-space: nowrap;
}
.valign-text-middle {
display: flex;
flex-direction: column;
justify-content: center;
}
.image-1 {
height: 312px;
object-fit: cover;
width: 666px;
}
.frame-1 {
align-items: flex-start;
display: flex;
flex-direction: column;
margin-top: 9px;
min-height: 73px;
width: 664px;
}
.description {
color: #595858;
font-family: var(--font-family-inter);
font-size: var(--font-size-m);
font-weight: 400;
letter-spacing: 0;
margin-top: 3px;
min-height: 36px;
width: 664px;
}
.title {
color: var(--black);
font-family: Sans-Serif;
font-size: var(--font-size-l);
font-weight: 700;
letter-spacing: 0;
margin-top: -1px;
min-height: 34px;
width: 664px;
}
<div class="container screen">
<div class="container-1">
<img class="image-1" src="https://cdn.animaapp.com/projects/62b868b9500e6d0650eef4d7/releases/62b868bf500e6d0650eef4d8/img/image-1#1x.png" />
<div class=" frame-1">
<h1 class="title">TITLE</h1>
<p class="description">
Description about the product/service advertise!It is relatively longer than the Title itself.But just long enough to contain extra information
</p>
</div>
<div class="ctabutton">
<a href="clickurl.de" target="_blank">
<div class="cta-text valign-text-middle">CTATEXT</div>
</a>
</div>
<a href="https://demo.de" target="_blank">
<div class="pflichttext">Pflichttext</div>
</a>
</div>

The border style is not being applied because you have the root css variable named --alllports when an extra 'l' and you are trying to reference it by --allports on the class.
you're original code
:root {
--black: rgba(0, 0, 0, 1);
--alllports: rgba(8, 116, 183, 1);
--white: rgba(255, 255, 255, 1);
--font-size-xs: 10px;
--font-size-s: 14px;
--font-size-m: 15px;
--font-size-l: 28px;
--font-family-inter: Sans-Serif;
--font-family-lato: "Lato";
}
when it should be
:root {
--black: rgba(0, 0, 0, 1);
--allports: rgba(8, 116, 183, 1);
--white: rgba(255, 255, 255, 1);
--font-size-xs: 10px;
--font-size-s: 14px;
--font-size-m: 15px;
--font-size-l: 28px;
--font-family-inter: Sans-Serif;
--font-family-lato: "Lato";
}

Related

How to dynamically change size of html container?

I have a container div that is a background that changes size dynamically with the window. Inside that container I have an image div that I want to change size with the background container. I can't seem to get it to resize dynamically even using percentage heights and widths. Can anyone guide me in the correct direction?
#import url("https://fonts.googleapis.com/css?family=Fira+Sans:400,500,600,700,800");
* {
box-sizing: border-box;
}
body {
background-color: #af39fe;
background-image: linear-gradient(147deg, #af39fe 0%, #4c38fd 74%);
min-height: 100vh;
font-family: "Fira Sans", sans-serif;
display: flex;
}
.info-container {
width: 95%;
position: relative;
max-width: 800px;
margin: auto;
background: #fff;
box-shadow: 0px 14px 80px rgba(34, 35, 58, 0.2);
padding: 25px;
border-radius: 10px;
height: auto;
}
.info-container__img {
width: 400px;
flex-shrink: 0;
height: 400px;
background-image: linear-gradient(147deg, #af39fe 0%, #4c38fd 74%);
box-shadow: 4px 13px 30px 1px rgba(252, 56, 56, 0.2);
border-radius: 10px;
transform: translateX(-80px);
overflow: hidden;
}
.info-container__img img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
opacity: 100;
border-radius: 10px;
}
.info-container__content {
padding-right: 25px;
}
.info-container__content>* {
opacity: 100;
}
.info-container__title {
font-size: 24px;
font-weight: 700;
color: #0d0925;
margin-bottom: 20px;
}
.info-container__text {
color: #4e4a67;
margin-bottom: 30px;
line-height: 1.5em;
}
.info-container__button {
display: inline-flex;
background-image: linear-gradient(147deg, #5b0a6b 0%, #16034b 74%);
padding: 15px 35px;
border-radius: 50px;
color: #fff;
box-shadow: 0px 14px 80px rgba(0, 0, 0, 0.4);
text-decoration: none;
font-weight: 500;
justify-content: center;
text-align: center;
letter-spacing: 1px;
}
<div class="info-container">
<div class="info-container__img">
<img src="https://www.dmarge.com/wp-content/uploads/2021/01/dwayne-the-rock-.jpg">
</div>
<div class="info-container__content">
<div class="info-container__title">About Me</div>
<div class="info-container__text">This is fake info about a persons life.</div>
READ MORE
</div>
</div>
You set .info-container__img's width using pixels. Change that to percentages and it would act as you want. I set max-width: 400px and change width: 50% in respect to container's style.
#import url("https://fonts.googleapis.com/css?family=Fira+Sans:400,500,600,700,800");
* {
box-sizing: border-box;
}
body {
background-color: #af39fe;
background-image: linear-gradient(147deg, #af39fe 0%, #4c38fd 74%);
min-height: 100vh;
font-family: "Fira Sans", sans-serif;
display: flex;
}
.info-container {
width: 95%;
position: relative;
max-width: 800px;
margin: auto;
background: #fff;
box-shadow: 0px 14px 80px rgba(34, 35, 58, 0.2);
padding: 25px;
border-radius: 10px;
height: auto;
}
.info-container__img {
width: 50%;
max-width: 400px;
flex-shrink: 0;
height: auto;
background-image: linear-gradient(147deg, #af39fe 0%, #4c38fd 74%);
box-shadow: 4px 13px 30px 1px rgba(252, 56, 56, 0.2);
border-radius: 10px;
transform: translateX(-80px);
overflow: hidden;
}
.info-container__img img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
opacity: 100;
border-radius: 10px;
}
.info-container__content {
padding-right: 25px;
}
.info-container__content>* {
opacity: 100;
}
.info-container__title {
font-size: 24px;
font-weight: 700;
color: #0d0925;
margin-bottom: 20px;
}
.info-container__text {
color: #4e4a67;
margin-bottom: 30px;
line-height: 1.5em;
}
.info-container__button {
display: inline-flex;
background-image: linear-gradient(147deg, #5b0a6b 0%, #16034b 74%);
padding: 15px 35px;
border-radius: 50px;
color: #fff;
box-shadow: 0px 14px 80px rgba(0, 0, 0, 0.4);
text-decoration: none;
font-weight: 500;
justify-content: center;
text-align: center;
letter-spacing: 1px;
}
<div class="info-container">
<div class="info-container__img">
<img src="https://www.dmarge.com/wp-content/uploads/2021/01/dwayne-the-rock-.jpg">
</div>
<div class="info-container__content">
<div class="info-container__title">About Me</div>
<div class="info-container__text">This is fake info about a persons life.</div>
READ MORE
</div>
</div>

Website responsibility on mobile not working, preview from Brackets doesn't look like the actual online website

So I decided to do my portfolio website on my own, which turned out to work pretty ok so far. The only problem is that I can't seem to make it display properly on mobile view. That's even though I've made all the pertinent changes on the css with "#media screen"
Can somebody take a look and tell me why it's doing what it's doing?
To see the problem, go to https://er-sc.com/HTML/image_making.html
on mobile view
In the proper way the image shouldn't cover the "about" button.
Also if you notice anything I could correct to make the website better, let me know.
Looking forward to the community's feedback and suggestions.
Best,
Ellie
Here's my HTML
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>ERSC Image Making</title>
<link rel="icon" type="image/x-icon" href="/images/favicon.ico">
<link href="../CSS/styles.css" rel="stylesheet" type="text/css">
</head>
<body id="bigwrapper">
<div class="topleft">
<a class="logoButton" href="https://www.er-sc.com/">E</a>
</div>
<div class="bottomleft">
<a class="logoButton" href="https://www.er-sc.com/">S</a>
</div>
<div class="topright">
<a class="logoButton" href="https://www.er-sc.com/">R</a>
</div>
<div class="bottomright">
<a class="logoButton" href="https://www.er-sc.com/">C</a>
</div>
<div class="bottomcenterLinks">
ABOUT
</div>
<div class="projectWrapper">
<div class="oneProject">
<div class="text">Happy Dancer, 2022</div>
<img src="/images/image-making/22-happy-dancer_k.jpg" alt="figure jumping">
</div>
<div class="oneProject">
<div class="text">Relief, 2022</div>
<img src="/images/image-making/22-0127_1__0020_Ebene-21-Wiederhergestellt_k.jpg" alt="3D extrusion of a scribble with plaster texture">
</div>
<div class="oneProject">
<div class="text">Didi, 2021</div>
<img src="/images/image-making/21-1210didi_k.jpg">
</div>
<div class="oneProject">
<div class="text">Dancing Flowers pt I, 2021</div>
<img src="/images/image-making/21-IG1_k.jpg">
</div>
<div class="oneProject">
<div class="text">Dancing Flowers pt II, 2021</div>
<img src="/images/image-making/21-IG2_k.jpg">
</div>
<div class="oneProject">
<div class="text">Sad Clown, 2021</div>
<img src="/images/image-making/21-200126_3D_1_k.jpg">
</div>
<div class="oneProject">
<div class="text">Alpine Anime (fictitious festival poster for Livia Rita), 2020</div>
<img src="/images/image-making/20-AlpineAnime_k.jpg">
</div>
<div class="oneProject">
<div class="text">Europa Endlos, 2019</div>
<img src="/images/image-making/19-europaendlos-scan_k.jpg">
</div>
<div class="oneProject">
<div class="text">Ascension, 2018</div>
<img src="/images/image-making/18-plakat_klein_ersc_k.jpg">
</div>
<div class="oneProject">
<div class="text">Seoul Impressions 1/4, 2018</div>
<img src="/images/image-making/18-1_k.jpg">
</div>
<div class="oneProject">
<div class="text">Seoul Impressions 2/4, 2018</div>
<img src="/images/image-making/18-7_k.jpg">
</div>
<div class="oneProject">
<div class="text">Seoul Impressions 3/4, 2018</div>
<img src="/images/image-making/18-9_k.jpg">
</div>
<div class="oneProject">
<div class="text">Seoul Impressions 4/4, 2018</div>
<img src="/images/image-making/18-10_k.jpg">
</div>
</div>
</body>
</html>
And here's my CSS
html,
#index {
height: 100%;
width: 100%;
background: radial-gradient(circle, hsla(295, 79%, 24%, 1) 0%, hsla(71, 66%, 78%, 1) 40%, hsla(318, 76%, 81%, 1) 74%, hsla(202, 27%, 45%, 1) 100%););
color: #551A8B;
font-family: sans-serif;
font-size: 1em;
background-attachment: fixed;
display: flex;
display: -webkit-flex;
display: flex;
-webkit-align-items: center;
align-items: center;
-webkit-justify-content: center;
justify-content: center;
}
#bigwrapper{
height: 100%;
width: 100%;
background: radial-gradient(circle, hsla(295, 79%, 24%, 1) 0%, hsla(71, 66%, 78%, 1) 40%, hsla(318, 76%, 81%, 1) 74%, hsla(202, 27%, 45%, 1) 100%););
color: #551A8B;
font-family: sans-serif;
font-size: 1em;
background-attachment: fixed;
display: flex;
display: -webkit-flex;
display: flex;
-webkit-align-items: top !important;
align-items: top !important;
-webkit-justify-content: center;
justify-content: center;
}
#font-face {
font-family: 'FT88-Italic';
font-style: normal;
font-weight: 400;
src: url('/fonts/FT88-Italic') format('woff2');
}
p {
font-family: 'FT88-Italic', sans-serif;
}
h1 {
font-family: 'FT88-Italic', sans-serif;
font-size: 2vw;
font-weight: normal;
}
.socials{
font-size: 2vw;
}
a {
text-decoration: none;
color: #551A8B;
font-family: sans-serif;
}
mark {
background-color: rgba(85, 26, 139, 1);
color: white;
border-radius: 0.3em;
}
#wrapper {
height: 80%;
width: 80%;
padding: 0em;
}
.extraBG {
z-index: 1000;
height: 100vh;
width: 50vw;
position: fixed;
background-color: red;
right: 0%;
top:0%
background-repeat: repeat;
background-position: top right;
background-attachment: fixed;
}
.topleft{
position: fixed;
top: 3%;
left: 3%;
z-index: 100;
}
.bottomleft{
position: fixed;
bottom: 3%;
left: 3%;
z-index: 100;
}
.topright{
position: fixed;
top: 3%;
right: 3%;
z-index: 100;
}
.bottomright{
position: fixed;
bottom: 3%;
right: 3%;
z-index: 100;
}
.bottomcenterLinks{
position: fixed;
bottom: 5%;
text-align: center;
text-decoration: none;
vertical-align: middle;
display: table-cell;
font-family: "FT88-Italic", sans-serif;
font-size: 3vh;
color: floralwhite;
}
.bottomcenterLinks a {
color: floralwhite;
text-shadow: 0px 0px 0.25em #551A8B;
}
.bottomcenterLinks a:hover {
color: floralwhite;
text-shadow: 0px 0px 0.15em floralwhite;
transition: 0.6s ease;
}
.bottomcenterLinks a:active {
color: floralwhite;
text-shadow: 0px 0px 0.15em floralwhite;
transition: 0.6s ease;
}
.bottomSmall{
text-align: center;
font-size: 0.8em;
align-self: flex-end;
}
.logoButton {
background-color: floralwhite;
font-family: sans-serif;
width: 8vh;
height: 8vh;
text-align: center;
vertical-align: middle;
text-decoration: none;
display: table-cell;
font-size: 3vh;
cursor: pointer;
border-radius: 100%;
z-index: 999;
position: relative;
box-shadow: inset 6px -6px 8px 1px rgba(224, 211, 185, 0.8), inset -16px 14px 10px 5px rgba(255, 255, 255, 0.8);
transition: 0.25s ease;
text-transform: uppercase;
z-index: 999;
filter: blur(0.05em);
-webkit-filter: blur(0.05em);
}
.logoButton:hover, .logoButton:active{
box-shadow: inset 6px -6px 0.8em 1px rgba(255, 255, 255, 0.8), inset -16px 18px 0.8em 0.05em rgba(224, 211, 185, 0.8);
filter: blur(0em);
-webkit-filter: blur(0em);
}
.centeredBox{
margin: auto;
border-radius: 5em;
background: floralwhite;
text-align: center;
font-size: 1.2em;
padding: 0.6em;
vertical-align: middle;
margin: auto;
height: 90%;
display: flex;
flex-wrap : nowrap;
flex-direction: column;
justify-content: center;
align-items : stretch;
flex-direction: column;
align-content : space-between;
/* box-shadow: inset 6px -6px 0.5em 1px rgba(224, 211, 185, 0.5), inset -16px 14px 10px 5px rgba(255, 255, 255, 0.8);
transition: 0.25s ease;
*/
}
.centeredBox small{
text-align: center;
align-content : flex-end;
}
.part1, .part2, .part3, .part4, .part5{
border-radius: 100em;
background: floralwhite;
text-align: center;
box-shadow: inset 6px -6px 0.5em 1px rgba(224, 211, 185, 0.5), inset -16px 14px 10px 5px rgba(255, 255, 255, 0.8);
transition: 0.25s ease;
vertical-align: middle;
filter: blur(0.1em);
-webkit-filter: blur(0.1em);
}
.part1:hover, .part2:hover, .part3:hover, .part4:hover, .part5:hover, .part5:active {
box-shadow: inset -21px 26px 50px -51px #FFFAF0, inset 10px -13px 50px -31px #FFFAF0, inset 34px -36px 50px 35px rgba(255, 255, 255, 0.6), inset -31px 37px 50px 32px rgba(224, 211, 185, 0.25);
filter: blur(0em);
-webkit-filter: blur(0em);
}
/*
.centeredBox, .slideshowBox{
width:100%;
height: 100%;
float: left;
}
*/
.centeredBox p {
position: relative;
padding: 1em;
height:20px;
top: 5%;
transform: translateY(-50%);
text-align: center;
vertical-align: middle;
}
.part1 {
width:50%;
height: 30%;
float: left;
}
.part1 p{
position: relative;
height:20px;
top: 40%;
transform: translateY(-50%);
}
.part2 {
width:50%;
height: 30%;
float: left;
}
.part2 p{
position: relative;
height:20px;
top: 40%;
transform: translateY(-50%);
}
.part3 {
width:50%;
height: 30%;
float: left;
}
.part3 p{
position: relative;
height:20px;
top: 40%;
transform: translateY(-50%);
}
.part4 {
width:50%;
height: 30%;
float: left;
}
.part4 p{
position: relative;
height:20px;
top: 40%;
transform: translateY(-50%);
}
.part5 {
width:65%;
height: 33%;
margin: auto;
display:flex;
justify-content: center;
vertical-align: middle;
}
.part5 p {
position: relative;
text-align: center;
vertical-align: middle;
font-size: 6vw;
margin: auto;
/* transform: translateY(-50%); */
}
.selected{
color: #FFFAF0;
filter: blur(0.05em);
}
.slideshowBox{
border-radius: 4em;
background: floralwhite;
text-align: center;
font-size: 1.2em;
filter: drop-shadow(10px,10px,orange);
}
.slideshow-container{
height: 100%;
width: 90%;
padding-top: 0em;
padding-bottom: 0em;
border-radius: 4em;
margin: auto;
text-align: center;
vertical-align: middle;
}
.mySlides {
display: none;
text-align: center;
vertical-align: middle;
}
.projectWrapper {
z-index: 10;
display: inline-block;
text-align: center;
vertical-align: top;
margin-top: 5em;
/*overflow-y: scroll;
scroll-snap-type: y mandatory;*/
padding-bottom: 7.5em;
}
.oneProject {
padding-bottom: 7.5em;
/*scroll-snap-align: start;
scroll-snap-stop: always;*/
}
img {
/* vertical-align: middle; */
border-radius: 1em;
max-height: 75vh;
max-width: 75vw;
margin: auto;
display: block;
text-align: center;
}
.imgSmall {
max-height: 70vh;
}
/* Next & previous buttons */
.prev {
vertical-align: middle;
cursor: pointer;
position: absolute;
top: 10%;
left: 0em;
width: 40%;
padding-top: 17em;
padding-bottom: 17em;
color: rgba(0, 0, 0, 0);
font-size: 1.2em;
transition: 0.6s ease;
user-select: none;
}
/* Position the "next button" to the right */
.next {
vertical-align: middle;
cursor: pointer;
position: absolute;
top: 10%;
right: 0em;
width: 40%;
padding-top: 17em;
padding-bottom: 17em;
color: rgba(0, 0, 0, 0);
font-size: 1.2em;
transition: 0.6s ease;
user-select: none;
}
/* On hover, add a black background color with a little bit see-through */
.prev:hover, .next:hover {
color: rgba(0, 0, 0, 0);
}
/* Caption text */
.text {
font-size: 1.2em;
position: relative;
margin: auto;
display: block;
text-align: center;
padding-bottom: 0.5em;
font-family: sans-serif;
}
/* Fading animation */
.fade {
animation-name: fade;
animation-duration: 1.5s;
}
#keyframes fade {
from {opacity: .6}
to {opacity: 1}
}
#media screen and (max-width: 1200px) {
h1 {
font-size: 4vw;
}
.socials {
font-size: 3vw;
}
.bottomcenterLinks {
font-size: 3vh;
}
.selected {
font-size: 3vh;
}
.centeredBox small{
font-size: 3vw;
}
}
#media screen and (max-width: 800px) {
.oneProject {
margin-bottom: 40%;
}
.projectWrapper {
margin-top: 30%;
}
.logoButton {
filter: blur(0.03em);
-webkit-filter: blur(0.03em);
}
.part5 {
filter: blur(0.06em);
-webkit-filter: blur(0.06em);
}
}
so, I think that it's because you added z-index directly to the about link tag in your css. Try adding z-index to the link wrapper div, in this case "bottomcenterLinks".
.bottomcenterLinks{
position: fixed;
bottom: 5%;
text-align: center;
text-decoration: none;
vertical-align: middle;
display: table-cell;
font-family: "FT88-Italic", sans-serif;
font-size: 3vh;
color: floralwhite;
z-index: 100;
}
now, a feedback for your website design:
it's a pretty innovative design but thinking in user experience i would change the buttons because when we first get into the page we can't understand the purpose of the buttons because they don't have proper names, I mean, self explanatory names. i understand that you wanted to use your name first letters but for the purpose of a portfolio or even another type of website you're building, I think is better building something that will literaly guide the user through the website. think about it!
also, this about link that you're trying to make appear, i think it would be better if you style it like the buttons with your name first letters, it would make it stand out better. oh and i think that instead of having only about, you could have about me written there because when I first saw it I couldn't understand what that about link is supposed to be I mean, is about what, the projects, you, the page?
last but not less important, the blur in your buttons in a user perspective seems like the content is not in a good quality. i don't understand what you wanted it to look like but if you like it that way, no need to change, except if you want to prioritize user exp! besides this, i wouldn't fix anything else, i really enjoyed your design, is cute, innovative, simple, you're doing well!
sry about the big comment tho, but i hope you understand my feedback!

`<!DOCTYPE html>` breaks `justify-content: center` in the body tag

for some reason adding <!DOCTYPE html> breaks justify-content: center in the body tag. It's like a container without a doctype takes all the space it has, and with it only a part of it.
body{
background-color: rgb(249, 249, 249);
font-family: "Segoe UI",Helvetica,Arial,sans-serif;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
/* containers */
.container{
display: flex;
flex-direction: column;
justify-content: center;
}
.login-container{
text-align: center;
border: solid 1px lightgray;
background-color: white;
width: 350px;
min-height: 395px;
}
.registration-container{
display: flex;
justify-content: center;
align-items: center;
border: solid 1px lightgray;
background-color: white;
width: 350px;
min-height: 60px;
margin: 10px 0;
color: rgb(40, 40, 40);
font-size: 14px;
}
/* login-container */
.logo-insta{
margin: 45px 0px 30px 0px;
}
.input-container{
display: flex;
flex-direction: column;
align-items: center;
margin: 0 20px;
}
.log-insta, .input-box{
display: block;
background-color: rgb(249, 249, 249);
border: solid 1px lightgray;
border-radius: 4px;
width: 270px;
margin: 3px;
padding: 11px 8px;
font-size: 12px;
}
.login-button{
width: 270px;
margin: 10px;
color: white;
font-weight: bold;
font-size: 15px;
background-color: rgb(0, 145, 255);
border: none;
border-radius: 4px;
padding: 6px;
}
.or-container{
color: gray;
position: relative;
margin: 10px 0;
}
hr{
color: rgb(228, 227, 227);
border-top: solid 1px;
width: 270px;
}
.or{
font-size: 14px;
font-weight: 600;
color: rgb(161, 161, 161);
background-color: white;
padding: 0 20px;
position: absolute;
top: -5px;
left: 140px;
}
.login-facebook{
display: flex;
justify-content: center;
color: rgb(25, 66, 131);
font-size: 14px;
font-weight: bold;
margin-top: 42px;
margin-bottom: 23px;
}
.login-facebook-img{
width: 16px;
height: 16px;
margin-right: 8px;
}
.forget-password{
color: rgb(25, 66, 131);
font-size: 13px;
}
/* registration container */
.registration-text{
color: rgb(0, 145, 255);
font-weight: bold;
margin-left: 4px;
}
/* install app */
.download-app-text{
font-size: 14px;
text-align: center;
margin-top: 12px;
}
.download-app-container{
display: flex;
flex-direction: row;
justify-content: center;
}
.download-app-img{
width: 140px;
margin: 20px 4px;
}
/* Hover */
.login-button:hover,
.login-facebook:hover,
.forget-password:hover,
.registration-text:hover,
.download-app-img:hover{
cursor: pointer;
}
/* Active */
.login-button:active,
.login-facebook:active,
.forget-password:active,
.registration-text:active,
.download-app-img:active{
opacity: 0.7;
}
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/login.css">
<title>Instagram</title>
</head>
<body>
<div class="container">
<div class="login-container">
<img class="logo-insta" src="https://www.instagram.com/static/images/web/logged_out_wordmark.png/7a252de00b20.png">
<div class="input-container">
<input class="input-box" type="email" placeholder="Телефон, имя пользователя или эл. адрес">
<input class= "input-box" type="password" placeholder="Пароль">
</div>
<button class="login-button">Войти</button>
<div class="or-container">
<hr/>
<div class="or">ИЛИ</div>
</div>
<div class="login-facebook">
<img class="login-facebook-img" src="/login-imgs/login-facebook.jpg">
<div>Войти через Facebook</div>
</div>
<div class="forget-password">Забыли пароль?</div>
</div>
<div class="registration-container">
<div>У вас ещё нет аккаунта?</div>
<div class="registration-text">Зарегестрироваться</div>
</div>
<div class="download-app-text">Установите приложение.</div>
<div class="download-app-container">
<img class="download-app-img" src="https://www.instagram.com/static/images/appstore-install-badges/badge_ios_english-en.png/180ae7a0bcf7.png">
<img class="download-app-img" src="https://www.instagram.com/static/images/appstore-install-badges/badge_android_english-en.png/e9cd846dc748.png">
</div>
</div>
</body>
</html>
Some differences apply when you add doctype declaration. It rarely affects anything but should be noticed. In modern web pages, this declaration is nessaccery to force standard and expected behavior.
You can read more about it at these links:
Why does height 100% work when DOCTYPE is removed?
"Height=100%" is not working in html when using <!DOCTYPE>?
The solution for you is to add height: 100% to body and the elements above it:
html, body {
height: 100%;
}

Unwanted Space Between Spans Flex

I'm trying to use a flexbox with flex-wrap: wrap to place these two pieces of together. It should say Welcome with the subtitle immediately below. Instead, each span seems to be taking up way too much space, but adjusting the heights instead helping. What could be going on here?
class SignUp extends Component {
render() {
return (
<React.Fragment >
<div id={"container"}>
<div id={"signup-container"}>
<span className={"suTitle"}><p>Welcome!</p></span>
<span className={"subtitle"}><p>Sign up for a free account today.</p></span>
</div>
</div>
</React.Fragment>
);
}
}
.suTitle{
width: 100%;
height: 10%;
padding: 5%;
margin: 0;
background-color: black;
font-family: 'Poppins';
font-style: normal;
font-weight: 700;
font-size: 50px;
color: #0064FF;
}
.subtitle {
font-family: 'Poppins';
font-style: normal;
font-weight: 500;
font-size: 30px;
padding: 5%;
margin: 0;
color: rgba(51, 51, 51, 0.5);
}
#container {
display: flex;
height: 100%;
justify-content: right;
background: linear-gradient(247.13deg, rgba(0, 100, 255, 0.8) 0%, rgba(101, 215, 192, 0.8) 68.23%, rgba(2, 186, 144, 0.8) 100%);
}
#signup-container {
display: flex;
flex-wrap: wrap;
flex-direction: row;
right: 0;
background-color: white;
}

Flexbox container doesn't fit children's height in Chrome

I have three flexbox containers (header, .content__description and footer) and two of them (header and .content__description) don't fit the children's height in Chrome, but only in Firefox. Therefore, the first container is covered by the second one. Why does it occur?
/* util.css */
.break {
width: 100%;
}
/* An issue
html,
body {
height: 100%;
}
*/
/* The solution I found */
html {
height: 100%;
}
body {
min-height: 100%;
}
/* Other styles */
body {
display: flex;
flex-direction: column;
justify-content: space-between;
color: rgb(255, 255, 255);
background-color: rgb(20, 142, 210);
}
header {
display: flex;
flex-direction: row;
justify-content: center;
flex-wrap: wrap;
margin-top: 3em;
margin-bottom: 3em;
}
.header__logo {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
padding-bottom: 1em;
}
.header__logo img {
width: 3em;
height: 3.3em;
margin-right: 0.6em;
}
.header__logo span {
font-size: 5em;
font-weight: 400;
}
.header__slogan {
font-size: 1.5em;
font-weight: 400;
text-align: center;
}
.content {
margin-left: auto;
margin-right: auto;
}
.content__description {
display: flex;
flex-direction: column;
padding-top: 3em;
padding-bottom: 3em;
background-color: rgb(0, 114, 174);
position: relative;
}
.content__description__signin {
position: absolute;
text-decoration: none;
text-align: center;
color: black;
background-color: rgb(254, 190, 0);
box-sizing: border-box;
font-size: 2em;
border: 0.2em rgb(255, 255, 255) solid;
line-height: 1em;
width: 6em;
padding: 0.2em;
top: calc(100% - 0.9em);
left: calc(50% - 3em);
}
.content__description__signin:hover {
background-color: rgb(241, 177, 0);
}
.content__description__strep {
width: 13em;
text-align: center;
font-size: 2em;
box-sizing: border-box;
}
.content__description__strep img {
width: 5em;
height: 5em;
border: 0.2em rgb(255, 255, 255) solid;
border-radius: 50%;
box-shadow: 0.2em 0.5em 1em rgba(0, 0, 0, 0.3);
box-sizing: border-box;
margin-bottom: 1em;
}
.content__description__strep figcaption {
background-color: rgb(2, 98, 148);
padding: 1em;
margin-left: -1em;
margin-right: -1em;
}
footer {
flex-grow: 1;
background-color: rgb(255, 255, 255);
color: rgb(0, 0, 0);
min-height: 1.8em;
}
<body>
<header>
<div class="header__logo">
<img src="images/logo.svg" alt="logo">
<span>Sailing</span>
</div>
<span class="break"></span>
<h1 class="header__slogan">You can!</h1>
</header>
<div class="content">
<div class="content__description">
<figure class="content__description__strep">
<img src="images/meeting.jpg" alt="meeting">
<figcaption>Talking</figcaption>
</figure>
<figure class="content__description__strep">
<img src="images/sailing.jpg" alt="sailing">
<figcaption>Sailing</figcaption>
</figure>
<figure class="content__description__strep">
<img src="images/cinema.jpg" alt="cinema">
<figcaption>Watching</figcaption>
</figure>
Sign in
</div>
</div>
<footer> </footer>
</body>
EDIT #1
The display style of .content__description is changed to "flex" (misprint).
EDIT #2
I've found the solution - switched body {height: 100%} to body {min-height: 100%}. It works perfectly for me.