• Hi,
    I’m using Fluxipress theme.
    I have some html knowledge from years ago but since then have used things like serif, so I need easy and to the point instructions ??

    I am adding a header image to the Fluxipress theme

    I want the image to automatically resize to the width of the page (column) on different devices.

    here is my site: https://www.soulvibe.co.uk

    I’m sure there is a simple command to do it?

    thanks for any help

    Chris Long

Viewing 2 replies - 1 through 2 (of 2 total)
  • I don’t have this theme, but I took a look at your site, and I can make a suggestion.

    The first thing I’d do is create a child theme, so you can later update the parent theme without losing your modifications.

    The easiest way to make the header image resize to fit the display is to add an ID to the image in the php file that outputs it, usually header.php. What you’d do after creating your child theme is to download a copy of the header.php file, then edit it by finding the line that is outputting this code:
    <img src="https://www.chrislong.me.uk/wp-content/uploads/2013/11/banner-image-1100-width.jpg">
    Edit it so it outputs this:
    <img id="header-image" src="https://www.chrislong.me.uk/wp-content/uploads/2013/11/banner-image-1100-width.jpg">
    All you’re doing is adding an ID to the image so you can easily refer to it in CSS. Upload the edited file to your child theme’s folder so it overrides the parent theme’s header.php.
    Now in the style.css you created for your child theme, just add the following to the end of the file:

    #header-image {
      width: 100%;
      max-width: 1100px;
    }

    Upload the modified style.css for your child theme to your child theme’s folder and you should be good to go.

    Note that there are more sophisticated methods of doing this to accommodate mobile devices so that they are downloading a different, smaller image to speed loading times instead of just scaling this 1100 pixel wide image on the fly, but this is a good starting point.

    Thread Starter Chris Long

    (@chris-long)

    yesss thankyou that worked. I haven’t created a child theme yet, i tried and it didn;t work, so thats the next step ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘resizing a header image in the Fluxipress theme’ is closed to new replies.