DasPete
DasPete

Reputation: 851

Opencart scaled background

I am working on setting up my opencart store. I have one large image as my background for my whole web page. Then all of the content scrolls over it and it stays put. The problem is that the background is not scaled correctly. It is scaled larger than the page. How can I get it to scale to 100% with opencart?

on my home page I have an img element and then use this to scale and position it.

img.bg  {
    min-height: 100%;
    width: 100%;
    height: auto;
    position: fixed;
    top:0;
    left:0;
    z-index: -999;
}

but with open cart I have to sent the image using the stylesheet rather than an image element. So I'm not sure how to apply these styles to the background class. The image is set to the background property of the body class.

Upvotes: 2

Views: 842

Answers (1)

Kevin Lynch
Kevin Lynch

Reputation: 24703

The body CSS is probably the problem. You could try this

body {
    max-height:100%;
    max-width:100%;
}

Upvotes: 1

Related Questions