Das Navigationselement in der Seitenleiste ändert die Breite, sobald die feste Klasse beim Scrollen zu diesem Element hinzugefügt wird. Je nach Bildschirmbreite ändert es sich erheblich.Änderungen der Breite des festen Elements
<div class="col-sm-4 nav_cnt">
<ul class="nav">
<li><a href="destinations2.php">Overview </a></li>
<li><a class="current"href="fac.php">Festiva Adventure Club <i class="fa fa-arrow-circle-right" aria-hidden="true"></i></a></li>
<li><a href="#">Festiva Weeks</a></li>
<li><a href="#">Festiva Exchange Partners</a></li>
<li><a href="#">Voyages by RTX</a></li>
<li><a href="#">Festiva Sailing Vacations</a></li>
</ul>
</div>
@media handheld, only screen and (min-width: 767px) {
.nav_cnt{
position: relative;
}
.fixed{
margin-bottom: 50px;
position:fixed;
top:50px;
width: inherit;
width: 25%;
}
}
$(window).bind('scroll', function() {
if($(window).scrollTop() >= $('.nav_cnt').offset().top - 50) {
$('.nav_cnt').find('.nav').addClass('fixed');
}else{
$('.nav_cnt').find('.nav').removeClass('fixed');
}
});
immer noch die Frage, wo es ist? – Thinker