News:

Support the VirtueMart project and become a member

Main Menu

Background image dissapears when Virtumart pages are opened

Started by imageinaction, August 23, 2012, 19:22:31 PM

Previous topic - Next topic

imageinaction

Hi

I have created an image for the background on my Joomla 2.5 website that works fine until a Virtumart page is opened. It looks as though a white background covers the original image ... Any ideas what this is or how I can correct the problem??

ivus

Hi imageinaction,

Link available?

The answer to you question can be answered with another question...

QuoteHow long is a piece of string?

Seriously are you expecting us to know how you've built your site? how it's coded? what styles have been applied?
Help us to help you.

imageinaction

Good point!!!

Currently working with VM2.0.8 on Joomla 2.5.6 PHP 5.3.13. I used Beez20 as the raw template, I amended the CSS to style to pages the way I need them and I added an image to the background. The image I added is in the body tag in the source code for index.php page, the code looks like this:

body {
   background-image: url(../../images/top.jpg);
   background-repeat: repeat-x;
}

It is this image that disappears when I select any Virtumart page ... I have just noticed the Beez20 'default' font re-size item also disappears.

Does this help??

ivus

Hi imageinaction,

Firstly you should use Firebug/Inspector to find out the reason your images are disappearing. It will say "Failed to load resource" and then give you a path that it cannot find. Usually it's to do with the path... because the site generates dynamic routing, this sometimes screws up with the relative paths.

To combat this... I always (and I mean always) especially with dynamic, CMS driven sites, use absolute paths.

YOUR CURRENT CODE:

body {
   background-image: url(../../images/top.jpg);
   background-repeat: repeat-x;
}


WHAT MINE WOULD LOOK LIKE:

body {
   background-image: url(/images/top.jpg);
   background-repeat: repeat-x;
}


This method means that the images are pulled from an exact starting point location. The root folder, and then work it's way inwards.

Your method starts from the current location and drops out 2 folders and then expects the images folder to exists there.

Absolute paths to images means you will NEVER lose your images again.

I hope this helps ;D