Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1356725

    Hi I am building a site that needs a full width header image. To achieve this I have used a background image. Obviously this does not work on mobile devices. Is there a way to have a different header with logo and burger menu for mobile devices? Or is there a better way of doing it?
    Thanks

    #1356800

    Can you please describe in more detail how you want the header to look on small screens (or mobile devices)?
    Do you want the header to stay fixed at the top? Do you want the header to shrink after scrolling, etc.? Maybe you can show a sketch.
    you can see here a testpage where the header is still fixed on top – and i think it will be no problem to give to the header_bg a background-image after scroll: https://webers-testseite.de/

    #1356838

    Hi Guenni007
    I don’t need it fixed or to shrink. The mobile menu would just be a small logo (340px * 156px) and burger menu like if I’d set up Enfold normally.
    Thanks

    #1356839

    … by the way, to stop the enfold logo appearing over the top of the background I have added a transparent png to the Theme Options – Logo. This is probably not the way to do it and might alter your solution.

    #1357034

    Hi fanlokbun,

    Please try to add this CSS code in Enfold > General Styling > Quick CSS:

    .responsive #top .header_bg {
        background-size: contain;
    }
    
    @media only screen and (max-width:767px) {
      .responsive #top .header_bg {
        background-position: center;
      }
    }

    Best regards,
    Nikko

    #1357116

    That sort of works but is it possible to change the image at the point the burger menu appears 989px. On a phone it sits over the graphic on the right. The URL of the image I would like to use is below.
    Thanks

    #1357146

    Hi,
    Please try this code in the General Styling ▸ Quick CSS field or in the WordPress ▸ Customize ▸ Additional CSS field:

    @media only screen and (max-width: 989px) { 
    	#top #header.header_color .header_bg {
        background: #ffffff url(/staging/wp-content/uploads/2022/07/Calcott-Construction-Header-Mobile.png) top left no-repeat scroll;
        background-size: contain;
    }
    }

    After applying the css, please clear your browser cache and check.

    Best regards,
    Mike

    #1357178

    Yes that works thanks very much.

    #1357186

    Hi,
    Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Different header mobile’ is closed to new replies.