Re: Hod do I add a background image to Header wrapper ...
Originally Posted by
shags38
Firstly thanks for your speedy response and the heads up regarding the .webp logo, much appreciated - I will revert to previous .png
Secondly maybe I didn't explain myself fully - I haven't sought advice / posted on this topic previously, I was referring to searches I did within the forums to try to find a correct method to implement a background image without simply just posting .... however I do appreciate your input about the 100% widths and having other divs obscuring others. I will rectify these.
So here is some code I have found online for inclusion in the stylesheet.css - is this suitable for Zen-Cart application?
Code:
#headerWrapper {background: url(..includes/images/image.png) no-repeat; background-position: 100%; background-size: cover; opacity: 0.6;}
and is this inserted in /*bof wrappers - page or section containers*/ in stylesheet.css ??
obviously includes/templates/westminster_new/images/logo.png would have to be changeo to a small typical log stye and size if sitting over the background image?
cheers,
Mike
Personally, I like using
Code:
background-position: center; background-size: contain, cover;
centers and keeps the image responsive and not distorted. I also use my own stylesheet when adding such things so upgrading is easy and it helps with css rules... so bottom of stylesheet.css or stylesheet_MYTEMPLATE.css Also opacity is for anything displayed above the background, not the background image..
Dave
Always forward thinking... Lost my mind!
Bookmarks