Created
February 13, 2019 04:40
-
-
Save JohnProg/543f2523ccdd68a74304a7e2f0d5c067 to your computer and use it in GitHub Desktop.
flexbox demo
This file contains 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
<style> | |
body { | |
background-color: yellow; | |
margin: 0; | |
} | |
.header-center { | |
background-color: red; | |
max-width: 1200px; | |
height: 200px; | |
margin: 0 auto; | |
/* overflow: hidden; */ | |
display: flex; | |
justify-content: space-between; | |
align-items: center; | |
flex-direction: row; | |
} | |
.header-center nav a { | |
color: #fff; | |
text-decoration: none; | |
display: inline-block; | |
padding: 20px; | |
} | |
@media screen and (max-width: 900px) {/* 0 - 900*/ | |
body { | |
background-color: orange; | |
} | |
.header-center { | |
flex-direction: column; | |
} | |
} | |
@media screen and (max-width: 700px) { /* 0 - 700*/ | |
body { | |
background-color: purple; | |
} | |
} | |
/* .nav-left { | |
float: left; | |
} | |
.nav-right { | |
float: right; | |
} */ | |
</style> | |
<header> | |
<div class="header-center"> | |
<nav class="nav-left"> | |
<a href="">logo</a> | |
<a href="">Cursos</a> | |
<a href="">Comunidad</a> | |
</nav> | |
<nav class="nav-right"> | |
<a href="">Planes</a> | |
<a href="">Ingresar</a> | |
<a href="">Regístrate gratis</a> | |
</nav> | |
</div> | |
</header> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment