tags:

views:

17

answers:

1

hi just successfully imported a db from a real website to my local website. the problem is, the localhost/mysite doesn't display the template. i'm thinking it might be a problem of the URL while importing. The settings in the configuration are also correct. Now in my CSS if i want to point it locally, is this correct: or do I have to eliminate the C:/ ? Appreciate for your help

.product  #header {
    background: url('c:/xampp/htdocs/mysite/assets/templates/mysite/css/images/header_.jpg') no-repeat left;
}

Is this the correct way to write the path locally? Thanks

+1  A: 

Ideally any paths to images should be relative, so that when moved the site will still work correctly.

You should be using something like

.product  #header {
background: url('/assets/templates/mysite/css/images/header_.jpg') no-repeat left;}

I don't think you can even reference a file the way you are doing. Maybe if you had url('file://C:....') but I can't see a good reason for it.

Fishcake
it's local so maybe i can do then as what you have suggested: file://C
tintincute
@tintincute - if the image is a path relative to the css file, it doesn't matter if it is on the server or local. i.e. if you have style.css in your root directory and it points to an image in subfolder "images" using url('images/image.png') that will work locally and online.
Sohnee