This question already has answers here:
How can I center text (horizontally and vertically) inside a div block?
(27 answers)
How can I center an absolutely positioned element in a div?
(37 answers)
Closed 2 years ago.
How do I center this header? I've tried about everything, and nothing works. ;-;
#import url(https://fonts.googleapis.com/css?family=Open+Sans:400,400italic,600,600italic,700italic);
* {
margin: 0;
padding: 0;
}
html,
body {
max-width: 100%;
overflow-x: hidden;
overflow-y: hidden;
}
body {
background: #2c3e50;
font-size: 80%;
font-family: 'Open Sans', sans-serif;
}
.bg {
z-index: -1;
width: 100%;
height: 100%;
position: absolute;
background: linear-gradient( 45deg, #f17c58, #e94584, #24aadb, #27dbb1, #ffdc18, #ff3706);
background-size: 600% 100%;
animation: gradient 16s linear infinite;
animation-direction: alternate;
}
#keyframes gradient {
0% {
background-position: 0%;
}
100% {
background-position: 100%;
}
}
main {
position: relative;
height: 240px;
margin: auto;
padding: 20px;
resize: both;
}
.btn-grp {
height: 68px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
a {
text-decoration: none;
color: #fff;
}
a:hover {
color: #2ecc71;
}
.btn {
text-align: center;
cursor: pointer;
font-size: 24px;
position: relative;
background-color: #f39c12;
border: none;
padding: 20px;
width: 200px;
-webkit-transition-duration: 0.4s;
transition-duration: 0.4s;
text-decoration: none;
overflow: hidden;
}
.btn:hover {
background: #fff;
box-shadow: 0 2px 10px 5px #97b1bf;
color: #000;
}
.btn:after {
content: '';
background: #f1c40f;
display: block;
position: absolute;
opacity: 0;
transition: all 0.8s;
}
.btn:active:after {
padding: 0;
margin: 0;
opacity: 1;
transition: 0s;
}
.down {
Position: absolute;
Bottom: 85%;
}
<html lang="en">
<head>
</head>
<body>
<div class="bg"></div>
<div class="down">
<h1>Welcome</h1>
</div>
<main>
<div class="btn-grp">
<a href="#" target="_blank">
<button class="btn" id="btn-home">Home</button>
</a>
<a href="#" target="_blank">
<button class="btn" id="btn-dl">Download</button>
</a>
</div>
</main>
</body>
</html>
#import url(https://fonts.googleapis.com/css?family=Open+Sans:400,400italic,600,600italic,700italic);
* {
margin: 0;
padding: 0;
}
html,
body {
max-width: 100%;
overflow-x: hidden;
overflow-y: hidden;
}
body {
background: #2c3e50;
font-size: 80%;
font-family: 'Open Sans', sans-serif;
}
.bg {
z-index: -1;
width: 100%;
height: 100%;
position: absolute;
background: linear-gradient(
45deg,
#f17c58,
#e94584,
#24aadb,
#27dbb1,
#ffdc18,
#ff3706
);
background-size: 600% 100%;
animation: gradient 16s linear infinite;
animation-direction: alternate;
}
#keyframes gradient {
0% {
background-position: 0%;
}
100% {
background-position: 100%;
}
}
main {
position: relative;
height: 240px;
margin: auto;
padding: 20px;
resize: both;
}
.btn-grp {
height: 68px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
a {text-decoration: none; color: #fff;}
a:hover {color: #2ecc71;}
.btn {
text-align: center;
cursor: pointer;
font-size: 24px;
position: relative;
background-color: #f39c12;
border: none;
padding: 20px;
width: 200px;
-webkit-transition-duration: 0.4s;
transition-duration: 0.4s;
text-decoration: none;
overflow: hidden;
}
.btn:hover {
background: #fff;
box-shadow: 0 2px 10px 5px #97b1bf;
color: #000;
}
.btn:after {
content: '';
background: #f1c40f;
display: block;
position: absolute;
opacity: 0;
transition: all 0.8s;
}
.btn:active:after {
padding: 0;
margin: 0;
opacity: 1;
transition: 0s;
}
.down {
Position: absolute;
Bottom: 85%;
width: 100%;
text-align: center;
}
<html lang="en">
<head>
</head>
<body>
<div class="bg"></div>
<div class="down">
<h1>Welcome</h1>
</div>
<main>
<div class="btn-grp">
<a href="#" target="_blank">
<button class="btn" id="btn-home">Home</button>
</a>
<a href="#" target="_blank">
<button class="btn" id="btn-dl">Download</button>
</a>
</div>
</main>
</body>
</html>
Changed the css for only .down class like this :
.down {
Position: absolute;
Bottom: 85%;
width: 100%;
text-align: center;
}
I try to make responsive part of this size with bootstrap grid. And always when I do resize of window, so there is made new gradient on right. I tried to find it in developer tools what it is, but there is nothing defined. I'm not sure but I have on more site with same design without bootstrap and there it looks nice when I resize window, but here with bootstrap it's bad. I am not sure if it's really bootstrap but looking for solution, because I really don't have idea.
Here is code and screen how it looks
#import url(https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.css);
#import url("https://fonts.googleapis.com/css?family=Titan+One");
body {
background: linear-gradient(45deg, #7b00e0, #ff006a);
margin: 0;
height: auto;
box-sizing: border-box;
}
.container {
width: 100%;
height: 100vh;
margin: 0 auto;
overflow: hidden;
}
.menu-container {
background-color: #E59617;
border-radius: 100%;
color: white;
cursor: pointer;
position: absolute;
width: 250px;
height: 250px;
left: -120px;
top: -120px;
transition: all 0.3s;
}
.menu-container.full-menu {
border-radius: 0;
padding: 0 !important;
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
transition: all 0.3s;
}
.full-menu .menu {
top: 40px;
left: 40px;
}
.menu {
color: white;
font-size: 2em;
position: absolute;
top: 160px;
left: 160px;
z-index: 100;
transition: all 0.3s;
}
.menu i {
opacity: 0.7;
transform: scale(1);
transition: all 0.3s;
}
.menu i:hover {
opacity: 1;
transform: scale(1.2);
transition: all 0.3s;
}
.overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 0%;
opacity: 0;
visibility: hidden;
overflow: hidden;
}
.overlay.open {
opacity: .9;
visibility: visible;
height: 100%;
}
.overlay.open li {
animation: fadeInRight .5s ease forwards;
animation-delay: .35s;
}
.overlay.open li:nth-of-type(2) {
animation-delay: .4s;
}
.overlay.open li:nth-of-type(3) {
animation-delay: .45s;
}
.overlay.open li:nth-of-type(4) {
animation-delay: .50s;
}
.overlay nav {
font-size: 3.2em;
font-family: "Titan One", san-serif;
position: relative;
height: 70%;
top: 50%;
transform: translateY(-50%);
font-weight: 400;
text-align: center;
}
.overlay ul {
list-style: none;
padding: 0;
margin: 0 auto;
display: inline-block;
position: relative;
height: 100%;
}
.overlay ul li {
display: block;
height: 25%;
height: calc(100% / 4);
min-height: 50px;
position: relative;
opacity: 0;
}
.overlay ul li a {
display: block;
position: relative;
color: #fff;
text-decoration: none;
overflow: hidden;
opacity: 0.7;
transform: scale(1);
transition: all 0.3s;
}
.overlay ul li a:hover, .overlay ul li a:focus, .overlay ul li a:active {
opacity: 1;
transform: scale(1.2);
transition: all 0.3s;
}
#keyframes fadeInRight {
0% {
opacity: 0;
left: 20%;
}
100% {
opacity: 1;
left: 0;
}
}
h1.deti {
font-size: 5em;
font-family: "Titan One", san-serif;
background-color: rgba(255, 0, 106, 0.4);
border-radius: 100%;
box-shadow: 0 0 2em 1em rgba(255, 0, 106, 0.4);
color: white;
margin: 30vh auto;
position: relative;
text-align: center;
text-shadow: 0 8px 0 rgba(123, 0, 224, 0.4);
transform: rotate(-12deg);
width: 800px;
height: auto;
z-index: -1;
}
h1 span {
color: #ffc901;
}
.blob {
animation: blobby 4s infinite;
}
.blob2 {
animation: blobby2 6s infinite;
}
#keyframes blobby {
0% {
transform: scale(1);
}
50% {
transform: scale(1.08);
}
100% {
transform: scale(1);
}
}
#keyframes blobby2 {
0% {
transform: scale(1);
}
50% {
transform: scale(1.18);
}
100% {
transform: scale(1);
}
}
svg {
position: absolute;
top: 0;
}
#svg-right {
display: block;
fill: #7b00e0;
opacity: 0.5;
right: 0;
width: 60%;
z-index: -10;
}
#svg-left {
fill: #ff006a;
margin: 0;
width: 60%;
z-index: -10;
}
#media all and (max-width: 980px) {
h1.deti {
font-size: 3em;
font-family: "Titan One", san-serif;
}
}
#media all and (max-width: 480px) {
h1.deti {
font-size: 2em;
font-family: "Titan One", san-serif;
}
.overlay li {
font-size: 0.5em;
}
}
/*komix*/
p {
color: #fff;
}
.row {
display: flex;
height: 200px;
background-color: #7b00e0;
z-index: -99999;
}
h1 span {
color: #ffc901;
}
h1.mobile {
visibility: hidden;
}
.mobile {
display: none;
}
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>Kajberšikana</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
</head>
<body>
<div class="mobile"><p class="mobile">Zmizni z mobilu na PC.</p></div>
<div class="title-deti"><h1 class="deti"><span>Lorem</span><br />Ipsum</h1>
<div class="circle"></div>
</div>
<div class="container">
<div class="row">
<div class="col-sm-6 col-md-4 col-lg-6"><p>Box 1</p></div>
<div class="col-sm-6 col-md-4 col-lg-6"><p>Box 2</p></div>
<div class="col-sm-6 col-md-4 col-lg-6"><p>Box 2</p></div>
<div class="col-sm-6 col-md-4 col-lg-6"><p>Box 2</p></div>
<div class="col-sm-6 col-md-4 col-lg-6"><p>Box 2</p></div>
<div class="col-sm-6 col-md-4 col-lg-6"><p>Box 2</p></div>
</div>
<div class="container">
<div class="menu-container" id="toggle">
</i>
</div>
</div>
<div class="overlay" id="overlay">
<nav class="overlay-menu">
<ul>
<li>Domov</li>
<li>Pre deti</li>
<li>Pre dospelých</li>
<li>Kontakt</li>
</ul>
</nav>
</div>
</div>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js'></script>
<script src="js/index.js"></script>
</body>
</html>
**
You have several mistakes in your snippet.
First off, you're supposed to load bootstrap(.min).js after jQuery. You also need popper.js for v4.x.
Secondly, you should never have a .container inside another .container.
Third, you want to keep your .menu-deti from oversizing <body>, using:
.title-deti {
max-width: 100vw;
overflow: hidden;
}
See it fixed:
#import url(https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.css);
#import url("https://fonts.googleapis.com/css?family=Titan+One");
body {
background: linear-gradient(45deg, #7b00e0, #ff006a);
margin: 0;
height: auto;
box-sizing: border-box;
}
.container {
width: 100%;
height: 100vh;
margin: 0 auto;
overflow: hidden;
}
.menu-container {
background-color: #E59617;
border-radius: 100%;
color: white;
cursor: pointer;
position: absolute;
width: 250px;
height: 250px;
left: -120px;
top: -120px;
transition: all 0.3s;
}
.menu-container.full-menu {
border-radius: 0;
padding: 0 !important;
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
transition: all 0.3s;
}
.full-menu .menu {
top: 40px;
left: 40px;
}
.menu {
color: white;
font-size: 2em;
position: absolute;
top: 160px;
left: 160px;
z-index: 100;
transition: all 0.3s;
}
.menu i {
opacity: 0.7;
transform: scale(1);
transition: all 0.3s;
}
.menu i:hover {
opacity: 1;
transform: scale(1.2);
transition: all 0.3s;
}
.overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 0%;
opacity: 0;
visibility: hidden;
overflow: hidden;
}
.overlay.open {
opacity: .9;
visibility: visible;
height: 100%;
}
.overlay.open li {
animation: fadeInRight .5s ease forwards;
animation-delay: .35s;
}
.overlay.open li:nth-of-type(2) {
animation-delay: .4s;
}
.overlay.open li:nth-of-type(3) {
animation-delay: .45s;
}
.overlay.open li:nth-of-type(4) {
animation-delay: .50s;
}
.overlay nav {
font-size: 3.2em;
font-family: "Titan One", san-serif;
position: relative;
height: 70%;
top: 50%;
transform: translateY(-50%);
font-weight: 400;
text-align: center;
}
.overlay ul {
list-style: none;
padding: 0;
margin: 0 auto;
display: inline-block;
position: relative;
height: 100%;
}
.overlay ul li {
display: block;
height: 25%;
height: calc(100% / 4);
min-height: 50px;
position: relative;
opacity: 0;
}
.overlay ul li a {
display: block;
position: relative;
color: #fff;
text-decoration: none;
overflow: hidden;
opacity: 0.7;
transform: scale(1);
transition: all 0.3s;
}
.overlay ul li a:hover,
.overlay ul li a:focus,
.overlay ul li a:active {
opacity: 1;
transform: scale(1.2);
transition: all 0.3s;
}
#keyframes fadeInRight {
0% {
opacity: 0;
left: 20%;
}
100% {
opacity: 1;
left: 0;
}
}
h1.deti {
font-size: 5em;
font-family: "Titan One", san-serif;
background-color: rgba(255, 0, 106, 0.4);
border-radius: 100%;
box-shadow: 0 0 2em 1em rgba(255, 0, 106, 0.4);
color: white;
margin: 30vh auto;
position: relative;
text-align: center;
text-shadow: 0 8px 0 rgba(123, 0, 224, 0.4);
transform: rotate(-12deg);
width: 800px;
height: auto;
z-index: -1;
}
h1 span {
color: #ffc901;
}
.blob {
animation: blobby 4s infinite;
}
.blob2 {
animation: blobby2 6s infinite;
}
#keyframes blobby {
0% {
transform: scale(1);
}
50% {
transform: scale(1.08);
}
100% {
transform: scale(1);
}
}
#keyframes blobby2 {
0% {
transform: scale(1);
}
50% {
transform: scale(1.18);
}
100% {
transform: scale(1);
}
}
svg {
position: absolute;
top: 0;
}
#svg-right {
display: block;
fill: #7b00e0;
opacity: 0.5;
right: 0;
width: 60%;
z-index: -10;
}
#svg-left {
fill: #ff006a;
margin: 0;
width: 60%;
z-index: -10;
}
#media all and (max-width: 980px) {
h1.deti {
font-size: 3em;
font-family: "Titan One", san-serif;
}
}
#media all and (max-width: 480px) {
h1.deti {
font-size: 2em;
font-family: "Titan One", san-serif;
}
.overlay li {
font-size: 0.5em;
}
}
/*komix*/
p {
color: #fff;
}
.row {
display: flex;
height: 200px;
background-color: #7b00e0;
z-index: -99999;
}
h1 span {
color: #ffc901;
}
h1.mobile {
visibility: hidden;
}
.mobile {
display: none;
}
.title-deti {
max-width: 100vw;
overflow: hidden;
}
#media (max-width: 800px) {h1.deti{width: 100vw;}}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Kajberšikana</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
</head>
<body>
<div class="mobile">
<p class="mobile">Zmizni z mobilu na PC.</p>
</div>
<div class="title-deti">
<h1 class="deti"><span>Lorem</span><br />Ipsum</h1>
<div class="circle"></div>
</div>
<div class="container">
<div class="row">
<div class="col-sm-6 col-md-4 col-lg-6">
<p>Box 1</p>
</div>
<div class="col-sm-6 col-md-4 col-lg-6">
<p>Box 2</p>
</div>
<div class="col-sm-6 col-md-4 col-lg-6">
<p>Box 2</p>
</div>
<div class="col-sm-6 col-md-4 col-lg-6">
<p>Box 2</p>
</div>
<div class="col-sm-6 col-md-4 col-lg-6">
<p>Box 2</p>
</div>
<div class="col-sm-6 col-md-4 col-lg-6">
<p>Box 2</p>
</div>
</div>
</div>
<div class="container">
<div class="menu-container" id="toggle">
<i class="fa fa-bars" aria-hidden="true"></i>
</div>
</div>
<div class="overlay" id="overlay">
<nav class="overlay-menu">
<ul>
<li>Domov</li>
<li>Pre deti</li>
<li>Pre dospelých</li>
<li>Kontakt</li>
</ul>
</nav>
</div>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
</body>
</html>
I'm writing a bookmarking program, and for the past few days, this bug has caught my eye: The "I'm Niva, a: " bar doesn't extend to fill up the whole page's width. I've already attempted checking the console, and adding 0 margins+paddings, but nothing seems to work. If anyone could provide a solution, that would be great!
#wide{
color:white;
font-size: 60px;
font-family: 'Quicksand', sans-serif;
flex: 0.1;
background-color:rgba(51,153,255,0.5);
}
Program:
https://codepen.io/Refath/pen/RjwOQN
#import url('https://fonts.googleapis.com/css?family=Quicksand:500');
body {
/**background-image: url("http://1.bp.blogspot.com/-cynjeO46IAM/UBUmNk0NnxI/AAAAAAAAAqg/jpqpb_LMn6U/s1600/tR2hW.jpg")**/
align-content: no-repeat center center fixed;
background-image: url("http://1.bp.blogspot.com/-cynjeO46IAM/UBUmNk0NnxI/AAAAAAAAAqg/jpqpb_LMn6U/s1600/tR2hW.jpg");
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.fChange:hover,
.yChange:hover,
.gChange:hover,
.aChange:hover {
background-color: rgba(3, 3, 3, 0.21);
transition: all ease 0.2s;
}
.circle,
.r1c,
.r2c,
.r3c,
.r4c {
width: 90px;
height: 90px;
border-radius: 90px;
fill: lightred;
position: fixed;
margin: auto;
background-size: 100px 100px;
background-repeat: no-repeat;
background-position: -5px -5px;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
}
.r1c,
.r2c,
.r3c,
.r4c,
.circle {
animation: around infinite;
animation-duration: 30s;
animation-direction: reverse;
}
.r1c.off,
.r2c.off,
.r3c.off,
.r4c.off {
-ms-animation-play-state: paused;
-o-animation-play-state: paused;
-moz-animation-play-state: paused;
-webkit-animation-play-state: paused;
animation-play-state: paused;
}
.circle {
background-image: url(https://qph.ec.quoracdn.net/main-qimg-a1bd7842675b4c551751a7bb50da3667);
background-position: -5px -6px;
opacity: 0.9;
}
.r1c:hover,
.r2c:hover,
.r3c:hover,
.r4c:hover {
width: 108px;
height: 108px;
border-radius: 108px;
transition: 0.07s ease-in;
background-size: 120px 120px;
background-position: -5.4px -5.4px;
}
.r1c {
overflow: hidden;
top: 400px;
background-image: url("http://icons.iconarchive.com/icons/xenatt/the-circle/512/App-Google-icon.png");
}
.r2c {
top: -400px;
background-image: url(https://www.shareicon.net/data/512x512/2015/09/30/109354_media_512x512.png);
}
.r3c {
left: 400px;
background-image: url(https://cdn.worldvectorlogo.com/logos/facebook-3.svg);
}
.r4c {
right: 400px;
background-image: url("https://lh3.googleusercontent.com/mIeBLLu8xOi-1bPbtRO_HYb5d1VchJDLDH4hebMO7R-GNOfueGDtHCKgPWFjwyCAORQ=w300");
}
.r1l,
.r2l,
.r3l,
.r4l {
border: white 1px solid;
width: 0px;
height: 90px;
border-radius: 90px;
fill: lightred;
position: absolute;
margin: auto;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
}
.r1l {
top: 200px;
}
.r2l {
top: -200px;
}
.r3l {
width: 90px;
height: 0px;
left: 200px;
}
.r4l {
width: 90px;
height: 0px;
left: -200px;
}
.parent.off {
-ms-animation-play-state: paused;
-o-animation-play-state: paused;
-moz-animation-play-state: paused;
-webkit-animation-play-state: paused;
animation-play-state: paused;
}
.parent {
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
animation: around infinite;
}
.parent.custom {
animation-duration: 30s;
}
#keyframes around {
0% {
transform: rotate(0deg);
}
25% {
transform: rotate(90deg);
}
25% {
transform: rotate(90deg);
}
50% {
transform: rotate(180deg);
}
50% {
transform: rotate(180deg);
}
75% {
transform: rotate(270deg);
}
75% {
transform: rotate(270deg);
}
100% {
transform: rotate(360deg);
}
}
#wide {
color: white;
font-size: 60px;
font-family: 'Quicksand', sans-serif;
flex: 0.1;
background-color: rgba(51, 153, 255, 0.5);
}
#narrow {
color: lightblue;
font-size: 60px;
flex: 0.9;
font-family: 'Quicksand', sans-serif;
background-color: rgba(51, 153, 255, 0.7);
}
.name {
position: relative;
font-size: 60px;
text-align: center;
font-family: 'Quicksand', sans-serif;
}
.rotate-text {
color: white;
font-size: 60px;
flex: 0.5;
font-family: 'Quicksand', sans-serif;
background: lightblue;
background-color: rgba(51, 153, 255, 0.8);
}
#parent {
display: flex;
background-color: red;
}
.juan {
font: 40px/50px Arial;
text-align: center;
}
.jesus {
text-align: center;
font-size: 20px;
}
.rotate-text {
display: inline-block;
background-color: lightgreen;
}
.rotating {
float: right;
overflow: hidden;
position: relative;
height: 100px;
}
.inside {
display: inline-block;
color: lightblue;
position: relative;
white-space: nowrap;
top: -20px;
left: 0px;
animation: move 5s;
animation-iteration-count: infinite;
animation-delay: 1s;
padding: 20px;
}
#keyframes move {
0% {
top: -20px;
}
20% {
top: -100px;
}
40% {
top: -200px;
}
60% {
top: -300px;
}
}
.name {
color: white;
}
.options {
width: 400px;
height: 450px;
color: white;
padding: 15px 10px 0px 5px;
float: left;
position: relative;
top: -340px;
left: 20px;
}
.gtext,
.atext,
.ytext,
.ftext {
border-radius: 20px;
background-color: rgba(255, 255, 255, 0.5);
width: 20px;
height: 25px;
color: white;
font-family: 'Quicksand', sans-serif;
font-size: 20px;
}
li {
padding: 7px;
}
html {
overflow: hidden;
height: 100%;
}
body {
height: 100%;
overflow: auto;
}
button {
fill: red;
}
.setText {
text-align: center;
font-size: 20px;
}
button {
color: red;
}
/**Derived from: **/
#import url(//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css);
}
#import url(https://fonts.googleapis.com/css?family=Titillium+Web:300);
.fa-2x {
font-size: 2em;
}
.fa {
position: relative;
display: table-cell;
width: 160px;
height: 236px;
text-align: center;
vertical-align: middle;
font-size: 20px;
}
.main-menu:hover,
nav.main-menu.expanded {
width: 300px;
overflow: visible;
overflow-y: scroll;
padding-left: 20px;
transition: 0.9s ease-out all;
}
.main-menu {
padding-left: 20px;
background: #fbfbfb;
position: absolute;
top: 100px;
background-color: rgba(51, 153, 255, 0.5);
bottom: 0px;
height: 90%;
left: 0;
width: 20px;
overflow: visible;
overflow-y: scroll;
-webkit-transition: width .05s linear;
transition: width .05s linear;
-webkit-transform: translateZ(0) scale(1, 1);
z-index: 1000;
padding-top: 20px;
transition: 0.9s ease-out all;
padding-bottom: 50px;
}
.featureName {
transform: rotate(-90deg);
position: relative;
top: 50%;
right: 10px;
}
.main-menu:hover>.featureName {
visibility: hidden;
}
.main-menu>ul {
margin: 2px 0;
}
.main-menu li {
position: relative;
display: block;
width: 250px;
}
/**your element has a height of auto, overflow hidden, and content within it that are position float. giving that outer element a set height, and then a child element that grows to fit the content, would allow the parent element to scroll the child
**/
.main-menu li>a {
position: relative;
display: table;
border-collapse: collapse;
border-spacing: 0;
color: #999;
font-family: arial;
font-size: 14px;
text-decoration: none;
-webkit-transform: translateZ(0) scale(1, 1);
-webkit-transition: all .1s linear;
transition: all .1s linear;
}
.main-menu .nav-icon {
position: relative;
display: table-cell;
width: 60px;
height: 36px;
text-align: center;
vertical-align: middle;
font-size: 18px;
}
.main-menu .nav-text {
position: relative;
display: table-cell;
vertical-align: middle;
width: 20px;
}
.main-menu>ul.logout {
position: absolute;
left: 0;
bottom: 0;
}
.no-touch .scrollable.hover {
overflow-y: visible;
overflow-y: scroll;
}
.no-touch .scrollable.hover:hover {
overflow-y: auto;
overflow: visible;
overflow-y: scroll;
}
a:hover,
a:focus {
text-decoration: none;
}
nav {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
}
nav ul,
nav li {
outline: 0;
margin: 0;
padding: 0;
}
.main-menu li:hover>a,
nav.main-menu li.active>a,
.dropdown-menu>li>a:hover,
.dropdown-menu>li>a:focus,
.dropdown-menu>.active>a,
.dropdown-menu>.active>a:hover,
.dropdown-menu>.active>a:focus,
.no-touch .dashboard-page nav.dashboard-menu ul li:hover a,
.dashboard-page nav.dashboard-menu ul li.active a {
color: #fff;
background-color: #5fa2db;
}
.blurredBg {
height: 100%;
width: 100%;
text-align: center;
background-size: cover;
position: absolute;
left: 0;
top: 0;
background-image: url("http://1.bp.blogspot.com/-cynjeO46IAM/UBUmNk0NnxI/AAAAAAAAAqg/jpqpb_LMn6U/s1600/tR2hW.jpg");
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
#ImageUrl {}
#charset "utf-8";
#import url(http://weloveiconfonts.com/api/?family=entypo);
a[class*="entypo-"]:before {
font-family: 'entypo', sans-serif;
}
/* ---------- GENERAL ---------- */
a {
text-decoration: none;
}
ul {
list-style: none;
margin: 0;
padding: 0;
}
.container {
left: 70%;
position: absolute;
top: 50%;
transition: 0.3s all ease;
}
/* ---------- SOCIAL ---------- */
.social {
position: relative;
height: 3em;
width: 13.5em;
}
.social li {
display: block;
height: 4em;
line-height: 4em;
margin: -2.2em;
position: absolute;
-webkit-transition: -webkit-transform .7s;
-moz-transition: -moz-transform .7s;
-ms-transition: -ms-transform .7s;
-o-transition: -o-transform .7s;
transition: transform .7s;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
text-align: center;
width: 4em;
}
.social a {
color: #fffdf0;
display: block;
height: 4em;
line-height: 4em;
text-align: center;
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
transform: rotate(-45deg);
width: 4em;
transition: 0.3s all ease;
}
.social li:hover {
-webkit-transform: scale(1.3, 1.3) rotate(45deg);
-moz-transform: scale(1.3, 1.3) rotate(45deg);
-ms-transform: scale(1.3, 1.3) rotate(45deg);
-o-transform: scale(1.3, 1.3) rotate(45deg);
transform: scale(1.3, 1.3) rotate(45deg);
transition: 0.3s all ease;
}
.facebook {
background: #155b9d;
left: 0;
top: 0%;
}
.container img {
width: 50px;
position: relative;
top: -20%;
}
.twitter {
background: #1a9ec4;
bottom: 0;
left: 25%;
}
.dribbble {
background-color: lightblue;
left: 50%;
top: 0%;
width: 5em;
height: 5em;
}
.dribbble img {
top: 0%;
}
.social .dribbble {
width: 5em;
height: 5em;
left: 46%;
top: -50%;
}
.behance {
background: #3f7aa3;
bottom: 0;
left: 75%;
}
.linked-in {
background: #157f9d;
left: 100%;
top: 0%;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-beta/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-tour/0.11.0/css/bootstrap-tour-standalone.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vex-js/4.0.0/css/vex-theme-flat-attack.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vex-js/4.0.0/css/vex.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vex-js/4.0.0/css/vex-theme-os.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tooltipster/3.3.0/css/themes/tooltipster-light.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
<div class="blurredBg">
</div>
<div id="parent">
<div class="animated slideInLeft" id="wide">
<center>Hi.</center>
</div>
<div class="tooltipped animated lightSpeedIn" data-position="bottom" data-delay="50" data-tooltip="Hey there! Just hover over that Settings on the left :) Trust me on this one. " id="narrow">
<center>I'm <img src="https://qph.ec.quoracdn.net/main-qimg-00f778bc5f5fcb5d79a0372986ab1e66.webp" width=70>iva, a:
<b class="rotating"> <span class = "inside">
One-Stop Shop<br>
Music Player<br>
Task Manager<br>
Hover Me!
</span></b>
</center>
</div>
</div>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<div class="parent">
<div id="weather"></div>
<div class="circle">
</div>
<a href="https://www.google.com" class="glink">
<div class="r1c">
</div>
</a>
<a href="https://www.youtube.com" class="ylink">
<div class="r2c">
</div>
</a>
<a href="https://www.facebook.com" class="flink">
<div class="r3c">
</div>
</a>
<a href="https://www.amazon.com" class="alink">
<div class="r4c">
</div>
</a>
<div class="r1l">
</div>
<div class="r2l">
</div>
<div class="r3l">
</div>
<div class="r4l">
</div>
</div>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<h2 class="name">
~ Refath</h2>
<div class="area"></div>
<nav class="main-menu">
<div class="featureName">Settings</div>
<div class="jesus">
<h3>Settings</h3>
<hl>
<ul>
<li class="gChange">Google</li>
<button class="gClick waves-effect waves-light green darken-2 btn">Change</button>
<button onClick="store()" class="gSave waves-effect waves-light blue darken-2 btn">Done</button><input type="text" class="gtext" id="gtext" placeholder="Paste New URL" onkeydown="if (event.keyCode == 13)
document.getElementById('gSave').click()">
<li class="aChange">Amazon</li><button class="aClick waves-effect waves-light green darken-2 btn">Change</button>
<button class="aSave waves-effect waves-light blue darken-2 btn">Done</button><input type="text" class="atext" placeholder="Paste New URL">
<li class="yChange">Youtube</li><button class="yClick waves-effect waves-light green darken-2 btn">Change</button>
<button class="ySave waves-effect waves-light blue darken-2 btn">Done</button><input type=t ext class="ytext" placeholder="Paste New URL">
<li class="fChange">Facebook</li><button class="fClick waves-effect waves-light green darken-2 btn">Change</button>
<button class="fSave waves-effect waves-light blue darken-2 btn">Done</button><input type=t ext class="ftext" placeholder="Paste New URL">
<li class="speedChange">Speed</li><button class="speedClick waves-effect waves-light green darken-2 btn">Change</button>
<button class="speedSave waves-effect waves-light blue darken-2 btn">Done</button><input type=t ext class="speedtext" placeholder="Change wheel speed">
<li class="bgChange">Background Image</li>
<input id="ImageUrl" placeholder="Background Image URL" /> <button class="waves-effect waves-light blue darken-2 btn" id="Btn">Go</span>
<br> <br>
<button class = "simple waves-effect waves-light green darken-2 btn">Simplify</button>
</ul>
</div>
</nav>
<div class="container">
<ul class="social">
<li class="dribbble">
<img src="http://cdn.appstorm.net/web.appstorm.net/files/2010/12/Chrome-Store1.png">
</li>
</ul>
</div>
<form>
<label>Enter a new task:</label>
<input class="input" type="text">
<input type="submit" value="Add">
</form>
<ul title="Click to delete; drag to reorder">
</ul>
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://code.jquery.com/ui/1.11.0/jquery-ui.min.js"></script>
<script src="scripts.js"></script>
body {
height: 100%;
/* overflow: auto; */
}
#import url('https://fonts.googleapis.com/css?family=Quicksand:500');
body {
/**background-image: url("http://1.bp.blogspot.com/-cynjeO46IAM/UBUmNk0NnxI/AAAAAAAAAqg/jpqpb_LMn6U/s1600/tR2hW.jpg")**/
align-content: no-repeat center center fixed;
background-image: url("http://1.bp.blogspot.com/-cynjeO46IAM/UBUmNk0NnxI/AAAAAAAAAqg/jpqpb_LMn6U/s1600/tR2hW.jpg");
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.fChange:hover,
.yChange:hover,
.gChange:hover,
.aChange:hover {
background-color: rgba(3, 3, 3, 0.21);
transition: all ease 0.2s;
}
.circle,
.r1c,
.r2c,
.r3c,
.r4c {
width: 90px;
height: 90px;
border-radius: 90px;
fill: lightred;
position: fixed;
margin: auto;
background-size: 100px 100px;
background-repeat: no-repeat;
background-position: -5px -5px;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
}
.r1c,
.r2c,
.r3c,
.r4c,
.circle {
animation: around infinite;
animation-duration: 30s;
animation-direction: reverse;
}
.r1c.off,
.r2c.off,
.r3c.off,
.r4c.off {
-ms-animation-play-state: paused;
-o-animation-play-state: paused;
-moz-animation-play-state: paused;
-webkit-animation-play-state: paused;
animation-play-state: paused;
}
.circle {
background-image: url(https://qph.ec.quoracdn.net/main-qimg-a1bd7842675b4c551751a7bb50da3667);
background-position: -5px -6px;
opacity: 0.9;
}
.r1c:hover,
.r2c:hover,
.r3c:hover,
.r4c:hover {
width: 108px;
height: 108px;
border-radius: 108px;
transition: 0.07s ease-in;
background-size: 120px 120px;
background-position: -5.4px -5.4px;
}
.r1c {
overflow: hidden;
top: 400px;
background-image: url("http://icons.iconarchive.com/icons/xenatt/the-circle/512/App-Google-icon.png");
}
.r2c {
top: -400px;
background-image: url(https://www.shareicon.net/data/512x512/2015/09/30/109354_media_512x512.png);
}
.r3c {
left: 400px;
background-image: url(https://cdn.worldvectorlogo.com/logos/facebook-3.svg);
}
.r4c {
right: 400px;
background-image: url("https://lh3.googleusercontent.com/mIeBLLu8xOi-1bPbtRO_HYb5d1VchJDLDH4hebMO7R-GNOfueGDtHCKgPWFjwyCAORQ=w300");
}
.r1l,
.r2l,
.r3l,
.r4l {
border: white 1px solid;
width: 0px;
height: 90px;
border-radius: 90px;
fill: lightred;
position: absolute;
margin: auto;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
}
.r1l {
top: 200px;
}
.r2l {
top: -200px;
}
.r3l {
width: 90px;
height: 0px;
left: 200px;
}
.r4l {
width: 90px;
height: 0px;
left: -200px;
}
.parent.off {
-ms-animation-play-state: paused;
-o-animation-play-state: paused;
-moz-animation-play-state: paused;
-webkit-animation-play-state: paused;
animation-play-state: paused;
}
.parent {
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
animation: around infinite;
}
.parent.custom {
animation-duration: 30s;
}
#keyframes around {
0% {
transform: rotate(0deg);
}
25% {
transform: rotate(90deg);
}
25% {
transform: rotate(90deg);
}
50% {
transform: rotate(180deg);
}
50% {
transform: rotate(180deg);
}
75% {
transform: rotate(270deg);
}
75% {
transform: rotate(270deg);
}
100% {
transform: rotate(360deg);
}
}
#wide {
color: white;
font-size: 60px;
font-family: 'Quicksand', sans-serif;
flex: 0.1;
background-color: rgba(51, 153, 255, 0.5);
}
#narrow {
color: lightblue;
font-size: 60px;
flex: 0.9;
font-family: 'Quicksand', sans-serif;
background-color: rgba(51, 153, 255, 0.7);
}
.name {
position: relative;
font-size: 60px;
text-align: center;
font-family: 'Quicksand', sans-serif;
}
.rotate-text {
color: white;
font-size: 60px;
flex: 0.5;
font-family: 'Quicksand', sans-serif;
background: lightblue;
background-color: rgba(51, 153, 255, 0.8);
}
#parent {
display: flex;
background-color: red;
}
.juan {
font: 40px/50px Arial;
text-align: center;
}
.jesus {
text-align: center;
font-size: 20px;
}
.rotate-text {
display: inline-block;
background-color: lightgreen;
}
.rotating {
float: right;
overflow: hidden;
position: relative;
height: 100px;
}
.inside {
display: inline-block;
color: lightblue;
position: relative;
white-space: nowrap;
top: -20px;
left: 0px;
animation: move 5s;
animation-iteration-count: infinite;
animation-delay: 1s;
padding: 20px;
}
#keyframes move {
0% {
top: -20px;
}
20% {
top: -100px;
}
40% {
top: -200px;
}
60% {
top: -300px;
}
}
.name {
color: white;
}
.options {
width: 400px;
height: 450px;
color: white;
padding: 15px 10px 0px 5px;
float: left;
position: relative;
top: -340px;
left: 20px;
}
.gtext,
.atext,
.ytext,
.ftext {
border-radius: 20px;
background-color: rgba(255, 255, 255, 0.5);
width: 20px;
height: 25px;
color: white;
font-family: 'Quicksand', sans-serif;
font-size: 20px;
}
li {
padding: 7px;
}
html {
overflow: hidden;
height: 100%;
}
body {
height: 100%;
/* overflow: auto; */
}
button {
fill: red;
}
.setText {
text-align: center;
font-size: 20px;
}
button {
color: red;
}
/**Derived from: **/
#import url(//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css);
}
#import url(https://fonts.googleapis.com/css?family=Titillium+Web:300);
.fa-2x {
font-size: 2em;
}
.fa {
position: relative;
display: table-cell;
width: 160px;
height: 236px;
text-align: center;
vertical-align: middle;
font-size: 20px;
}
.main-menu:hover,
nav.main-menu.expanded {
width: 300px;
overflow: visible;
overflow-y: scroll;
padding-left: 20px;
transition: 0.9s ease-out all;
}
.main-menu {
padding-left: 20px;
background: #fbfbfb;
position: absolute;
top: 100px;
background-color: rgba(51, 153, 255, 0.5);
bottom: 0px;
height: 90%;
left: 0;
width: 20px;
overflow: visible;
overflow-y: scroll;
-webkit-transition: width .05s linear;
transition: width .05s linear;
-webkit-transform: translateZ(0) scale(1, 1);
z-index: 1000;
padding-top: 20px;
transition: 0.9s ease-out all;
padding-bottom: 50px;
}
.featureName {
transform: rotate(-90deg);
position: relative;
top: 50%;
right: 10px;
}
.main-menu:hover>.featureName {
visibility: hidden;
}
.main-menu>ul {
margin: 2px 0;
}
.main-menu li {
position: relative;
display: block;
width: 250px;
}
/**your element has a height of auto, overflow hidden, and content within it that are position float. giving that outer element a set height, and then a child element that grows to fit the content, would allow the parent element to scroll the child
**/
.main-menu li>a {
position: relative;
display: table;
border-collapse: collapse;
border-spacing: 0;
color: #999;
font-family: arial;
font-size: 14px;
text-decoration: none;
-webkit-transform: translateZ(0) scale(1, 1);
-webkit-transition: all .1s linear;
transition: all .1s linear;
}
.main-menu .nav-icon {
position: relative;
display: table-cell;
width: 60px;
height: 36px;
text-align: center;
vertical-align: middle;
font-size: 18px;
}
.main-menu .nav-text {
position: relative;
display: table-cell;
vertical-align: middle;
width: 20px;
}
.main-menu>ul.logout {
position: absolute;
left: 0;
bottom: 0;
}
.no-touch .scrollable.hover {
overflow-y: visible;
overflow-y: scroll;
}
.no-touch .scrollable.hover:hover {
overflow-y: auto;
overflow: visible;
overflow-y: scroll;
}
a:hover,
a:focus {
text-decoration: none;
}
nav {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
}
nav ul,
nav li {
outline: 0;
margin: 0;
padding: 0;
}
.main-menu li:hover>a,
nav.main-menu li.active>a,
.dropdown-menu>li>a:hover,
.dropdown-menu>li>a:focus,
.dropdown-menu>.active>a,
.dropdown-menu>.active>a:hover,
.dropdown-menu>.active>a:focus,
.no-touch .dashboard-page nav.dashboard-menu ul li:hover a,
.dashboard-page nav.dashboard-menu ul li.active a {
color: #fff;
background-color: #5fa2db;
}
.blurredBg {
height: 100%;
width: 100%;
text-align: center;
background-size: cover;
position: absolute;
left: 0;
top: 0;
background-image: url("http://1.bp.blogspot.com/-cynjeO46IAM/UBUmNk0NnxI/AAAAAAAAAqg/jpqpb_LMn6U/s1600/tR2hW.jpg");
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
#ImageUrl {}
#charset "utf-8";
#import url(http://weloveiconfonts.com/api/?family=entypo);
a[class*="entypo-"]:before {
font-family: 'entypo', sans-serif;
}
/* ---------- GENERAL ---------- */
a {
text-decoration: none;
}
ul {
list-style: none;
margin: 0;
padding: 0;
}
.container {
left: 70%;
position: absolute;
top: 50%;
transition: 0.3s all ease;
}
/* ---------- SOCIAL ---------- */
.social {
position: relative;
height: 3em;
width: 13.5em;
}
.social li {
display: block;
height: 4em;
line-height: 4em;
margin: -2.2em;
position: absolute;
-webkit-transition: -webkit-transform .7s;
-moz-transition: -moz-transform .7s;
-ms-transition: -ms-transform .7s;
-o-transition: -o-transform .7s;
transition: transform .7s;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
text-align: center;
width: 4em;
}
.social a {
color: #fffdf0;
display: block;
height: 4em;
line-height: 4em;
text-align: center;
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
transform: rotate(-45deg);
width: 4em;
transition: 0.3s all ease;
}
.social li:hover {
-webkit-transform: scale(1.3, 1.3) rotate(45deg);
-moz-transform: scale(1.3, 1.3) rotate(45deg);
-ms-transform: scale(1.3, 1.3) rotate(45deg);
-o-transform: scale(1.3, 1.3) rotate(45deg);
transform: scale(1.3, 1.3) rotate(45deg);
transition: 0.3s all ease;
}
.facebook {
background: #155b9d;
left: 0;
top: 0%;
}
.container img {
width: 50px;
position: relative;
top: -20%;
}
.twitter {
background: #1a9ec4;
bottom: 0;
left: 25%;
}
.dribbble {
background-color: lightblue;
left: 50%;
top: 0%;
width: 5em;
height: 5em;
}
.dribbble img {
top: 0%;
}
.social .dribbble {
width: 5em;
height: 5em;
left: 46%;
top: -50%;
}
.behance {
background: #3f7aa3;
bottom: 0;
left: 75%;
}
.linked-in {
background: #157f9d;
left: 100%;
top: 0%;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-beta/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-tour/0.11.0/css/bootstrap-tour-standalone.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vex-js/4.0.0/css/vex-theme-flat-attack.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vex-js/4.0.0/css/vex.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vex-js/4.0.0/css/vex-theme-os.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tooltipster/3.3.0/css/themes/tooltipster-light.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
<div class="blurredBg">
</div>
<div id="parent">
<div class="animated slideInLeft" id="wide">
<center>Hi.</center>
</div>
<div class="tooltipped animated lightSpeedIn" data-position="bottom" data-delay="50" data-tooltip="Hey there! Just hover over that Settings on the left :) Trust me on this one. " id="narrow">
<center>I'm <img src="https://qph.ec.quoracdn.net/main-qimg-00f778bc5f5fcb5d79a0372986ab1e66.webp" width=70>iva, a:
<b class="rotating"> <span class = "inside">
One-Stop Shop<br>
Music Player<br>
Task Manager<br>
Hover Me!
</span></b>
</center>
</div>
</div>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<div class="parent">
<div id="weather"></div>
<div class="circle">
</div>
<a href="https://www.google.com" class="glink">
<div class="r1c">
</div>
</a>
<a href="https://www.youtube.com" class="ylink">
<div class="r2c">
</div>
</a>
<a href="https://www.facebook.com" class="flink">
<div class="r3c">
</div>
</a>
<a href="https://www.amazon.com" class="alink">
<div class="r4c">
</div>
</a>
<div class="r1l">
</div>
<div class="r2l">
</div>
<div class="r3l">
</div>
<div class="r4l">
</div>
</div>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<h2 class="name">
~ Refath</h2>
<div class="area"></div>
<nav class="main-menu">
<div class="featureName">Settings</div>
<div class="jesus">
<h3>Settings</h3>
<hl>
<ul>
<li class="gChange">Google</li>
<button class="gClick waves-effect waves-light green darken-2 btn">Change</button>
<button onClick="store()" class="gSave waves-effect waves-light blue darken-2 btn">Done</button><input type="text" class="gtext" id="gtext" placeholder="Paste New URL" onkeydown="if (event.keyCode == 13)
document.getElementById('gSave').click()">
<li class="aChange">Amazon</li><button class="aClick waves-effect waves-light green darken-2 btn">Change</button>
<button class="aSave waves-effect waves-light blue darken-2 btn">Done</button><input type="text" class="atext" placeholder="Paste New URL">
<li class="yChange">Youtube</li><button class="yClick waves-effect waves-light green darken-2 btn">Change</button>
<button class="ySave waves-effect waves-light blue darken-2 btn">Done</button><input type=t ext class="ytext" placeholder="Paste New URL">
<li class="fChange">Facebook</li><button class="fClick waves-effect waves-light green darken-2 btn">Change</button>
<button class="fSave waves-effect waves-light blue darken-2 btn">Done</button><input type=t ext class="ftext" placeholder="Paste New URL">
<li class="speedChange">Speed</li><button class="speedClick waves-effect waves-light green darken-2 btn">Change</button>
<button class="speedSave waves-effect waves-light blue darken-2 btn">Done</button><input type=t ext class="speedtext" placeholder="Change wheel speed">
<li class="bgChange">Background Image</li>
<input id="ImageUrl" placeholder="Background Image URL" /> <button class="waves-effect waves-light blue darken-2 btn" id="Btn">Go</span>
<br> <br>
<button class = "simple waves-effect waves-light green darken-2 btn">Simplify</button>
</ul>
</div>
</nav>
<div class="container">
<ul class="social">
<li class="dribbble">
<img src="http://cdn.appstorm.net/web.appstorm.net/files/2010/12/Chrome-Store1.png">
</li>
</ul>
</div>
<form>
<label>Enter a new task:</label>
<input class="input" type="text">
<input type="submit" value="Add">
</form>
<ul title="Click to delete; drag to reorder">
</ul>
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://code.jquery.com/ui/1.11.0/jquery-ui.min.js"></script>
<script src="scripts.js"></script>
Also you have a problem with
.main-menu {
height: 90%;
It should be
height: calc(100% - 100px);
But it would be better if you remove height (or set it to auto) and use only
bottom: 0;
So The block will fit regardless window size:
Problem solved! Turns out there was a padding code afterwards interfering with my commands!
I want to make a header appear to have an animated underline when the parent element is hovered. Right now it is very close but I can't seem to position it correctly so that its width grows in both directions from its center, which is what I want it to do. Does someone know what I'm missing or need to add to my code to make this happen? The code below is what I think is relevant to fixing the situation. The entire project can be viewed via this CodePen as well. Thanks in advance! (The underlining is only applied to the first header when hovering).
HTML:
<div class="row flex-row">
<div id="top-image" class="image-block">
<h3>Fish Tail</h3>
<div class="underline"></div>
<img class="flex-image" src="https://source.unsplash.com/KSHq0VSqLMA">
</div>
<div class="image-block">
<h3>Swallow Tail</h3>
<img class="flex-image" src="https://source.unsplash.com/U--hvQ5MKjY">
</div>
<div class="image-block">
<h3>Directional</h3>
<img class="flex-image" src="https://source.unsplash.com/F3ePNdQb_Lg">
</div>
</div>
CSS:
.image-block:hover > h3{
letter-spacing: 8px;
transition: all .3s ease-in-out;
}
.underline {
visibility: hidden;
background-position: center;
background-color: white;
position: absolute;
top: 60%;
margin: 0;
width: 10px;
height: 10px;
border-radius: 5px;
transform: scaleX(0);
webkit-transition: all .3s ease-in-out;
transition: all .3s ease-in-out;
}
.image-block:hover .underline {
visibility: visible;
transform: scaleX(1);
width: 100%;
height: 10px;
transition: all .3s ease-in-out;
}
Edit:
I am trying to use the same ideas from someone else's Underlining Effect CodePen. The biggest difference is I don't want to have an <a> inside my header.
If you apply width: 100% to the .underline rule it begins the animation from the center.
.underline {
visibility: hidden;
background-position: center;
background-color: white;
position: absolute;
top: 60%;
margin: 0;
width: 100%; /**** Change this to 100% ****/
height: 10px;
border-radius: 5px;
transform: scaleX(0);
webkit-transition: all .2s ease-in-out;
transition: all .3s ease-in-out;
}
Adjusting the width of the line
To adjust the width of the line you can change the following:
.underline{
margin: 10% /*<== Set to half of 'what's left' in this case half of 20% is 10%*/
width: 80%;
}
.image-block:hover .underline {
width: 80% /*<== Set to match the .underline width */
}
* {
box-sizing: border-box;
}
.row {
min-width: 100%;
}
.flex-row {
display: flex;
flex-wrap: wrap;
}
.image-block {
position: relative;
width: 33.33%;
float: left;
margin-top: 0;
z-index: 5;
}
.image-block:hover {
-webkit-filter: grayscale(100%);
/* Safari 6.0 - 9.0 */
filter: grayscale(100%);
}
.image-block h3 {
position: absolute;
text-align: center;
font-family: 'Roboto', sans-serif;
color: white;
top: 40%;
width: 100%;
font-size: 48px;
letter-spacing: 5px;
margin: 0;
transition: all .3s ease-in-out;
}
.image-block:hover>h3 {
letter-spacing: 8px;
transition: all .3s ease-in-out;
}
.underline {
visibility: hidden;
background-position: center;
background-color: white;
position: absolute;
top: 60%;
margin: 0;
width: 100%;
/**** Change this to 100% ****/
height: 10px;
border-radius: 5px;
transform: scaleX(0);
webkit-transition: all .2s ease-in-out;
transition: all .3s ease-in-out;
}
.image-block:hover .underline {
visibility: visible;
transform: scaleX(1);
width: 100%;
height: 10px;
transition: all .3s ease-in-out;
}
.flex-image {
width: 100%;
height: auto;
display: flex;
}
#media all and (max-width: 1200px) {
.image-block {
width: 33.33%%;
}
}
#media all and (max-width: 1660px) {
.navbar a {
padding: 14px 14%;
}
}
#media all and (max-width: 1035px) {
.navbar a {
padding: 14px 12%;
}
}
#media all and (max-width: 880px) {
#top-image {
margin-top: 150px;
}
.image-block {
width: 100%;
margin: 0;
}
.navbar a:not(:first-child) {
display: none;
}
.navbar a.icon {
float: right;
display: block;
}
.navbar.responsive {
position: relative;
}
.navbar.responsive .icon {
position: fixed;
right: 0;
top: 0;
}
.navbar.responsive a {
float: none;
display: block;
text-align: left;
}
.navbar a:hover {
transform: scale(1);
}
}
<div class="row flex-row">
<div id="top-image" class="image-block">
<h3>Fish Tail</h3>
<div class="underline">
</div>
<img class="flex-image" src="https://source.unsplash.com/KSHq0VSqLMA">
</div>
</div>
When you open it, click in the color aqua div, then make a hover in the first box and click where it says "CLICK ME". You'll see that when the appearing div reaches the border of the windows, there is a little movement in the top border, which is very annoying. I tried a lot of things but i wasn't able to remove it. Any ideas? Thanks in advance.
/* ////// INITIAL RESET AND CONFIGURATIONS ////// */
html {
margin: 0;
padding: 0;
}
body {
margin: 0;
padding: 0;
/* Hide the other pages */
}
body {
margin: 0;
padding: 0;
border: 0;
/*height: 100%; Also works 100vh (View percentage lenght) */
overflow: hidden;
}
ul {
list-style: none;
text-align: center;
}
a {
display: block;
border: none;
text-decoration: none;
color: black;
cursor: default;
}
/*================================== PAGE SLIDE TRANSITION ==================================*/
/* Basic Style/Positioning for all Pages */
.pages,
.page,
.page .backbutton,
.page .nextbutton {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
.page .backbutton,
.page .nextbutton {
height: 10%;
background-color: red;
z-index: 1;
}
.page .backbutton {
top: 0%;
}
.page .nextbutton {
top: 90%;
background-color: aqua;
}
/* Pages */
#i2 {
top: 100%;
}
#i3 {
top: 200%;
}
/* Slide Effect */
.pages {
-webkit-transition: top 0.8s;
-moz-transition: top 0.8s;
-o-transition: top 0.8s;
-ms-transition: top 0.8s;
transition: top 0.8s;
}
#a1:target .pages {
top: 0%;
}
#a2:target .pages {
top: -100%;
}
#a3:target .pages {
top: -200%;
}
#i1 {
background-color: #fff;
}
#i2 {
background-color: #bbb;
}
#i3 {
background-color: #777;
}
/*================================== PAGE ONE ==================================*/
/* ////// ELEMENT'S POSITION ////// */
#i1 {
background-color: bisque;
/*position:relative; stacking context */
}
/* ////// HOVER ////// */
.menu li a:hover {
background: teal;
visibility: visible;
}
#i1 .menu li a:hover + .image {
top: 0;
}
#i1 .menu li a {
z-index: 3;
position: relative;
}
#i1 li .image {
position: absolute;
width: 17.5%;
padding: 0px;
border: 0px #999999 solid;
margin: 0px;
height: 100%;
transition: 0.8s;
top: -50%;
}
#i1 .image1 {
background-color: grey;
left: 10%;
}
#i1 .image2 {
background-color: #777777;
left: 27.5%;
}
#i1 .image3 {
background-color: #555555;
left: 45%;
}
#i1 .image4 {
background-color: #333333;
left: 62.5%;
}
/* ////// ICON ////// */
[data-icon]:before {
/* Allows to show the icons */
font-family: 'icomoon';
content: attr(data-icon);
speak: none;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
}
.icon:before {
/* Shows the icon */
float: left;
content: '\e60e';
font-family: 'icomoon';
speak: none;
color: red;
font-size: 50px;
}
#button_menu {
position: absolute;
display: none;
}
label {
position: absolute;
float: left;
top: 75%;
left: 3%;
border: 1px green solid;
}
#button_menu + label {
cursor: pointer;
}
/* ////// MENU OPTION's TRANSITIONS ////// */
.menu {
list-style: none;
box-sizing: border-box;
width: 70%;
padding: 0;
margin: 0;
margin-top: 80vh;
margin-left: 10%;
overflow: hidden;
border: 1px solid #FF0000;
}
li.option {
float: left;
display: inline-block;
box-sizing: border-box;
padding: 0px 55px 0px 55px;
width: 25%;
margin: 0;
margin-top: 20px;
background: yellow;
border: 1px solid #000;
opacity: 0;
transition: .5s;
}
#button_menu:checked ~ .menu a {
cursor: pointer;
}
#button_menu:checked ~ .menu .option {
margin-top: 0px;
opacity: 1;
}
li.option:first-child {
transition-delay: .6s;
}
li.option:nth-child(2) {
transition-delay: .4s;
}
li.option:nth-child(3) {
transition-delay: .2s;
}
li.option:last-child {
transition-delay: 0s;
}
#button_menu:checked ~ .menu li.option:first-child {
transition-delay: 0s;
}
#button_menu:checked ~ .menu li.option:nth-child(2) {
transition-delay: .2s;
}
#button_menu:checked ~ .menu li.option:nth-child(3) {
transition-delay: .4s;
}
#button_menu:checked ~ .menu li.option:last-child {
transition-delay: .6s;
}
/*================================== PAGE TWO ==================================*/
h1,
p {
text-align: center;
padding: 0;
opacity: 0;
transform: scale(10);
transition: all 0.3s ease-in-out 0.1s;
}
.overlay {
display: block;
100%;
width: 100%;
margin: 0;
padding: 0;
}
#ov .overlay_open {
position: absolute;
margin: 0;
height: 100%;
width: 100%;
visibility: hidden;
opacity: 0;
-webkit-transform: scale(0.9);
transform: scale(0.9|);
-webkit-transition: -webkit-transform 0.2s, opacity 0.2s, visibility 0s 0.2s;
transition: transform 0.2s, opacity 0.2s, visibility 0s 0.2s;
background-color: chocolate;
z-index: 2;
}
/* ////// CENTERING THE PICTURES //////*/
.container {
/*occupes all the screen and hide the divs bigger than it*/
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
overflow: hidden;
}
.center {
position: absolute;
left: 50%;
top: 50%;
}
/*div centers in the middle of its parent, with 0
height and with (just a dot)*/
.center-container {
position: absolute;
left: -2500px;
top: -2500px;
/*move it left and top to be centered exactly in the middle from the center doth*/
width: 5000px;
height: 5000px;
line-height: 5000px;
text-align: center;
/*centers horizontally the pictures*/
overflow: hidden;
}
.dyn-box {
display: inline-block;
vertical-align: middle;
line-height: 100%;
}
/*-----------------***-----------------*/
.box {
float: left;
width: 130px;
height: 130px;
margin: 10px;
border: 5px black solid;
overflow: hidden;
}
.b4 {
clear: both;
}
.picture {
position: absolute;
width: 130px;
height: 130px;
background-color: beige;
}
.mask {
position: absolute;
width: 130px;
height: 130px;
overflow: hidden;
background-color: coral;
opacity: 0;
transition: all 0.3s ease-in-out 0.1s;
}
.box .mask:hover {
opacity: 0.4;
}
.box .mask:hover h1 {
transform: scale(1);
opacity: 1;
}
.box .mask:hover p {
transform: scale(1);
opacity: 1;
transition-delay: .2s;
}
#ov:target .overlay_open {
visibility: visible;
opacity: 0.8;
-webkit-transform: scale(1);
transform: scale(1);
}
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="rock_page.css">
<link rel="stylesheet" type="text/css" href="icons_files/style.css">
<script type="text/javascript" src="jquery-1.11.2.js"></script>
<script type="text/javascript" src="main.js"></script>
<title>Rock n' Roll</title>
</head>
<body>
<div id="a1">
<div id="a2">
<div id="a3">
<div class="pages">
<!-- Second Page #a1 -->
<div id="i1" class="page">
<input type="checkbox" name="button_menu" id="button_menu" />
<label for="button_menu" class="icon"></label>
<!--This also works for the icon instead of the CSS code
<span aria-hidden="true" data-icon="" class="down-arrow">-->
<ul class="menu">
<li class="option">Link 1
<div class="image image1"></div>
</li>
<li class="option">Link 2
<div class="image image2"></div>
</li>
<li class="option">Link 3
<div class="image image3"></div>
</li>
<li class="option">Link 4
<div class="image image4"></div>
</li>
</ul>
</div>
<!-- Second Page #a2 -->
<div id="i2" class="page">
<div class="container">
<div class="center">
<div class="center-container">
<span class="dyn-box">
<div class="box b1">
<div class="picture"></div>
<div class="mask">
<h1>Text</h1>
<p>Lore ipsum facto lore impsum facto</p>
CLICK ME
</div>
</div>
<div class="box b2">
<div class="picture"></div>
<div class="mask">
<h1>Text</h1>
<p>Lore ipsum facto lore impsum facto</p>
</div>
</div>
<div class="box b3">
<div class="picture"></div>
<div class="mask">
<h1>Text</h1>
<p>Lore ipsum facto lore impsum facto</p>
</div>
</div>
<div class="box b4">
<div class="picture"></div>
<div class="mask">
<h1>Text</h1>
<p>Lore ipsum facto lore impsum facto</p>
</div>
</div>
<div class="box b5">
<div class="picture"></div>
<div class="mask">
<h1>Text</h1>
<p>Lore ipsum facto lore impsum facto</p>
</div>
</div>
<div class="box b6">
<div class="picture"></div>
<div class="mask">
<h1>Text</h1>
<p>Lore ipsum facto lore impsum facto</p>
</div>
</div>
</span>
</div>
</div>
</div>
<div id="ov" class="overlay">
<div class="overlay_open">
</div>
</div>
</div>
<!-- Third Page #a3 -->
<div id="i3" class="page">
</div>
</div>
</div>
</div>
</div>
</body>
</html>
This simplified version works exactly like i want, and the transition is more fluid too.
body, .container { margin: 0; padding: 0;}
a {position: absolute}
.container .overlay {
position: fixed;
margin: 0;
padding: 0;
height: 100%;
width: 100%;
visibility: hidden;
opacity: 0;
-webkit-transform: scale(0.9);
transform: scale(0.9);
-webkit-transition: -webkit-transform 0.2s, opacity 0.2s, visibility 0s 0.2s;
transition: transform 0.2s, opacity 0.2s, visibility 0s 0.2s;
background-color: chocolate;
z-index: 2;
}
#c:target .overlay {
visibility: visible;
opacity: 0.8;
-webkit-transform: scale(1);
transform: scale(1);
-webkit-transition: -webkit-transform 0.4s, opacity 0.4s;
transition: transform 0.4s, opacity 0.4s;
}
<body>
<div id="c" class="container">
OPEN
<div class="overlay">
</div>
</div>
</body>