Editor not using my CSS files -...

User 1948478 Photo


Senior Advisor
1,850 posts

Nigel Thomas wrote:
Everything reside in web which contains
web
image
html
css

all files are in the appropriate directories
Editor is latest version 14.723

"...Everything reside in web which contains
web
image
html
css..."

hmmm...

Could you post a screenshot of the file structure showing that the /CSS directory and your page(s) really are at the same directory level?
In all the years I've been using the CC Editor, I've never encountered anything like the problem you're describing.
I still suspect there must be something else 'funny' with your file structure.
User 603315 Photo


Registered User
938 posts

Ok this first one should look like this Nigel, I've got my folder "GS" which is inside "My Websites" like this
http://farm8.staticflickr.com/7344/12310107484_6303655597_z.jpg
First by TheNBman Can't see photos because Win8 Sucks Bigti, on Flickr

The second is when you open the "GS" folder up and the HTML and the CSS are in there. If your doing that and your still having difficulties and your linking them exactly in your HTML page, I would have a word with CC, I'm sure they will be able to sort you out.
http://farm3.staticflickr.com/2807/12309828633_a813e3dd79.jpg
Second by TheNBman Can't see photos because Win8 Sucks Bigti, on Flickr
User 772771 Photo


Registered User
15 posts

Ok, can't paste screen shots here, only attach a file, not much use so. here is my file structure

c:\myvbcode\v7winv2\package\web which contains index.html and favicon.ico and 3 folders image,html and css

all my html file are in html
all my image files are in image
all my css files are in css.

I am wondering, does all this stuff have to be in the Coffee Cup Software\My Website folder??
User 772771 Photo


Registered User
15 posts

in my html file I am linking to images and css files like this
<link rel="stylesheet" href="/css/main.css" type="text/css"/> <<does not work
<link rel="stylesheet" href="../css/main.css" type="text/css"/> <<does not work
<link rel="stylesheet" href="../css/main.css" type="text/css"/> <<does work (NOTE ../)
<link rel="stylesheet" href="c:/myvbcode/v7winv2/package/web/css/main.css" type="text/css"/> <<does work (NOTE fully qualified path)

I tried moving all files to Coffee Cup Software\My Website but still no luck
User 2147626 Photo


Ambassador
2,958 posts

This would be much easier, I'm pretty sure, if you would publish this site to either a 'test' directory or to your S-Drive account and let us take a look at it. There are many coders here that can look at the actual site and should be able to tell you what is wrong. I think right now everyone is still just guessing at what you have. Publish and post a link if you can. :cool:
Graphics for the web, email, blogs and more!
-------------------------------------
https://sadduck.com
User 772771 Photo


Registered User
15 posts

OK, some more digging

If my html, css, image files are all in the same directory, it works. If they go into their own directories, it does not work.

Putting all the files in one directory is an mess
User 772771 Photo


Registered User
15 posts

S-Drive will not allow me to upload my directory structure, just the files
User 772771 Photo


Registered User
15 posts

OK, here is my directory structure, all filed, html, css and images are in their appropriate directories...
Attachments:
User 2484360 Photo


Registered User
3,293 posts

Nigel Thomas wrote:
in my html file I am linking to images and css files like this
<link rel="stylesheet" href="/css/main.css" type="text/css"/> <<does not work
<link rel="stylesheet" href="../css/main.css" type="text/css"/> <<does not work
<link rel="stylesheet" href="../css/main.css" type="text/css"/> <<does work (NOTE ../)
<link rel="stylesheet" href="c:/myvbcode/v7winv2/package/web/css/main.css" type="text/css"/> <<does work (NOTE fully qualified path)

I tried moving all files to Coffee Cup Software\My Website but still no luck


../css/main.css" type="text/css is the correct link to use for a CSS file that is inside of a folder. /css/main.css means the file is in the root directory.

the ../ denotes the file is inside of a folder in the root directory.

c:/myvbcode/v7winv2/package/web/css/main.css" type="text/css"/ will work only on your computer once uploaded this will not work. :P

In short use the ../css/main.css. :)
User 772771 Photo


Registered User
15 posts

Adam (and everyone else)

Thanks, I had not got my head around relative file locations - my mistake

Thanks for all the help and sorry to waste everyone's time, but at least I learnt something

Nigel
From a wet and windy UK

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.