External CSS problem

T

Thibault

Hey all,

I'm beginning with CSS documents, and I have encountered a big problem. Here
it is : I have created an html page that calls a css document located in the
same directory, and have tested it on my Win98 computer with Opera 7,
Mozilla, Netscape Navigator and Internet Explorer 6. All works fine. Then I
went on my page with a WinXP computer, IE 6 (same version as above) : the
css document is not called. I tried to surf on the same page on the same
computer with Netscape Navigator : it works (so it's not a problem of font -
I just want Verdana). I tried on a third computer, with Windows 2000 and IE
5 : it works. I have verified the code with Dreamweaver, there is no major
bug. So what is wrong with the second computer ? Here is my CSS document :

<style type="text/css">
<!--
body {background-color: #000000; margin-top: 0; margin-left: 0;
margin-right: 0; marginheight: 0; marginwidth: 0; margin-bottom: 0; text:
#FFFF00; color: #FFFF00;}

a:link {color: #FFCC00}
a:visited {color: #FFCC00}
a:active {color: #FF3366}

..Style1 {
color: #FFFF00
font-family: Verdana, Arial;
font-size: 10pt;
}
..Style2 {
color: #FF0000;
font-weight: bold;
}
..Style3 {font-size: 7pt}
..Style4 {font-size: 8pt}
//-->
</style>

I have tried to remove <style> and </style>, but nothing happened. I'm
really upset.
I'm calling it with this line :
<LINK rel="stylesheet" type="text/css" href="style3.css">

Any idea of what is the problem ?

Thanks !

Thibault - France
 
T

Thibault

"Michael Wilcox" a écrit dans le message news:
There's many errors in your css, including some missing semicolons and
invalid properties. Run it through http://www.htmlhelp.com/tools/csscheck/
to identify all the errors, fix them, then try your code again.

I have made all the corrections suggested by this url, but it still doesn't
seem to change anything. I have even changed the "16pt" to "16", according
to what it suggested, and then it still gave me an error on this point,
saying that a unit identifier is required. Now I'm really, really upset.
 
L

Leif K-Brooks

Thibault said:
I have even changed the "16pt" to "16", according to what it suggested,
and then it still gave me an error on this point, saying that a unit
identifier is required. Now I'm really, really upset.

I haven't tried that CSS linter, but I really doubt it told you to make
your CSS invalid. I'm guessing it told you to use some other unit (maybe
em) instead of pt and you misunderstood.
 
A

Andrew Glasgow

Thibault said:
Hey all,

I'm beginning with CSS documents, and I have encountered a big problem. Here
it is : I have created an html page that calls a css document located in the
same directory, and have tested it on my Win98 computer with Opera 7,
Mozilla, Netscape Navigator and Internet Explorer 6. All works fine. Then I
went on my page with a WinXP computer, IE 6 (same version as above) : the
css document is not called. I tried to surf on the same page on the same
computer with Netscape Navigator : it works (so it's not a problem of font -
I just want Verdana). I tried on a third computer, with Windows 2000 and IE
5 : it works. I have verified the code with Dreamweaver, there is no major
bug. So what is wrong with the second computer ? Here is my CSS document :

<style type="text/css">
<!--

For starters you do not need to have the trappings of HTML in your .css
file. Get rid of the said:
body {background-color: #000000; margin-top: 0; margin-left: 0;
margin-right: 0; marginheight: 0; marginwidth: 0; margin-bottom: 0; text:
#FFFF00; color: #FFFF00;}

a:link {color: #FFCC00}
a:visited {color: #FFCC00}
a:active {color: #FF3366}

.Style1 {
color: #FFFF00

missed a semi-colon (;) here.
font-family: Verdana, Arial;
font-size: 10pt;
}
.Style2 {
color: #FF0000;
font-weight: bold;
}
.Style3 {font-size: 7pt}
.Style4 {font-size: 8pt}
//-->
</style>

I have tried to remove <style> and </style>, but nothing happened. I'm
really upset.
I'm calling it with this line :
<LINK rel="stylesheet" type="text/css" href="style3.css">

Any idea of what is the problem ?

Thanks !

Thibault - France

Make the changes I suggest and try again. I wouldn't be surprised if the
HTML-ish dead-chicken-waving you're doing there (throwing a <style> HTML
element into a .css file reveals a basic lack of understanding as to
what HTML and what CSS are and how they interrelate) confused your
browsers.
 
T

Thibault

"Leif K-Brooks" a écrit dans le message news:
I haven't tried that CSS linter, but I really doubt it told you to make
your CSS invalid. I'm guessing it told you to use some other unit (maybe
em) instead of pt and you misunderstood.

Yes, I think it was that. I have corrected this little error. But no change
on the XP computer. I'm starting to think there is a misconfiguration on it,
but what can prevent a CSS to be called ? If it were a javascript or
something like this, it could be a problem with the firewall, but it's not a
javascript. Actually, I have even turned down the firewall (Zone Alarm) and
Norton antivirus, but nothing changed. That's why I'm really upset.
 
T

Thibault

"Andrew Glasgow" a écrit dans le message
Make the changes I suggest and try again.

Unfortunately, there's no improvement.

I wouldn't be surprised if the
HTML-ish dead-chicken-waving you're doing there (throwing a <style> HTML
element into a .css file reveals a basic lack of understanding as to
what HTML and what CSS are and how they interrelate) confused your
browsers.

In facts, my basic CSS had no HTML elements. I read this suggestion on a
website, and as I had nothing to loose, I tried. Nevertheless, you pointed
it out : I'm a beginner. That's why I'm here. Not to get negative judgements
; only to get help.
 
B

Beauregard T. Shagnasty

Quoth the raven named Thibault:
In facts, my basic CSS had no HTML elements. I read this suggestion
on a website, and as I had nothing to loose, I tried. Nevertheless,
you pointed it out :

Hey, Thibault! Happy New Year, and welcome to Usenet! <g>

Could you give us the URL to your page? If we see it live, someone
could probably find the reason in a minute or so. Probably something
really simple like a colon instead of a semi-color or similar.
I'm a beginner. That's why I'm here. Not to
get negative judgements ; only to get help.

...and after you've learned, to give help. :)
 
R

rf

Thibault said:
Hey all,

I'm beginning with CSS documents, and I have encountered a big problem
<style type="text/css">

This does not belong in a CSS file. Get rid of it.

Also get rid of these cargo cult comments.


I have tried to remove <style> and </style>, but nothing happened. I'm
really upset.
I'm calling it with this line :
<LINK rel="stylesheet" type="text/css" href="style3.css">

Any idea of what is the problem ?

Clear your cache?

Cheers
Richard.
 
T

Thibault

I have done all the suggestions you gave me and have cleared the cache,
there's no change. Weird, uh ?
 
D

David Dorward

Thibault said:

Your HTML is loaded with syntax errors. <http://validator.w3.org/>

As is your CSS. <http://jigsaw.w3.org/css-validator/validator-uri.html>

The style sheet also has some nasty constructs.
<http://css-discuss.incutio.com/?page=UsingPixels>
<http://www.xs4all.nl/~sbpoley/webmatters/verdana.html>. Also "Style1",
"Style2", "Style3" aren't very helpful - try using class names that tell
you about the content (e.g. .footer or .menu) - it makes it a lot easier to
maintain.
 
K

kchayka

Thibault said:
Mozilla, Netscape Navigator and Internet Explorer 6. All works fine. Then I
went on my page with a WinXP computer, IE 6 (same version as above) : the
css document is not called.

In IE, Tools -> Internet Options -> Accessibility

uncheck all the boxes
 
T

Thibault

Your HTML is loaded with syntax errors. <http://validator.w3.org/>

As is your CSS. <http://jigsaw.w3.org/css-validator/validator-uri.html>

Ok, I think we all agree to say my page is full of errors. Actually, they
are not errors, but valid, useful references for Opera 7. For instance,
marginheight & marginwidth, that the validators are not able to recognize,
are needed in Opera. Remove them and watch the result. Unfortunately, it
seems that the only browser the w3c cares about is Internet Explorer.
Nevertheless, the point is not here. I'm grateful for the urls you gave me,
they helped me to enhance my code. But what I want to know now is why my
page doesn't display correctly on a second computer which is, apparently,
correctly configured. That, is the point.
 
S

Steve Pugh

Thibault said:
Ok, I think we all agree to say my page is full of errors. Actually, they
are not errors, but valid, useful references for Opera 7.

Unlikely, Opera 7 has very good support for CSS standards.
For instance,
marginheight & marginwidth, that the validators are not able to recognize,
are needed in Opera. Remove them and watch the result.

Opera has default padding on body, IE has default margin.
Add padding: 0; to the styles for body and you won't need those old
hacks any more (which Opera only supports for compatability with old
pages that were written with Netscape 4 in mind).
Unfortunately, it
seems that the only browser the w3c cares about is Internet Explorer.

LOL. The W3C validators don't care about _any_ browsers, all they do
is check the code against the published standards. IE meets those
standards to a lesser extent than modern browsers.
Nevertheless, the point is not here. I'm grateful for the urls you gave me,
they helped me to enhance my code. But what I want to know now is why my
page doesn't display correctly on a second computer which is, apparently,
correctly configured. That, is the point.

IE6 WinXP, the CSS is applied. Most likely something wrong with the
setup of that one machine. Are other stylesheets applied correctly?

Steve
 
B

biggo

This is not a css property.
The {color: #000000;} property will define the color of your text in thie
body element.
 
A

Andrew Glasgow

Thibault said:
"Andrew Glasgow" a écrit dans le message

Unfortunately, there's no improvement.

What's the set up here? local HTML page, local .CSS file (in text
format, right?) being loaded by your browser from the HDD?

Are you able to get any CSS to load at all? Try a basic page and a basic
CSS file?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top