what's the problem? - Post ID 189857

User 1948478 Photo


Senior Advisor
1,850 posts

Bill Watters wrote:
...
Here's what I got:
<link rel="stylesheet" type="text/css" href="/css/style.css-menu.css" media="screen">
<link rel="stylesheet" type="text/css" href="/css/menu-menu.css" media="screen">
...

Looks like you're still missing the double dots before the first slash, which will move you up one level from the html folder before going into the css folder. Your links would then start like this: "../css/style.css-menu.css"

Maybe you missed Inger's earlier post:
Inger wrote:
If you have the html files in one folder and the css in another, both folders on the same level, the path is
../css/styles.css
The '../' means out of one folder, and the 'css/' means into the other folder.
User 122279 Photo


Senior Advisor
14,624 posts

Bill Watters wrote:


<link rel="stylesheet" type="text/css" href="/css/style.css-menu.css" media="screen">
<link rel="stylesheet" type="text/css" href="/css/menu-menu.css" media="screen">

I put the forward slashes in close to the href tag to see if it made a difference.



That forward slash close to the href does indeed make a difference: It won't work!

Below is the syntax you have to use if your css file is in a folder on the same location as the html files. You can of course add media="screen" if you like.

<link rel="stylesheet" type="text/css" href="css/styles.css">

If your css file is in one folder, and your html files are in another, both folders in the same location, then it is:

<link rel="stylesheet" type="text/css" href="../css/styles.css"> Note the 2 dots before the slash.

I'm a bit in doubt about your file name style.css-menu.css, if it is a file name for just one file. Haven't checked this, but the . after 'style' might throw errors. I would avoid dots in the file name if I were you, only use them at the end before the file extension.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 122279 Photo


Senior Advisor
14,624 posts

Hi again,

I was not able to open your attached folders.JPG. I have attached a similar image showing the file structure of my 'fokai' folder. You see that the images folder is inside the fokai folder. Since this is a very small site, I didn't bother making a folder for just one css file, but if I had done that, it would also have been inside the fokai folder. And for such a file structure the first syntax line in my previous post should be used.
Attachments:
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 2495153 Photo


Registered User
14 posts

Hi Inger,

Thanks for your kind attention to my problem. I have taken note of all you have said.

The below code that I sent earlier was placed by the Coffee Cup's CSS Menu Designer so I thought it pukka stuff!

<link rel="stylesheet" type="text/css" href="/css/style.css-menu.css" media="screen">
<link rel="stylesheet" type="text/css" href="/css/menu-menu.css" media="screen">

In case it was the folder structure I striped out the CSS folder and created a new CSS page and saved it as style.css page; It wasn't saved in the html folder but in the main site folder 'Bill Watters Inc Web' but was linked as part of the tree.

Just to test your suggestion I copied and pasted the code:
<link rel="stylesheet" type="text/css" href="css/styles.css">

and coded the new styles.css page as:
/* Default CSS */
/* Generated by the CoffeeCup HTML Editor - www.coffeecup.com */

body {
background-color:#ffffd5;
}
h1, he, h3 {
color: #330000;
)
p {
color:#ffcc66;
}

But again nothing happened! The index.html seems OK and opens in Safari but is unaffected by the CSS styling. It's a challenge I must meet (with kind help of course)!

I attach a copy of my folders which I hope you can open (I will save it for web and devices at a low res)
Attachments:
Bill Watters
User 38401 Photo


Senior Advisor
10,951 posts

Bill I would highly suggest uploading your site to a test location so we can see it. It's very difficult to tell you exactly what might be wrong if we are unable to see how you've entered the code for things. There are lots of little reasons why something may work for some browsers and not another, so it's much easier to look at it and see how it's setup to find the issues :)

You don't have to keep it there forever, just till you find the problem then you can delete that test site :)
User 122279 Photo


Senior Advisor
14,624 posts

Bill, looking at folder structure in your most recent attachment, you seem to have done the exact opposite of what is the norm, and what I would recommend.

You have a folder billwattersinc web, inside it a css file and a folder html in which your pages are stored. And by the file name menu-menu.css I take it that you are using the built-in menu builder in the Editor, so you will then end up with folders named css, js and images inside the html folder too. Why not move the styles.css into the same folder as the other css files?

Abother thing is your web address when you get as far as uploading. On the server you will have to put your files and folders into a 'public_html' folder, sometimes also called a www folder. Some servers lets you having to enter manually into that folder, and some set it up so that you get directly into the correct folder, I don't know what your server does. But if your web address is say billwattersinc.co.uk, if you keep your files in a html folder, which you'll also have to upload, people who visit your site will have to write the address 'billwattersinc.co.uk/html' in order to see your site. Bit long, isn't it?

I'd strongly advise you to place your html files directly under BillWattersInc Web, then make a css folder inside the first folder for any css files. If you have problems and need more help to organise it, do feel free to zip up yoursite and send it to me at 'inger at coffeecuphelp dot com'
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 2287960 Photo


Ambassador
580 posts

Bill

This is getting somewhat complex - going back to your original post.

Folder names CSS is not the same as css.

What I would do is look at your original post and do following - Do not use CAPITAL letters.

1. Change name of IMAGES folder to images.
2. Take index.html and style.css and put them in root folder Bill Watters Inc Web
3. Delete folders CSS and HTML and contents.

Then with the code you have used should work. That is the code as in your original post.

Keith


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.