Cropping an image in code

My designer insists on a specific header background image, which she wants to cover the header from left to right no matter how wide the browser window. I have tried to use a strip with a background image, but the problem is that I don’t want the image to scale, I need it to crop, because the middle part of it needs to line up with the logos etc. on top of it. One way to do this might be with an image that can tile, but then I seem to be unable to control the exact positioning.

My interim solution is to have 3 header images, the center one and a very wide left and right image which butt up seamlessly against the center image. This works well, except that it causes annoying horizontal scrolling because the image is so wide.

Ideally, I’d like to capture a page resize event and crop the left and right header images to an appropriate width. I gather that capturing a page resize is not supported. Does anyone have any idea how I might be able to dynamically resize my header image to fit the width of the page?

Thanks in advance.

A screenshot of what you have and what you want to achieve may make the question easier to understand for outsiders.

Fair enough. See the attached image. There are 3 images in the header, together wide enough to cover the screen left to right for any reasonable browser size. However, this makes the screen scrollable horizontally. One solution to my problem would be to crop the left and right header images horizontally to fit the browser width. Hope that clears it up.

@bspanger I’m not sure I got you, but why won’t you crop it in advance?
Anyway full screen responsive Wix sites with all the element in a relative position to the viewport width are only possible on EditorX (which is now in beta phase).

The site designer wants the header image to expand to fill the width of the browser window, without scaling. The really wide image does this. See wwwsanco2com - not in production yet but the header behaves the way she likes it. It’s just the horizontal scrolling as a result that is annoying.