-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve navigation bar and tab styles
- Loading branch information
1 parent
732aaaa
commit 8a0a5a0
Showing
5 changed files
with
163 additions
and
194 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,166 +1,114 @@ | ||
/* CSS for the top navigation bar */ | ||
.navigation { | ||
height: 70px; | ||
background-color: #f1f1f1; | ||
color: #363636; | ||
position: sticky; | ||
top: 0; | ||
left: 0; | ||
right: 0; | ||
z-index: 99; | ||
width: 100%; | ||
} | ||
.brand { | ||
position: absolute; | ||
padding-left: 0px; | ||
float: left; | ||
line-height: 70px; | ||
font-weight: 600; | ||
font-size: 1.2em; | ||
height: 70px; | ||
background-color: #f1f1f1; | ||
color: #363636; | ||
position: sticky; | ||
top: 0; | ||
left: 0; | ||
right: 0; | ||
z-index: 99; | ||
width: 100%; | ||
} | ||
.brand { | ||
line-height: 70px; | ||
font-weight: 600; | ||
font-size: 1.2em; | ||
} | ||
|
||
/* hide if screen size is from 900 to 1000 */ | ||
@media screen and (max-width: 1200px) { | ||
.brand { | ||
display: none; | ||
} | ||
} | ||
.brand a, .brand a:visited { | ||
color: #363636; | ||
text-decoration: none; | ||
} | ||
.nav-container { | ||
max-width: 95%; | ||
margin: 0 auto; | ||
.brand { | ||
display: none; | ||
} | ||
} | ||
.brand a, | ||
.brand a:visited { | ||
text-decoration: none; | ||
color: #363636; | ||
} | ||
.brand a:hover, | ||
.brand a:visited:hover { | ||
text-decoration: none; | ||
color: #9b59b6; | ||
} | ||
.nav-container { | ||
max-width: 95%; | ||
margin: 0 auto; | ||
display: flex; | ||
justify-content: space-around; | ||
} | ||
nav { | ||
//float: right; | ||
display: flex; | ||
justify-content: space-around; | ||
padding: 0.5rem; | ||
} | ||
nav ul { | ||
list-style: none; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
nav ul li { | ||
float: left; | ||
position: relative; | ||
font-size: 0.9rem; | ||
font-weight: 500; | ||
} | ||
nav { | ||
float: right; | ||
|
||
.nav-dropdown li { | ||
float: none; | ||
} | ||
nav ul { | ||
list-style: none; | ||
margin: 0; | ||
padding: 0; | ||
|
||
|
||
.nav-list > li .main-nav-item { | ||
padding: 0 20px; | ||
border-radius: 2rem 2rem 2rem 2rem; | ||
} | ||
nav ul li { | ||
float: left; | ||
position: relative; | ||
.nav-list > li .main-nav-item:hover { | ||
border-radius: 2rem 2rem 0rem 0rem; | ||
} | ||
.nav-list > li .main-nav-item { | ||
padding: 0 20px; | ||
|
||
nav ul li a, | ||
nav ul li a:visited { | ||
display: block; | ||
//padding: 0 20px; | ||
line-height: 50px; | ||
background-color: #f1f1f1; | ||
color: #363636; | ||
text-decoration: none; | ||
} | ||
|
||
nav ul li a, nav ul li a:visited { | ||
display: block; | ||
//padding: 0 20px; | ||
line-height: 70px; | ||
background-color: #f1f1f1; | ||
color: #363636; | ||
text-decoration: none; | ||
nav ul li a:hover, | ||
nav ul li a:visited:hover { | ||
background: #9b59b6; | ||
color: #fff; | ||
} | ||
nav ul li a:not(:only-child):after, | ||
nav ul li a:visited:not(:only-child):after { | ||
padding-left: 4px; | ||
content: " ▾"; | ||
} | ||
|
||
.long-item { | ||
min-width: 240px; | ||
} | ||
.medium-item { | ||
min-width: 190px; | ||
} | ||
.short-item { | ||
min-width: 150px; | ||
} | ||
nav ul li ul li a { | ||
padding: 15px; | ||
line-height: 20px; | ||
} | ||
.nav-dropdown { | ||
position: absolute; | ||
display: none; | ||
z-index: 1; | ||
box-shadow: 0 6px 6px rgba(0, 0, 0, 0.2); | ||
border-radius: 0rem 0rem 1rem 1rem; | ||
background-color: #f1f1f1; | ||
|
||
nav ul li a:hover, nav ul li a:visited:hover { | ||
background: #9b59b6; | ||
color: #fff; | ||
} | ||
nav ul li a:not(:only-child):after, nav ul li a:visited:not(:only-child):after { | ||
padding-left: 4px; | ||
content: ' ▾'; | ||
} | ||
nav ul li ul li { | ||
min-width: 190px; | ||
} | ||
nav ul li ul li a { | ||
padding: 15px; | ||
line-height: 20px; | ||
} | ||
.nav-dropdown { | ||
position: absolute; | ||
display: none; | ||
z-index: 1; | ||
} | ||
/* Mobile navigation */ | ||
.nav-mobile { | ||
display: none; | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
background-color: #f1f1f1; | ||
height: 70px; | ||
width: 70px; | ||
} | ||
@media only screen and (max-width: 798px) { | ||
.nav-mobile { | ||
display: block; | ||
} | ||
nav { | ||
width: 100%; | ||
padding: 70px 0 15px; | ||
} | ||
nav ul { | ||
display: none; | ||
} | ||
.main-nav-item { | ||
padding: 14px 20px !important; | ||
} | ||
nav ul li { | ||
float: none; | ||
} | ||
nav ul li a { | ||
padding: 15px; | ||
line-height: 20px; | ||
padding: 1em; | ||
} | ||
nav ul li ul li a { | ||
padding-left: 30px; | ||
} | ||
.nav-dropdown { | ||
position: static; | ||
} | ||
} | ||
@media screen and (min-width: 799px) { | ||
.nav-list { | ||
display: block !important; | ||
} | ||
} | ||
#nav-toggle { | ||
position: absolute; | ||
left: 18px; | ||
top: 22px; | ||
cursor: pointer; | ||
padding: 10px 35px 16px 0px; | ||
} | ||
#nav-toggle span, #nav-toggle span:before, #nav-toggle span:after { | ||
cursor: pointer; | ||
border-radius: 1px; | ||
height: 5px; | ||
width: 35px; | ||
background: black; | ||
position: absolute; | ||
display: block; | ||
content: ''; | ||
transition: all 300ms ease-in-out; | ||
} | ||
#nav-toggle span:before { | ||
top: -10px; | ||
} | ||
#nav-toggle span:after { | ||
bottom: -10px; | ||
} | ||
#nav-toggle.active span { | ||
background-color: transparent; | ||
} | ||
#nav-toggle.active span:before, #nav-toggle.active span:after { | ||
top: 0; | ||
} | ||
#nav-toggle.active span:before { | ||
transform: rotate(45deg); | ||
} | ||
#nav-toggle.active span:after { | ||
transform: rotate(-45deg); | ||
} | ||
article { | ||
max-width: 1000px; | ||
margin: 0 auto; | ||
padding: 10px; | ||
} | ||
|
||
} |
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
Oops, something went wrong.