A Pen by Diego Vazquez on CodePen.
Created
October 30, 2018 23:05
-
-
Save diurivj/cc594de1bd594f907ba3446c11ebfaf8 to your computer and use it in GitHub Desktop.
position a la old school
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<header> | |
<ul> | |
<li>login</li> | |
| | |
<li>signup</li> | |
| | |
<li>home</li> | |
</ul> | |
</header> | |
<section id="home"> | |
<h1>Home</h1> | |
<h2>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dicta repellendus eaque fuga quis, cumque id inventore exercitationem incidunt optio vero sed voluptatibus totam. Officiis similique nesciunt repellat dolor voluptate modi.</h2> | |
</section> | |
<section id="signup"> | |
<h2>Signup</h2> | |
<div class="email"></div> | |
<div class="password"></div> | |
</section> | |
<section id="login"> | |
<h2>Login</h2> | |
<div class="email"></div> | |
<div class="password"></div> | |
</section> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
header { | |
width: 100%; | |
height: 20px; | |
background-color: goldenrod; | |
position: fixed; | |
top: 0px; | |
} | |
li { | |
display: inline; | |
} | |
ul { | |
float: right; | |
} | |
* { | |
margin: 0; | |
} | |
#home { | |
padding-top: 20px; | |
text-align: center; | |
background-color: rgba(255,0,0,0.3) | |
} | |
#signup { | |
text-align: center; | |
background-color: rgba(123,100,255,0.3); | |
position: absolute; | |
width: 100%; | |
} | |
#signup .email, #signup .password { | |
margin-bottom: 10px; | |
width: 100px; | |
height: 20px; | |
background-color: black; | |
position: relative; | |
left: calc(50% - 50px); | |
} | |
#login { | |
margin-top: 90px; | |
text-align: center; | |
background-color: rgba(215,202,42,0.4); width: 100%; | |
} | |
#login .email, #login .password { | |
margin-bottom: 10px; | |
width: 100px; | |
height: 20px; | |
background-color: black; | |
position: relative; | |
left: calc(50% - 50px); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment