Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1325711

    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)

    #1325717

    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

    #1326349

    Duh! Thanks.

    #1326353

    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

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Sticky Mobile Menu Error In Code?’ is closed to new replies.