Background image path [resolved]

TopStyle has been discontinued and support is no longer available. The forum is read-only. NOTE: TopStyle was not developed by the makers of CSS HTML Validator.
Locked
wbear
Rank 0 - Newcomer
Posts: 3
Joined: Sat Jul 09, 2011 11:53 am

Background image path [resolved]

Post by wbear »

Using the latest Topstyle (4.0.0.88) 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.
Last edited by wbear on Sun Jul 10, 2011 6:38 am, edited 1 time in total.
User avatar
TopStyle Support
Rank VI - Professional
Posts: 506
Joined: Sat Jun 13, 2009 12:38 pm
Contact:

Re: Background image path

Post 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?
wbear
Rank 0 - Newcomer
Posts: 3
Joined: Sat Jul 09, 2011 11:53 am

Re: Background image path

Post 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?
wbear
Rank 0 - Newcomer
Posts: 3
Joined: Sat Jul 09, 2011 11:53 am

Re: Background image path

Post 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!
Locked