Hi,
I’ve got an image set as the main content background but no matter what I do, it goes up beyond and under the header.
I’ve tried all sorts of things in the theme and code snippets from the forums but don’t seem to be able to get it to just show in the main body area. I’ve even tried to use it as a background to a colour section and a grid but it still does the same.
What I want to do is have a background image that is contained to show the whole image in the main body area only. Not go behind the header, the breadcrumbs, the footer or possibly even the sidebar ( don’t know about that yet, will have to see how it looks).
Could you please help?
Thank you
Hi,
I might have done it but not sure its the right way;
.main_color {
background: #ffffff url([URL]) center center no-repeat fixed;
background-size: contain;
background-position-y: 150px;
}
Hi,
Thanks for the update. If the CSS you posted works, then I don’t see any problem with using it.
Best regards,
Rikard
Hi,
It sort of works but of course pushes it off the bottom of the screen in some cases and also is no good for a left side menu. Could you advise how I’d do it to always be in the centre of the main area with the whole image visible?
Cheers
Hi,
Could you please try changing background position to following
.main_color {
background: #ffffff url([URL]) center center no-repeat fixed;
background-size: contain;
background-position: 50% 50%;
}
If that does not help, please post a screenshot and show the issue as we might not be on the same page :)
You can upload your screenshots on imgur.com or Dropbox public folder and post the links here.
Best regards,
Yigit