Page 1 of 1

Background image path [resolved]

Posted: Sat Jul 09, 2011 12:05 pm
by wbear
Using the latest Topstyle ( on Windows 7, if I go to insert a background image, it gets the addressing all wrong. Well, not exactly wrong, but it isn't relative to the folder where the style sheet lives. As an example, the site folder is xxx in this case:

Code: Select all

background-image: url(../../../../../Users/me/Documents/Dreamweaver/xxx/images/content-box_botrgt.jpg);
As you can see, it climbs up out of the folder the style sheet is in 5 directories, then back down the 5 to the images folder. I can't seem to find anywhere it would define this behavior, and it's rather puzzling. I've been using TS for many versions now, but this is the first time on Win7 (home). It looks like it needs the root defined, and when it isn't it goes to the computer's root and works it's way back from there.

Any thoughts on where to look for this and fix it would be appreciated.

Re: Background image path

Posted: Sun Jul 10, 2011 4:00 am
by TopStyle Support
I cannot seem to reproduce this. Here's what I did:

1) saved a CSS document to C:\Users\<username>\Documents\test.css
2) entered the following CSS rule:

body {
background-image: |

3) Press Ctrl+Space, click on: "Select Image"
4) Navigate to C:\Users\<username>\Documents\Images
5) Select an image, press "Open"

Result: TopStyle inserted the following:

body {
background-image: url(Images/MyImage.jpg);

Am I missing something?

Re: Background image path

Posted: Sun Jul 10, 2011 6:22 am
by wbear
Aside from the keyboard shortcut, about the same thing.
New declaration, hit background-image in the list that comes up after inserting the starting "{". Hit "choose image", navigate to it (one folder off from the style sheet's location), it chooses to insert the "climb up then down" path every time. Tried with a brand new style sheet, same result every time. Saving first, saving after entering info, no change.

Interesting. Tried with a different site, and it works as expected. Tried with a third site, also does the up and down thing.
What the heck? Are you using Windows 7 as well?

Re: Background image path

Posted: Sun Jul 10, 2011 6:34 am
by wbear
Had an epiphany, and looked at the settings in Dreamweaver for this site, since one worked and the other not. Windows 7 can reach a folder by two means:
  • C:\Users\xxx\Documents\ (which in Explorer is actually named "My Documents", not too confusing!) :roll:
  • C:\Documents and Settings\xxx\My Documents
This site definition was using the second one for some reason and having this issue (though I don't understand why it's using DW settings?). Changed to the former, it works as expected. Hooray for solutions!