:
, , , :

, , , . , - , , . , .
:
, , , : . , , , , .
:
. , static , .
:
fixed . , , , CSS fixed-header .
:
180px, .
:
1. StateChange
. 150px 180px . , JS-:
JS:
if ($(window).scrollTop() >= 150) {
...
(function() {
new Headroom(document.querySelector("#page-menu"), {
tolerance: 5,
offset : 150,
JS:
if ($(window).scrollTop() >= 180) {
...
(function() {
new Headroom(document.querySelector("#page-menu"), {
tolerance: 5,
offset : 180,
header height height.
CSS:
header {
height:150px;
position: relative;
z-index:30;
}
CSS:
header {
position: relative;
z-index:30;
}
2.
, - , , .header--fixed link-header . , , , CSS.
CSS:
.link-header {
background-color:#292f36;
height: 100px;
}
.header--fixed {
position:fixed;
z-index:10;
right:0;
left:0;
top:0px;
}
-, ul nav.
CSS:
#page-menu ul {
list-style-type: none;
margin: 0;
position: absolute;
bottom: 5px;
right: 10px;
}
CSS:
#page-menu ul {
list-style-type: none;
margin: 0 auto;
padding:0;
width:960px;
max-width:100%;
text-align:right;
}
3.
, , fixed-header nav. jQuery.
JS:
if ($(window).scrollTop() >= 180) {
$('nav#page-menu').addClass('fixed-header');
}
else {
$('nav#page-menu').removeClass('fixed-header');
}
NewJS:
if ($(window).scrollTop() >= 180) {
$('header nav').addClass('fixed-header');
}
else {
$('header nav').removeClass('fixed-header');
}
4.
, , li nav . margin-right, .
CSS:
#page-menu ul li {
display: inline-block;
margin-left: 10px;
}
CSS:
#page-menu ul li {
display: inline-block;
margin-left: 10px;
margin-right: 10px;
}
, , HTML , nav. , :
<nav>
<ul>
<li><a href="/dentist/">Dentists</a></li>
<li><a href="/lab/">Labs</a></li>
<li><a href="/patient/">Patients</a></li>
<ul> <--- ( Should be </ul> )
</nav>
:
http://codepen.io/anon/pen/qIrhx