Disable background attachment for post header image?

Hello - I am having some issues with the header image not staying the proper size on a post page, it keeps zooming in on the picture despite the image being exactly the dimensions as specified for the banner. Here’s the page: http://www.brokerderek.com/why-you-need-a-real-estate-professional/

Attached is an image of what it SHOULD look like with the proper zoom, etc… any ideas? Been tweaking the css quite a bit and couldn’t get anything to stick with header#header CSS

HI there

Thank you for question
Your image does not have correct size to cover entire area, try to use something like this size 1521*514 or scaled up size, please note, this size is good for my screen but you need to increase it up to 2000px and in increasing size I mean if you increase width you have to increase height as well,

please add this css in appearance > customize > additional css:

header#header {
background-size: contain;
}

this is for testing, you will see how image is behaving in the given container of the banner and you will get the idea what to increase, width or height

Hi Noda - Thanks for the reply, neither resizing the image or putting additional code in the “additional css” section seemed to help, so I went into the core file and was able to override the issue by adding an additional line of code for the background-attachment under header#header:

header#header {
position: relative;
background-attachment: initial !important;
}

Now on to other issues… :slight_smile:

Hi

Well, that’s not proper fix, most probably you have not read my message with attention, im not about to use CSS i provided in the code, its just for testing to see how your image is behaving in the container
Anyway, if you like what you did can i close this case now?

Noda - I read your message with attention. While your suuggestion helped me understand how the image was behaving, regardless of the size of the image (and I scaled it up plenty, 2560x1440 minimum) it was still not working properly so my workaround, while not “proper” achieves a result I can live with for now until I can spend more time on this. You may close this case, thanks again.

Hi, there

Cool :slight_smile:
Feel free to contact us again Thanks!