Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > External CSS problem

Reply
Thread Tools

External CSS problem

 
 
Thibault
Guest
Posts: n/a
 
      12-31-2003

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


 
Reply With Quote
 
 
 
 
Michael Wilcox
Guest
Posts: n/a
 
      12-31-2003
Thibault <(E-Mail Removed)> wrote:
> Any idea of what is the problem ?


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.
--
Michael Wilcox
mjwilco at yahoo dot com
Essential Tools for the Web Developer - http://mikewilcox.t35.com


 
Reply With Quote
 
 
 
 
Thibault
Guest
Posts: n/a
 
      12-31-2003

"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.


 
Reply With Quote
 
Leif K-Brooks
Guest
Posts: n/a
 
      12-31-2003
Thibault wrote:
> 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.

 
Reply With Quote
 
Andrew Glasgow
Guest
Posts: n/a
 
      12-31-2003
In article <bsuv4e$qdr$(E-Mail Removed)>,
"Thibault" <(E-Mail Removed)> wrote:

> 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 <style><!-- //--></style>.

> 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.

--
| Andrew Glasgow <amg39(at)cornell.edu> |
| "The ordinary telegraph is like a very long cat. You pull the tail in New |
| York, and it meows in Los Angeles. The wireless is the same, only without |
| the cat." -- Albert Einstein |
 
Reply With Quote
 
Thibault
Guest
Posts: n/a
 
      12-31-2003

"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.


 
Reply With Quote
 
Thibault
Guest
Posts: n/a
 
      12-31-2003

"Andrew Glasgow" a écrit dans le message news:

> 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.


 
Reply With Quote
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      12-31-2003
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.

--
-bts
-This space intentionally left blank.
 
Reply With Quote
 
rf
Guest
Posts: n/a
 
      12-31-2003

"Thibault" <(E-Mail Removed)> wrote in message
news:bsuv4e$qdr$(E-Mail Removed)...
>
> 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.


<snip>

>
> 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.


 
Reply With Quote
 
Toby A Inkster
Guest
Posts: n/a
 
      12-31-2003
Thibault wrote:

> <LINK rel="stylesheet" type="text/css" href="style3.css">


Are the HTML file and the CSS file in the same directory?

If so... URL?

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?page=132

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create references to external scipt files from within an external script file Mellow Crow Javascript 6 11-04-2005 01:16 PM
Re: Problem with using external css by control ID Eliyahu Goldin ASP .Net 1 06-10-2005 02:24 PM
unresolved external symbol/using an external dll Scott Allen C++ 8 05-02-2004 06:11 PM
View External CSS and .js on Client Side Guadala Harry ASP .Net 3 02-13-2004 01:54 PM
css in external stylesheets for aspx pages Rod Snyder ASP .Net 3 02-02-2004 04:01 PM



Advertisments