Skip to content

Instantly share code, notes, and snippets.

@diurivj
Created October 30, 2018 23:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diurivj/cc594de1bd594f907ba3446c11ebfaf8 to your computer and use it in GitHub Desktop.
Save diurivj/cc594de1bd594f907ba3446c11ebfaf8 to your computer and use it in GitHub Desktop.
position a la old school
<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>
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