Cómo arreglar un encabezado en scroll
Estoy creando un encabezado que, una vez desplazado a una cierta cantidad de píxeles, se arregla y permanece en su lugar.
¿Puedo hacer esto usando solo css y html o también necesito jquery?
He creado una demo para que puedas entender. Cualquier ayuda sería genial!
body{
margin:0px;
padding:0px;
}
.clear{
clear:both;
}
.container{
height:2000px;
}
.cover-photo-container{
width:700px;
height: 348px;
margin-bottom: 20px;
background-color:red;
}
.small-box{
width:163px;
height:100px;
border:1px solid blue;
float:left;
}
.sticky-header{
width:700px;
height:50px;
background:orange;
postion:fixed;
}