• Resolved razorpig

    (@mjtilbury)


    Hello all,

    On the following site :

    https://razorweb.co.uk/

    …when device size drops below 640px the header image gets squashed. I’d like the text and the height to remain the same size so just the empty yellow space on the right hand side of the banner narrows. I don’t want the yellow banner to go beyond the grey navigation bar beneath. Any ideas?

Viewing 4 replies - 1 through 4 (of 4 total)
  • I am not a css expert, but it appears that the img tag style sets the “min-width: 460px”. When you change the user agent width to less than 640px, the image is resized and “squashed” as you stated. I think if you were to set the min-width: to something around 640px, your image would not get “squashed”.

    Thread Starter razorpig

    (@mjtilbury)

    Hi jc32, Thanks for the reply. I tried this previously, but the header then extends beyond the navigation bar below a certain width (around 770px). I’ve changed it so you can see what’s happening…

    https://www.razorweb.co.uk

    Marcus,
    I was thinking you could likely use 2 images, and have css select the appropriate image based on width. You could then generate an image for smaller devices that would fit your requirements. I know this would be a lot of work, but it may work. The steps would include:

    Here is a link that discusses the topic.

    Thread Starter razorpig

    (@mjtilbury)

    Thanks jc32, I appreciate the reply. Looks like an excellent solution. I’ll definitely be using that information in the future – in the meantime, all is now working fine. Big thanks again for the reply.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Responsive Header Image’ is closed to new replies.