Skip to content

Instantly share code, notes, and snippets.

@codenart
Last active October 29, 2017 07:33
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 codenart/e6db5ad240d89f42525c4eacd2c27543 to your computer and use it in GitHub Desktop.
Save codenart/e6db5ad240d89f42525c4eacd2c27543 to your computer and use it in GitHub Desktop.
Using for tutorials on codenart.github.io
/* * * * * * * * * * * * * * * * * * * * * * * * * * *
* Reseting CSS
*/
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * *
* Styling navigation bar for large screen devices
*/
.navbar {
position: relative;
background: Black;
}
.navbar-left {
display: inline-block;
margin-left: 15px;
}
.navbar-right {
display: inline-block;
margin-right: 15px;
position: absolute;
top: 0;
right: 0;
}
.navbar-brand,
.navbar .nav-link {
color: White;
text-decoration: none;
display: inline-block;
padding: 15px;
}
.navbar-brand {
font-weight: bold;
padding-left: 30px;
padding-right: 30px;
background: RoyalBlue;
}
.navbar .nav-link:hover {
color: LightGray;
}
.navbar-collapse,
.navbar-toggler {
display: none;
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * *
* Override styles to support mobile devices
*/
@media (max-width: 842px) {
.navbar-right,
.navbar-left {
display: block;
border-top: 1px solid DimGray;
}
.navbar-right {
position: static;
}
.navbar .nav-link {
display: block;
}
.navbar-collapse:checked + .navbar {
max-height: 50px;
overflow: hidden;
}
.navbar-toggler {
color: White;
display: inline-block;
padding: 15px 25px;
position: absolute;
top: 0;
right: 0;
border-left: 1px solid DimGray;
cursor: pointer;
}
} /* @media */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment