I am trying to play with hover effects but I got a problem. I am trying to put 6 images next to each other into two columns. But it is not displayed correctly. I want them to be displayed side by side but the only first two are displayed like that. The other four are below each other. Could you help me, please? :)
body {
color: #333;
font-family: 'Open Sans', sans-serif;
font-weight: 300;
}
.column {
margin: 5px 5px 5px 5px;
padding: 0;
}
.column:last-child {
padding-bottom: 0px;
}
.column::after {
content: "";
/*clear: both;*/
display: inline;
float: left;
}
.column div {
position: relative;
float: left;
width: 375px;
height: 225px;
margin: 0 0 0 25px;
padding: 0;
}
.column div:first-child {
margin-left: 0;
}
.column div span {
float: left;
position: absolute;
bottom: -20px;
left: 0;
z-index: 0;
display: inline;
width: 375px;
margin: 0;
padding: 0;
color: #444;
font-size: 18px;
text-decoration: none;
text-align: center;
-webkit-transition: .3s ease-in-out;
transition: .3s ease-in-out;
opacity: 0;
}
figure {
width: 400px;
height: 250px;
margin-left: 10px;
margin-right: 10px;
padding: 0;
background: #fff;
overflow: hidden;
float: left;
}
figure:hover+span {
bottom: -36px;
opacity: 1;
}
/* Shine */
.hover14 figure {
position: relative;
}
.hover14 figure::before {
position: absolute;
top: 0;
left: -75%;
z-index: 2;
display: block;
content: '';
width: 50%;
height: 100%;
background: -webkit-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,.3) 100%);
background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,.3) 100%);
-webkit-transform: skewX(-25deg);
transform: skewX(-25deg);
}
.hover14 figure:hover::before {
-webkit-animation: shine .75s;
animation: shine .75s;
}
#-webkit-keyframes shine {
100% {
left: 125%;
}
}
#keyframes shine {
100% {
left: 125%;
}
}
<h1>Vítej v Kasiho světě!</h1>
<p>Má nabídka toho, co umím, zvládám, čemu se věnuji a co chci šířit do světa. Stejně tak chci získávat zkušenosti další i úplně nové. Pojď se tady porozhlédnout a třeba se mi ozveš a navážeme spolupráci.</p>
<br />
<div class="hover14 column">
<div><a href="http://kasihosvet.g6.cz/o-mne/">
<figure><img src="http://kasihosvet.g6.cz/wp-content/uploads/2020/03/o-mne.png" /></figure></a></div>
<div class="hover14 column">
<div><a href="http://kasihosvet.g6.cz/trener-parkouru/">
<figure><img src="http://kasihosvet.g6.cz/wp-content/uploads/2020/03/parkour.png" /></figure></a></div> <a href="http://kasihosvet.g6.cz/editor-videa/">
<div class="hover14 column">
<div>
<figure><img src="http://kasihosvet.g6.cz/wp-content/uploads/2020/03/videoedit.png" /></figure></a></div> <a href="http://kasihosvet.g6.cz/webmaker/">
<br>
<div class="hover14 column">
<div>
<figure><img src="http://kasihosvet.g6.cz/wp-content/uploads/2020/03/webkamekr.png" /></figure></a></div> <a href="http://kasihosvet.g6.cz/grafika/">
<div class="hover14 column">
<div>
<figure><img src="http://kasihosvet.g6.cz/wp-content/uploads/2020/03/grafika.png"/></figure></a></div> <a href="http://kasihosvet.g6.cz/kontakt/">
<div class="hover14 column">
<div>
<figure><img src="http://kasihosvet.g6.cz/wp-content/uploads/2020/03/kontakt.png" /></figure></a></div>
replace your HTML with this
<h1>Vítej v Kasiho světě!</h1>
<p>Má nabídka toho, co umím, zvládám, čemu se věnuji a co chci šířit do světa. Stejně tak chci získávat zkušenosti další i úplně nové. Pojď se tady porozhlédnout a třeba se mi ozveš a navážeme spolupráci.</p>
<div class="hover14 column">
<div><a href="http://kasihosvet.g6.cz/o-mne/">
<figure><img src="http://kasihosvet.g6.cz/wp-content/uploads/2020/03/o-mne.png" /></figure></a></div>
<div><a href="http://kasihosvet.g6.cz/trener-parkouru/">
<figure><img src="http://kasihosvet.g6.cz/wp-content/uploads/2020/03/parkour.png" /></figure></a></div>
<div>
<figure><img src="http://kasihosvet.g6.cz/wp-content/uploads/2020/03/videoedit.png" /></figure></a>
</div>
<div><figure><img src="http://kasihosvet.g6.cz/wp-content/uploads/2020/03/webkamekr.png" /></figure></a></div>
<div><figure><img src="http://kasihosvet.g6.cz/wp-content/uploads/2020/03/grafika.png"/></figure></a></div>
<div><figure><img src="http://kasihosvet.g6.cz/wp-content/uploads/2020/03/kontakt.png" /></figure></a></div>
</div>
and css with this
body {
color: #333;
font-family: "Open Sans", sans-serif;
font-weight: 300;
}
.column {
display: grid;
grid-template-columns: repeat(2, 1fr);
}
figure {
width: 400px;
height: 250px;
margin-left: 10px;
margin-right: 10px;
padding: 0;
background: #fff;
overflow: hidden;
float: left;
}
figure:hover + span {
bottom: -36px;
opacity: 1;
}
/* Shine */
.hover14 figure {
position: relative;
}
.hover14 figure::before {
position: absolute;
top: 0;
left: -75%;
z-index: 2;
display: block;
content: "";
width: 50%;
height: 100%;
background: -webkit-linear-gradient(
left,
rgba(255, 255, 255, 0) 0%,
rgba(255, 255, 255, 0.3) 100%
);
background: linear-gradient(
to right,
rgba(255, 255, 255, 0) 0%,
rgba(255, 255, 255, 0.3) 100%
);
-webkit-transform: skewX(-25deg);
transform: skewX(-25deg);
}
.hover14 figure:hover::before {
-webkit-animation: shine 0.75s;
animation: shine 0.75s;
}
#-webkit-keyframes shine {
100% {
left: 125%;
}
}
#keyframes shine {
100% {
left: 125%;
}
}
#media (max-width: 750px) {
.column {
display: grid;
grid-template-columns: repeat(1, 1fr);
}
}
I have used the grid layout with the column, you had way too many divs which almost made it impossible, also some of your links were unclear where they were placed so you may need to add a couple of them in again, but you should now have all 6 images in 2 columns, there is a gap in between them due to the size of the images, you will need to play around with that
Related
<div class="row">
<div class="col-lg-12">
<div class="dev-container">
<p> Venkat </p>
</div>
</div>
</div>
</section>
#dev {
background-color: black;
padding: 7% 15%;
text-align: center;
}
.dev-container {
display:grid;
place-items: center;
position: relative;
height: 150px;
width: 100%;
background: #191919;
border-radius: 10px;
overflow:hidden;
}
.dev-container::before{
content: '';
width: 100%;
height: 300px;
left: 10px;
top: 70px;
position:absolute;
background: linear-gradient(#00e5ff, #b400fb, #ff0000, #ffbf00, #80ff00, #00ffbf, #0080ff, #ff00ff);
animation: animate 5s linear infinite;
}
#keyframes animate{
0% { transform: rotate(0deg);}
100% {transform: rotate(360deg);}
}
.dev-container::after{
content: '';
position: absolute;
padding: 50px 50px;
text-decoration: none;
color: #FFE816;
font-size: 2em;
text-transform: uppercase;
font-family: Poppins;
letter-spacing: 4px;
background: #191919;
inset: 3px;
border-radius: 5px;
}
I want my text in the Html to visible on the card but i can't give over-flow as visible because gradient animation is also visible, so is there any way to make my text visible on the card also make the card responsible to the screen size.
I tried to give bootstrap class d-sm-none but after giving the class it disappears even in the large devices.
I'm trying to make an animated border for a div. I unhid the overflow of its formatting element so that I could see what the issue was. I'd like to make the center of rotation the center of the larger div.
I know I can make the center of rotation higher by setting the width and height of the before psuedoelement to that of its container, but I want to make it taller because if I set the width and height to its formatting element, it's too small and doesn't cover the edges.
I've tried using CSS positioning, but it isn't working and I have no idea why.
<div class="center">
<div class="wrapper">
<div class="directory module">
<div id="header" class="small_wrapper center">
<div class="module">
<p style="font-size: 22px">Placeholder</p>
</div>
</div>
<div class="directory_bar small_wrapper center"><div class="module">About Me</div></div>
<div class="directory_bar small_wrapper center"><div class="module">PC Builds</div></div>
<div class="directory_bar small_wrapper center"><div class="module">Original Characters</div></div>
<div class="directory_bar small_wrapper center"><div class="module">Games & Loadouts</div></div>
<div class="directory_bar small_wrapper center"><div class="module">Socials</div></div>
</div>
</div>
</div>
#charset "utf-8";
#keyframes rotate {
0% {
transform: rotate(0);
}
50% {
transform: rotate(180deg);
}
100% {
transform: rotate(360deg);
}
}
html {
font-size: 3.0vh;
}
body {
background-color: #2C2C2C;
font-family: Urbanist, sans serif;
color: white;
}
p {
margin: 0;
}
.left, .right, .center {
position: relative;
}
.center {
margin-left: auto;
margin-right: auto;
}
.module {
background-color:#2C2C2C;
text-align: center;
padding: 10px;
border-radius: 18px;
z-index: 1000;
position: relative;
}
.wrapper, .small_wrapper {
position: relative;
width: fit-content;
height: fit-content;
background: blue;
z-index: 1000;
}
.wrapper {
border-radius: 20px;
padding: 4px;
}
.wrapper::before {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: linear-gradient(to right, rgb(255, 0, 0), rgb(145,
255, 0), rgb(189, 1, 180));
animation: rotate;
animation-duration: 3s;
animation-iteration-count: infinite;
animation-timing-function: linear;
content: '';
border-radius: 20px;
height: 1000px;
}
.small_wrapper {
padding: 3px;
}
.directory_bar {
margin-top: 5vh;
}
.directory {
padding: 5vh;
}
.center > .wrapper {
margin-left: 100px;
}
.directory_bar, #header {
border-radius: 8px;
}
.directory_bar > .module, #header > .module {
border-radius: 7px;
}
So as said above, I have (for fun) recreated a website (hologram.io), because I'm new to CSS, and just wanted to see what I can do myself without help... But I can't figure out how I can position the whole first section which is absolute (-> On top of an Image) center, center. So vertical and horizontal, So that on bigger screens it always stays perfectly in the center of the menu... On the other sections which are not absolute, I used display: flex, justify-content: center and align-items center, which works perfectly... On the screenshots I have included, you can see the problem... Also, will include the code. It looks a bit messy, but should be fine haha...
Here you can see the noncentered Absolute item
Here you can see the flex items which are perfectly centered on every screensize and
And here for Refernce is the hologram website...
#font-face {
font-family: Robert Sans;
src: url(RobertSans-Regular.ttf);
}
#navtextonly li {
list-style-type: none;
display: inline;
padding: 15px;
text-align: center;
}
.listitem:hover {
cursor: pointer;
color: #4e6cff;
}
#hologramlogo {
margin-top: 20px;
margin-bottom: 20px;
margin-right: 0px;
padding-right: 0px;
}
nav {
background-color: rgb(255, 255, 255);
}
body {
margin: 0px;
font-family: Robert Sans;
}
#navbarouter {
display: flex;
align-items: center;
justify-content: center;
}
#navtextonly {
white-space: nowrap;
}
#mainmenuwobtnlogo {
margin-right: 100px;
}
ul {
font-size: 16px;
}
#buttonsmenu1 {
background-color: white;
border: 1px solid #4e6cffce;
padding: 12px 23px 12px 23px;
border-radius: 25px;
margin-right: 15px;
-webkit-box-shadow: 2px 2px 15px 1px #999999;
box-shadow: 2px 2px 15px 1px #999999;
}
#buttonsmenu1:hover {
border-color: #111;
cursor: pointer;
}
#buttonsmenu2 {
background-color: #4e6cff;
padding: 12px 23px 12px 23px;
color: white;
border-radius: 25px;
-webkit-box-shadow: 2px 2px 15px 1px #999999;
box-shadow: 2px 2px 15px 1px #999999;
}
#buttonsmenu2:hover {
background-color: #788fff;
color: white;
cursor: pointer;
}
.buttonsmenuouter {
margin-left: 25px;
}
#hamburgernav {
display: none;
}
#backgroundverlauf {
height: 800px;
width: 100%;
background-size: cover;
background-repeat: no-repeat;
}
.mainheading {
font-size: 64px;
white-space: nowrap;
font-weight: 400;
}
#h1top,
#h1bottom {
margin: 0px;
padding: 0px;
}
article {
color: rgb(255, 255, 255);
max-width: 550px;
}
#ellipse {
position: absolute;
top: 0px;
left: 630px;
}
#drohnepng {
position: absolute;
top: -50px;
left: 880px;
height: 80px;
}
#cartpng {
position: absolute;
top: 80px;
left: 585px;
height: 250px;
}
#rollerpng {
position: absolute;
top: 140px;
left: 825px;
height: 440px;
}
#content1 {
position: absolute;
top: 250px;
left: 12%;
}
#outerouter {
max-width: 1300px;
}
#glowh1 {
background: linear-gradient(
-60deg,
#904e95,
#904e95,
#e73c7e,
#ee7752,
#4e6cff,
white
);
background-size: 600%;
-webkit-text-fill-color: transparent;
-webkit-background-clip: text;
animation: animate 10s linear infinite;
}
#keyframes animate {
0% {
background-position: 0%;
}
100% {
background-position: 600%;
}
}
#paragraph {
width: 390px;
color: rgb(199, 199, 199);
font-size: 20px;
margin-bottom: 30px;
}
#emailwithsubmit {
display: flex;
}
.emailfeld {
width: 100%;
padding: 18px 23px 18px 23px;
border-radius: 25px 26px 26px 25px;
border-width: 0px;
border: 1px red solid;
}
#submitbtn {
padding: 18px 35px 18px 35px;
border-radius: 25px 25px 25px 25px;
color: white;
font-weight: 600;
border-width: 0px;
background-image: linear-gradient(90deg, #00a6ff, #7831ca, #fe17c0);
position: relative;
left: -60px;
}
#mainpart2,
#mainpart3 {
display: flex;
align-items: center;
justify-content: center;
margin: 100px 60px 100px 60px;
}
#mainpart2-3outer {
}
#card {
margin-left: 60px;
margin-right: 100px;
height: 280px;
/* -webkit-animation: fadein 3.2s both;
-moz-animation: fadein 3.2s both;
-o-animation: fadein 3.2s both;
animation: fadein 3.2s both; */
animation: float2 6s ease-in-out infinite;
}
#keyframes float2 {
0% {
transform: translatey(0px);
}
50% {
transform: translateX(-10px);
}
100% {
transform: translatey(0px);
}
}
#-webkit-keyframes fadein {
0% {
opacity: 0;
-webkit-transform: translateX(-25px);
}
100% {
opacity: 1;
-webkit-transform: translateX(0);
}
}
#-moz-keyframes fadein {
0% {
opacity: 0;
-moz-transform: translateX(-50px);
}
100% {
opacity: 1;
-moz-transform: translateX(0);
}
}
#-0-keyframes fadein {
0% {
opacity: 0;
-o-transform: translateX(-50px);
}
100% {
opacity: 1;
-o-transform: translateX(0);
}
}
#keyframes fadein {
0% {
opacity: 0;
transform: translateX(-50px);
}
100% {
opacity: 1;
transform: translateX(0);
}
}
#ellipse {
-webkit-animation: fade 5s both;
-moz-animation: fade 5s both;
-o-animation: fade 5s both;
animation: fade 5s both;
}
#-webkit-keyframes fade {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
#-moz-keyframes fade {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
#-0-keyframes fade {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
#keyframes fade {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
#cartpng,
#drohnepng,
#rollerpng {
/* -webkit-animation: fadein 3.2s both;
-moz-animation: fadein 3.2s both;
-o-animation: fadein 3.2s both;
animation: fadein 3.2s both;
transform: translatey(0px); */
animation: float 6s ease-in-out infinite;
}
#keyframes float {
0% {
transform: translatey(0px);
}
50% {
transform: translatey(-50px);
}
100% {
transform: translatey(0px);
}
}
#mainh-1,
#mainp-1 {
max-width: 280px;
}
#mainh-2,
#mainp-2 {
max-width: 280px;
}
.main1h,
.main1p,
.main2h,
.main2p {
display: flex;
flex-direction: row;
justify-content: space-between;
}
#mainh-3,
#mainp-3 {
max-width: 280px;
}
#mainh-4,
#mainp-4 {
max-width: 280px;
}
#mainh-1,
#mainh-2,
#mainh-3,
#mainh-4 {
margin: 0px;
padding: 0px;
}
#textmainpart2 {
margin-right: 60px;
}
.main2h1 {
margin-bottom: 40px;
}
.contentmainpart3-1 {
max-width: 475px;
margin-left: 60px;
}
.contentmainpart3-2 {
margin-right: 60px;
}
#beforefootercentered {
text-align: center;
margin-bottom: 75px;
}
.beforefootercolumncontent {
display: flex;
flex-direction: row;
justify-content: center;
gap: 100px;
margin-left: 100px;
margin-right: 100px;
margin-bottom: 50px;
}
.beforefootericons {
height: 66px;
width: 66px;
}
#beforefootercolumncontent1,
#beforefootercolumncontent2,
#beforefootercolumncontent3 {
max-width: 280px;
text-align: center;
}
#list2banner {
display: flex;
flex-direction: row;
margin-top: 20px;
}
#list1bannerouter {
max-width: 725px;
}
.footerbanner {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
background-image: linear-gradient(90deg, #7831ca, #00a5ff);
margin: 0px 190px 0px 190px;
border-radius: 10px;
padding-left: 30px;
padding-top: 25px;
padding-right: 30px;
padding-bottom: 50px;
color: white;
position: relative;
top: 100px;
}
.footerbanner h2 {
font-size: 40px;
font-weight: 400;
margin-bottom: 10px;
}
#list1banner {
margin: 0;
padding: 0;
list-style: none;
display: flex;
}
#list1banner li:before {
content: "✓";
padding-right: 5px;
}
#btn1,
#btn2 {
border-radius: 25px;
padding: 10px 20px 10px 20px;
}
#btn1 {
margin-right: 20px;
background-color: #111;
border-width: 0px;
}
#btn2 {
background-image: transparent;
border: 1px solid white;
}
#pfeil {
margin-left: 5px;
}
#mainfooter {
height: 600px;
background-color: #0a1435;
}
#mainfooterupper {
height: 100px;
background-color: #0a1435;
display: none;
}
.item1 {
margin-right: 20px;
}
#placehold {
position: absolute;
top: 3100px;
left: 50%;
transform: translate(-50%, -50%);
color: rgb(255, 255, 255);
font-size: 70px;
}
#media only screen and (max-width: 1350px) {
html,
body {
overflow-x: hidden;
}
body {
position: relative;
}
#navtextonly {
font-size: 14px;
}
li {
padding-right: 20px;
}
#mainmenuwobtnlogo {
margin-left: 0px;
margin-right: 0px;
}
#navbarouter {
display: flex;
}
#hologramlogo {
margin-top: 20px;
margin-bottom: 20px;
margin-left: 0px;
width: 120px;
}
.buttonsmenuouter {
margin-left: 25px;
font-size: 14px;
margin-right: 0px;
}
#buttonsmenu1,
#buttonsmenu2 {
padding: 9px 17px 9px 17px;
}
#backgroundverlauf {
height: 800px;
width: 100%;
background-size: cover;
background-repeat: no-repeat;
}
}
#media only screen and (max-width: 990px) {
html,
body {
overflow-x: hidden;
}
body {
position: relative;
}
#navtextonly {
display: none;
}
#navbarouter {
margin-left: 20px;
margin-right: 20px;
display: flex;
justify-content: space-between;
}
#hologramlogo {
margin-top: 20px;
margin-bottom: 20px;
margin-left: 20px;
}
.buttonsmenuouter {
margin-left: 0px;
}
#hamburgernav {
margin-top: 20px;
margin-bottom: 20px;
margin-left: 20px;
margin-right: 20px;
display: inline;
}
#backgroundverlauf {
height: 800px;
width: 100%;
background-size: cover;
background-repeat: no-repeat;
}
.mainheading {
font-size: 50px;
}
#paragraph {
font-size: 19px;
}
}
#media only screen and (max-width: 570px) {
.mainheading {
font-size: 30px;
}
#paragraph {
font-size: 16px;
}
#content1 {
position: absolute;
top: 175px;
}
article {
color: rgb(255, 255, 255);
max-width: 500px;
display: flex;
flex-direction: column;
margin-right: 20px;
}
#floatingimages {
display: none;
}
#paragraph {
width: 300px;
color: rgb(199, 199, 199);
font-size: 16px;
margin-bottom: 30px;
}
#backgroundverlauf {
height: 500px;
}
.emailfeld {
width: 80%;
padding-bottom: 20px;
padding: 13px 20px 13px 20px;
border-radius: 25px 26px 26px 25px;
border-width: 0px;
border: 1px red solid;
}
#submitbtn {
width: 87%;
position: absolute;
left: 10px;
top: 280px;
padding-bottom: 20px;
padding: 13px 20px 13px 20px;
border-radius: 25px 26px 26px 25px;
border-width: 0px;
border: 1px red solid;
/*
padding: 13px 30px 13px 30px;
border-radius: 25px 25px 25px 25px;
color: white;
font-weight: 600;
margin-left: 0px;
border-width: 0px;
background-image: linear-gradient(90deg, #00a6ff, #7831ca, #fe17c0);*/
}
#emailwithsubmit {
display: flex;
gap: 13px;
flex-direction: column;
align-items: center;
}
}
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="styles2.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Index2</title>
</head>
<div>
<nav>
<div id="navbarouter">
<img
id="hologramlogo"
src="610f51dabc2bd752a968dfac_Hologram Logo Black Text.svg"
alt="Logo"
width="130px"
/>
<ul id="navtextonly">
<li class="listitem">Cellular IoT</li>
<li class="listitem">Why Hologram</li>
<li class="listitem">Resources</li>
<li class="listitem">Plans</li>
<li class="listitem">Jobs</li>
<li class="listitem">Store</li>
<span class="buttonsmenuouter">
<li id="buttonsmenu1">Contact Sales</li>
<li id="buttonsmenu2">Sign in</li>
</span>
</ul>
<div id="hamburgernavouter">
<img id="hamburgernav" src="hamburgernav.svg" alt="hamburgernav" />
</div>
</div>
</nav>
<div id="outerouterouter">
<img
src="background1.png"
id="backgroundverlauf"
alt="backgroundverlauf"
/>
<div id="outerouter">
<div id="content1">
<article>
<h1 class="mainheading" id="h1top">Internet everywhere.</h1>
<p class="mainheading" id="h1bottom">For every<span id="glowh1">thing</span>.</p>
<p id="paragraph">Spend less time monitoring your IoT deployments and more time innovating. Hologram's cellular platform enables you to connect and manage any device, anywhere in the world.</p>
<div id="emailwithsubmit">
<input type="email" class="emailfeld" autocomplete="email" maxlength="256" name="Email" data-name="Email" placeholder="E-Mail-Adresse" id="email" data-validation="email required email length" required="" data-validation-event="keyup change" data-validation-length="max256">
<input type="submit" value="Get started" data-wait="Please wait..." class="c-button is--gradient w-button disabled" disabled="disabled" id="submitbtn">
</div>
</article>
<div id="floatingimages">
<img class="sideimages" id="ellipse" src="backgroundellipse.png" alt="ellipse">
<img class="sideimages" id="drohnepng" src="drohne.png" alt="drohne">
<img class="sideimages" id="cartpng" src="cart.png" alt="cart">
<img class="sideimages" id="rollerpng" src="roller.png" alt="roller">
</div>
</div>
</div>
</div>
<div id="mainpart2-3outer">
<div id="mainpart2">
<div id="cardcontainer">
<img id ="card" src="card.png" alt="card">
</div>
<div id="textmainpart2">
<h1 class="main2h1"> Testüberschrift: global IoT connectivity platform</h1>
<div class="main1h">
<h2 id="mainh-1">One global SIM card</h2>
<h2 id="mainh-2">Automatic carrier switching</h2>
</div>
<div class="main1p">
<p id="mainp-1">Connect to 470+ networks in 200 countries using a single hardware-agnostic SIM card or eSIM eUICC chip. </p>
<p id="mainp-2">Hologram SIMs automatically switch between local carriers to ensure you have top performance and never lose service.</p>
</div>
<div class="main2h">
<h2 id="mainh-3">Flexible, scalable pricing</h2>
<h2 id="mainh-4">Connectivity tools for your team</h2>
</div>
<div class="main2p">
<p id="mainp-3">No contracts, quotas, or negotiations. Activate, change, or pause plans anytime via our Hologram Dashboard or APIs.</p>
<p id="mainp-4">Collaboratively manage your fleet with ease via our easy-to-use Dashboard or our modern REST API.</p>
</div>
</div>
</div>
<div id="mainpart3">
<div class="contentmainpart3-1">
<img src="hyper.svg" alt="hyper">
<h1>Testüberschrift2: flexibility and coverage with Hyper</h1>
<p>Future-proof your SIMs and scale faster globally with Hyper, Hologram’s eUICC SIMs and platform. Hyper provides over-the-air, updatable access to Hologram’s full portfolio of IoT connectivity partners and profiles.</p>
<p>What is Hyper? --></p>
</div>
<div class="contentmainpart3-2">
<img src="image maincontent3.png" alt="ballwiththingsmainpart3right" height= "570px">
</div>
</div>
</div>
<div id="beforefootercentered">
<h1>Scaling connectivity has never been so easy</h1>
<p>The simplest way to get your IoT deployment connected worldwide.</p>
</div>
<div class="beforefootercolumncontent">
<div id="beforefootercolumncontent1">
<img src="antenne.svg" loading="lazy" alt="cell tower icon" class="beforefootericons">
<h3 class="">No hassles or headaches</h3>
<p class="">Focus on your product and data — not connectivity infrastructure, negotiations, and pricing.</p>
</div>
<div id="beforefootercolumncontent2">
<img src="speedometer.svg" loading="lazy" alt="dashboard icon" class="beforefootericons">
<h3 class="">Ready to grow your business</h3>
<p class="">Manage global deployments from a single connectivity platform with pricing that scales as you do.</p>
</div>
<div id="beforefootercolumncontent3">
<img src="settings.svg" loading="lazy" alt="gear icon" class="beforefootericons">
<h3 class="">All the tools you need</h3>
<p class="">Our Hologram Dashboard, REST API, and supported hardware make integrating connectivity easy.</p>
</div>
</div>
<footer>
<div id="mainfooterupper"></div>
<div class="footerbanner">
<div id="list1bannerouter">
<h2>Try Hologram today.</h2>
<ul id="list1banner">
<li class="item1">Free Sim</li>
<li class="item1">1 MB/mo free</li>
<li>Connect and scale in days</li>
</ul>
</div>
<div id="list2banner">
<div id="btn1">Sign up free<img id="pfeil" src="pfeil.svg"></div>
<div id="btn2">Contact sales <img id="pfeil" src="pfeil.svg"></div>
</div>
</div>
<div id="mainfooter">
<h1 id="placehold">Footer Items Soon</h1>
</div>
</footer>
</main>
</body>
</html>
Use this to your container[absolute] element
.container{
position: absolute;
/* For Vertically center */
top: 50%;
transform: translateY(-50%);
/* For Horizontally center */
left: 50%;
transform: translateX(-50%);
}
If You're using height and width without positioning use this
.container{
--height: 100px;
height: var(--height);
/* Horizontally Center */
margin: auto;
/* Vertically Center */
margin-top: calc(50% - var(--height));
}
I have some problems doing changes on this site http://rocainternacional.org/2018/ In mobile, you can scroll to the right. Why it's happening? I want to make the video overflow hidden and something like size cover too..
.body {
overflow: hidden;
}
.titulos {
margin-top: 200px;
padding: 0 100px;
margin-bottom: 200px;
}
.titulos2 {
margin-top: 300px;
padding: 0 100px;
margin-bottom: 200px;
}
.titulo-1 {
background-color: rgba(255, 255, 255, 0.8);
color: rgb(0, 153, 120);
}
.titulo-1 h2 {
margin-bottom: 0;
margin-top: 0;
padding: 20px;
font-weight: 300;
padding-left: 70px;
font-size: 35px;
}
.titulo-2 {
background-color: rgba(0, 153, 120, 0.5);
color: rgb(255, 255, 255);
}
.titulo-2 h2 {
margin-top: 0 !important;
font-size: 30px;
padding: 50px;
padding-left: 70px;
}
.boton-right {
display: flex;
justify-content: flex-end;
}
.titulo-boton {
background-color: #001F4A;
margin-top: 0;
margin-bottom: 0;
padding: 15px 30px;
}
.titulo-boton a {
color: #fff;
font-weight: 300;
font-size: 20px
}
.footer-title {
margin: 0 auto;
margin-top: 30px;
}
.item-1,
.item-2,
.item-3 {
position: absolute;
display: block;
/*top: 2em;*/
width: 60%;
padding-left: 0px;
font-size: 2em;
animation-duration: 10s;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
}
.item-1{
animation-name: anim-1;
}
.item-2{
animation-name: anim-2;
}
.item-3{
animation-name: anim-3;
}
#keyframes anim-1 {
0%, 8.3% { left: -100%; opacity: 0; }
8.3%,25% { left: 25%; opacity: 1; }
33.33%, 100% { left: 110%; opacity: 0; }
}
#keyframes anim-2 {
0%, 33.33% { left: -100%; opacity: 0; }
41.63%, 58.29% { left: 25%; opacity: 1; }
66.66%, 100% { left: 110%; opacity: 0; }
}
#keyframes anim-3 {
0%, 66.66% { left: -100%; opacity: 0; }
74.96%, 91.62% { left: 25%; opacity: 1; }
100% { left: 110%; opacity: 0; }
}
#media only screen and (max-width: 2000px) {
.titulo-1 {
width: 350px;
}
.item-1, .item-2, .item-3 {
width: 50%;
padding-left: 50px !important;
}
}
#media only screen and (max-width: 1700px) {
.item-1, .item-2, .item-3 {
width: 55%;
padding-left: 0px !important;
}
}
.text-blue {
color: #337ab7 !important;
}
.opinion {
margin-bottom: 30px;
}
<!-- HTML CODE -->
<!-- Here are the slider elements -->
<!-- In desktop overflow: hidden works fine, but in mobile it doesnt -->
<div class="container titulos" id="slideshow">
<div class="row titulo-1">
<h2>Bienvenidos a R.O.C.A. Internacional</h2>
</div>
<div class="row titulo-2" style="height: 200px">
<h2 class="item-1 no-padding-left">Capacitación profesional en todas las especialidades de la Odontología con Certificación Universitaria.</h2>
<h2 class="item-2 no-padding-left">Diplomados de alto nivel, dictado por docentes de reconocimiento intenacional.</h2>
<h2 class="item-3 no-padding-left">Red Odontológica de Capacitación Internacional.</h2>
</div>
<div class="row boton-right">
<div class="titulo-boton">
Conocer más
</div>
</div>
</div>
In desktop the overflow: hidden works fine, but in mobile it doesnt..
Any suggest?
EDIT: I added this meta tag to the head and it did the trick
NOTE: How i put this post as done?
Try body tag overflow hidden..
This meta tag did the trick
Now on mobile it works perfect..
My question is, how can I display select elements full screen (not like F11 full screen, but like having it take up the whole client browser screen space). I have to take into consideration the people who will be using my website (once it's on a .com domain), and one of the main things is I want the first three elements (logo graphic, h1 text, and h2 text) to fill up the first space, until you scroll down. How do you do that?
I tried to come up with a solution to this, so I tried changing the padding and margins around to the correct settings, but then I realized, it's only for my monitor/device. Is there any way I could make it specific for each device?
Website Link: http://noclip.ga/1/ (A friend and I are both working on different designs for it.)
PS: I have a slide in menu (from the left), will that affect the solution?
PPS: I couldn't find this post anywhere, so if you can find it, just send me a link...
EDIT: Code.
https://jsfiddle.net/052Lu6xt/2/
<body>
<nav>
<ul><center>
<li>Home</li>
<li>About Us</li>
<li>Contact Us</li>
<li>Prices</li>
</center></ul>
</nav>
<article>
<div id="content">
<center>
<img src="img/logo.png" style="width: 256px; height: 256px; margin: 20px 20px 20px 20px;">
<h1 style="padding: 5px 20px 0px 20px;">NØCLIP</h1>
<h2 style="padding: 5px 20px 60px 20px;">Web development made easy.</h2>
<table class="maintable" style="text-align: center; width: 100%; font-family: Josefin Sans; font-size: 40px; color: #C6C6C6;">
<tbody>
<tr>
<td>Quick</td>
<td>Affordable</td>
<td>Easy</td>
</tr>
<tr style="font-family: Arvo; font-size: 32px;">
<td>We strive to provide you with a professional product in a timely manner.</td>
<td>Our services start at as low as $60!</td>
<td>We make it easy for you by optimizing your workload so you tell us what to do, and we do it.</td>
</tr>
</tbody>
</table>
</center>
</div>
</article>
</body>
CSS:
#import url(https://fonts.googleapis.com/css?family=Montserrat:700|Arvo|Josefin+Sans:600);
/* Made By NOCLIP */
body {
background: rgb(5,6,6);
width:100%;
margin: auto;
}
h1 {
font-family: Montserrat;
font-size: 64px;
text-align: center;
color: #fff;
}
h2 {
font-family: Arvo;
font-size: 36px;
text-align: center;
color: #ececec;
}
h3 {
display: inline;
font-family: Arvo;
font-size: 32px;
text-align: center;
color: #ededed;
}
#header {
text-align: center;
height: 300px;
width: 100%;
}
.left {
height: 100%;
width: 10%0;
}
.center {
height: 100%;
width: 100%;
}
.textright {
height: 100%;
width: 100%;
}
/* Scrolling Menu */
article {
position: fixed;
width: 70%;
left: 0;
top: 0;
right: 0;
bottom: 0;
padding: 30px 15%;
background-color: rgb(5,5,6);
overflow: auto;
z-index: 0;
-webkit-transform-origin: 0 50%;
-moz-transform-origin: 0 50%;
-ms-transform-origin: 0 50%;
-o-transform-origin: 0 50%;
transform-origin: 0 50%;
}
article:after {
position: absolute;
content: ' ';
left: 100%;
top: 0;
right: 0;
bottom: 0;
background-image: -webkit-linear-gradient(right, rgba(0,0,0,0.2) 0%, transparent 100%);
background-image: -moz-linear-gradient(right, rgba(0,0,0,0.2) 0%, transparent 100%);
background-image: -ms-linear-gradient(right, rgba(0,0,0,0.2) 0%, transparent 100%);
background-image: -o-linear-gradient(right, rgba(0,0,0,0.2) 0%, transparent 100%);
background-image: linear-gradient(right, rgba(0,0,0,0.2) 0%, transparent 100%);
pointer-events: none;
}
nav {
position: fixed;
left: -16em;
top: 0;
bottom: 0;
background-color: rgb(32, 40, 41);
border-right: 50px solid rgba(6, 15, 32, 0.6);
box-shadow: 4px 0 5px rgba(0, 0, 0, 0.2);
z-index: 1;
cursor: pointer;
}
nav:after {
position: absolute;
content: ' ';
width: 0;
height: 0;
right: -70px;
top: 50%;
border-width: 15px 10px;
border-style: solid;
border-color: transparent transparent transparent rgb(72, 97, 111);
}
nav ul {
width: 14em;
list-style-type: none;
margin: 0;
padding: 1em;
}
article, article:after, nav, nav *{
-webkit-transition: all 600ms ease;
-moz-transition: all 600ms ease;
-ms-transition: all 600ms ease;
-o-transition: all 600ms ease;
transition: all 600ms ease;
}
nav:hover {
left: 0;
}
nav:hover ~ article {
-webkit-transform: translateX(16em) perspective(600px) rotateY(0deg);
-moz-transform: translateX(16em) perspective(600px) rotateY(0deg);
-ms-transform: translateX(16em) perspective(600px) rotateY(0deg);
-o-transform: translateX(16em) perspective(600px) rotateY(0deg);
transform: translateX(16em) perspective(600px) rotateY(0deg);
}
nav:hover ~ article:after {
left: 60%;
}
li a {
font-family: Josefin Sans;
font-size: 36px;
color: #fff;
text-decoration: none;
text-transform: lowercase;
}
li a:hover {
text-decoration: underline;
color: #0092ff;
}
li {
padding-top: 38%;
}
Put the logo, h1 and h3 text within a div; this div should have a width of 100vw (viewport-width) and a height of 100vh (viewport-height).
#top_div {
display: block;
width: 100vw;
height: 100vh;
}
#top_div img {
width: 100%;
max-width: ..px //up to you
height: auto; //keep the original width/height ratio
}
#top_div h1 {
font-size: 10vw //play with these numbers to get the ratios right
}
#top_div h3 {
font-size: 8vw //play with these numbers to get the ratios right
}
Fist of all set the html and body to 100% like:
body, html {
height: 100%;
}
Set main container to 100%:
.container{
text-align:center;
height:100%;
}
Set height of your inner 2 container of image and h1, h2 divided them 100%. I am using equal 50% of height in the following example.
.inner-div{
height:50%;
color:white;
}
Make your image to fit the screen size using:
img {
max-width: 100%;
max-height: 100%;
}
That's did the trick.
You can see the result here. https://jsfiddle.net/siddiquinoor/Lmd49qfs/