-
AuthorPosts
-
November 27, 2025 at 7:37 am #1491865
This code for sticky header for mobile works in Customizer, but not on the web: see: https://temp.hotelonsepen.nl/
/* sticky header on smartphone */
@media only screen and (max-width: 767px) {
.responsive #top #main !important {
/* Margin top value should be equal to header height*/
margin-top: 150px !important;
}
.responsive #top #wrap_all #header {
position: fixed !important;
}
}What is wrong?
Grtz. Fred
November 27, 2025 at 10:29 am #1491880Hey Fred1969,
Did you check the header documentation? https://kriesi.at/documentation/enfold/header/#sticky-header-on-mobile
Best regards,
RikardNovember 27, 2025 at 11:25 am #1491885There is a lot more to think of.
First – to style the header_meta with your phone-info entries.
To prevent breaks occurring where it looks unsightly, it would be a good idea to replace your entries completely with this line:<a style="white-space: nowrap" href="/over-ons/">Over Ons</a><a style="white-space: nowrap" href="/veelgestelde-vragen/">Veel gestelde vragen</a><a style="white-space: nowrap" href="#">Nieuws</a><a style="white-space: nowrap" href="tel:+31434551268">T: +31 (0)43 455 12 68</a>after that we will see if the pipes are neccessary.
On mobile devices, these links become two lines—and this must also be taken into account with the padding-top of main.
After you have these new phone-info – remove your code from above and try:
@media only screen and (max-width: 989px) { .responsive #top #wrap_all #header .container { width: 95%; max-width: 95%; } #header { position: fixed !important; height: 110px !important; max-height: 110px !important; } .responsive.html_header_top.html_mobile_menu_tablet #top #main { padding-top: 110px !important; } #top #header.av_header_transparency #header_meta { background-color: transparent; } #header_main { border-bottom: none; } #header:not(.av_header_transparency) #header_main { box-shadow: 0 5px 10px #eee; } .responsive #top .av-logo-container , .responsive #top .logo a, .responsive #top .logo img, .responsive #top .logo svg { height: 80px !important; max-height: 80px !important; line-height: 80px !important; } .responsive #top #avia-menu > .menu-item-avia-special > a { height: 80px !important; ; line-height: 80px !important; } .responsive.html_mobile_menu_tablet #top #wrap_all .av_header_transparency { background-color: transparent !important; } .responsive #top .header_bg { opacity: 1; filter: alpha(opacity=100); background-color: #FFF !important; } #top #header:not(.av_header_transparency) .header_bg { background-color: #FFF !important; } .responsive.html_mobile_menu_tablet #top .av_header_transparency .logo img.alternate, .responsive.html_mobile_menu_tablet #top .av_header_transparency .logo .subtext.avia-svg-logo-sub { display: block !important; } .responsive.html_mobile_menu_tablet #top .av_header_transparency.av_alternate_logo_active .logo a > img, .responsive.html_mobile_menu_tablet #top .av_header_transparency.av_alternate_logo_active .logo a > svg { opacity: 0; } .html_mobile_menu_tablet .header_color #header.av_header_transparency div .av-hamburger-inner, .html_mobile_menu_tablet .header_color #header.av_header_transparency div .av-hamburger-inner::before, .html_mobile_menu_tablet .header_color #header.av_header_transparency div .av-hamburger-inner::after { background-color: #FFF; } .html_mobile_menu_tablet .header_color #header.av_header_transparency .menu-item-search a:before { color: #FFF; } } @media only screen and (max-width: 767px) { #header { position: fixed !important; height: 140px !important; max-height: 140px !important; } .responsive.html_header_top.html_mobile_menu_tablet #top #main { padding-top: 140px !important; } } @media only screen and (max-width: 435px) { #header { position: fixed !important; height: 160px !important; max-height: 160px !important; } .responsive.html_header_top.html_mobile_menu_tablet #top #main { padding-top: 160px !important; } } /****** End *************/ /****** styling the phone-info links *************/ #top #header_meta .phone-info { display: flex; flex-flow: row wrap; justify-content: space-evenly; gap: 0 30px; }November 27, 2025 at 11:49 am #1491886Maybe something had to be adjusted – but first try the above code. then we will see …
November 27, 2025 at 12:29 pm #1491888if you like to have the pipes between the links:
adjust the new switch point when the links goto a twoliner:@media only screen and (max-width: 467px) { #header { height: 160px !important; max-height: 160px !important; } .responsive.html_header_top.html_mobile_menu_tablet #top #main { padding-top: 160px !important; } }and for phone-info:
/****** styling the phone-info links with pipe separator *************/ #top #header_meta .phone-info { display: flex; flex-flow: row wrap; gap: 0 40px; } #top #header_meta .phone-info a { flex: 1 1 auto; position: relative; } #top #header_meta .phone-info a:not(:last-child)::after { content: '|'; font-size: 18px; position: absolute; right: -24px; color: #FFF; } -
AuthorPosts
- You must be logged in to reply to this topic.
