Sprunganker mit ID – sticky Header

Sprunganker bei Sticky Header anpassen, wenn Anker über ID gesetzt wird.

Grobe Lösung:

Desktop:

[id] {
    scroll-margin-top: 100px;
}

Mobil:

@media (max-width: 768px){
[id] {
    scroll-margin-top: 40px;
    }
}

Saubere Lösung:

Desktop:

#anfrage,
#gebiet,
#kontakt {
    scroll-margin-top: 100px;
}

Mobil:

@media (max-width: 768px){
#anfrage,
#gebiet,
#kontakt {
    scroll-margin-top: 40px;
    }
}