External Style Sheets - Post ID 170063

User 187934 Photo


Senior Advisor
20,266 posts

Try this.
<link rel="stylesheet" type="text/css" href="basic.css" />

I didn't catch you typing they were both in the same folder.:)

If the style sheet is in the folder called css that's inside the folder named test then change it to this.
<link rel="stylesheet" type="text/css" href="css/basic.css" />

I'm assuming your page your linking from is also inside the folder test.:)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2040390 Photo


Registered User
95 posts

I have exactly the same problem with this difference.

A year ago, I downloaded a three-column html template from Stu Nichols' cssplay.co.uk. The style was embedded in his html page. I took it out to create "stu.css" and then replaced it with the reference <link rel="stylesheet" type="text/css" href="css/stu.css" media="screen" /> It WORKED LIKE A CHARM and continues to work on my website "pinacate.org" Check it out, all the pages use it.

Today, I went back to the original downloaded template to try some new things. When the style remains embedded (page loaded, tried), it works. When the style is put into a separate css file with the proper references, IT FAILS. I have copied code from a functioning html page into Stu's previously functioning html page and IT FAILS in my install of CoffeeCup! The html file from which I copied it WORKS in the selfsame CoffeeCup.

stu.css and stu1.css are nearly identical files with no <style> tags. Stu1 (attached) contains the style elements removed from the downloaded Stu three 2 fix R.html. Style-free Stu three clean R.html is also attached.

This makes no damned sense to me.
User 187934 Photo


Senior Advisor
20,266 posts

You forgot to attach. A link to the page having the problem would probably be a better solution to help you.:)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 445977 Photo


Registered User
81 posts

Jack,

Spelling is of course crucial, but the "Case" is absolutely crucial.
Incorrect and all is ignored.

This is one of my external css links. I usually keep my css in root directory.
<link href="stylemain.css" rel="stylesheet" type="text/css" >


Your original link reads
<link rel="stylesheet" type="text/css" href="css/basic.css" />

Try this out. move your css file to root directory first.
<link href="basic.css" rel="stylesheet" type="text/css" >

FWIW dont expect this to work.

I an neophyte compared to many of you folks, but do think this might work for you.
Leave the new link edit in place and replace your existing css file with this.

body {
background: #CCFFFF;
font-family: Arial, Courier New, Sans-serif;
font-weight: 600;
font-style: normal;
text-indent: 10px;
line-height: 18px; text-align: left; }
H1 { color: #0000FF;
font-family: Georgia; }
H2 { color: #FF0000;
font-family: Georgia; }
#content { background: #993366; }
.p { margin-left: 10px; margin-right: 10px; margin-width: 80%; }

This comment not part of the css file.
Am rusty at all the css syntax, but thing this should be OK.
I have to re-format for troubleshooting reasons into this type of format.
Purely a personal choice.
I also use a non CC edit program called NotePad++ excellent free, safe software.
Hope I'm not barred from the club for that comment.

Good luck,

Frank

"Our Home is Over the next Hill" Johnny Cash
User 122279 Photo


Senior Advisor
14,624 posts
Online Now

Jack,

Remove the html comment delimiters from your css sheet and replace them by css delimiters.

Don't use <!-- this style -->

use /* this instead */

Another thing: the <p> is a named tag and does not require the class dot in front of it.

It doesn't matter whether the css file is in the root or in a css subfolder as long as the linking is correct.

Also, the sequence here:

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

Is completely irrelevant.
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 2276240 Photo


Registered User
194 posts

Thanks everyone. I got it working and I have uploaded the site on S-Drive and all is well (well almost). It has been about 6 years since I did any web design work and not thinking I keep my monitor 1440x900 and that is what my page is set at. Tomorrow I will go back play around with the settings to get it to look better on a smaller resolution.
User 2040390 Photo


Registered User
95 posts

My CSS problem devolved to lack of care on my part and I was able to fix it myself. My account disappeared Friday night for some reason and I am just getting back to thank you all.
User 122279 Photo


Senior Advisor
14,624 posts
Online Now

Glad you were able to fix the problem. :)
Ha en riktig god dag!
Inger, Norway

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



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.