Tagged: mobile menu
I want to make my mobile menu sticky and fount the instruction here
/* Sticky header on mobile */
@media only screen and (max-width: 767px) {
.responsive #top #main {
/* Margin top value should be equal to header height*/
margin-top: 180px;
}
.responsive #top #wrap_all #header {
position: fixed;
}
}
When I pasted the code into my functions php file I get the following error message
Your PHP code changes were rolled back due to an error on line of file wp-content/themes/enfold-child/functions.php. Please fix and try saving again.
syntax error, unexpected ‘only’ (T_STRING)
Hi,
Thanks for contacting us!
Please add the code to Style.css file of your child theme instead
/* Sticky header on mobile */
@media only screen and (max-width: 767px) {
.responsive #top #main {
/* Margin top value should be equal to header height*/
margin-top: 180px;
}
.responsive #top #wrap_all #header {
position: fixed;
}
}
Regards,
Yigit
Duh! Thanks.
Hi,
You are welcome! :)
For your information, you can take a look at Enfold documentation here – https://kriesi.at/documentation/enfold/
If you have any other questions or issues, feel free to start a new thread under Enfold sub forum and we will gladly try to help you :)
Enjoy the rest of your day!
Best regards,
Yigit