LOGIN
Reg&iuacute;strateLinksForosPrivadosPrivadosContacta
 
FOROS > English forum
[1] 2 >    Html 4.01 strict doctype ignores external style sheets
30/08/2004    11:24


Registrado: 14/04/2004
Nº mensajes: 425

  Moriarty QuotePrivado  
 
I'm using the following doctype on my html document:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

and I have three external style sheets links on the same document.
I'm not using any deprecated element.
Anyway, it looks ok in IE, but Netscape 7.1 ignores the external style sheets. I've been to some forums and I've read the same problem, but not a solution to it... any ideas, please?
 
 

"Naruhito saludiiiiito... ni rastro de Hannoooover"



 
30/08/2004    12:13


Registrado: 14/04/2004
Nº mensajes: 491

  Living QuotePrivado  
 
¿Have you tried to put this declaration in the head section?

<meta http-equiv="Content-Style-Type" content="text/css">

Just Do It!
 
 

El mayor placer de un hombre inteligente es aparentar ser idiota, delante de un idiota que aparenta ser inteligente.



 
30/08/2004    12:23


Registrado: 14/04/2004
Nº mensajes: 425

  Moriarty QuotePrivado  
 

Thanks, Living, I just tried it but it doesn't work. I've tried with html 4.01 transitional too, and I've just converted my html document to xhtml and put this on top

<?xml version="1.0" encoding="iso-8859-1" ?>

<!DOCTYPE html
   PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >


<html xmlns="http://www.w3.org/1999/xhtml" >

But the external css still doesn't work on netscape 7.1. I don't know if it works in other browsers, I just have Netscape 7.1 and IE 6.0 

GRRRRRRR.... what's happening?? I'm doing something wrong for sure, but I don't know what!

 
 

"Naruhito saludiiiiito... ni rastro de Hannoooover"



 
30/08/2004    12:31


Registrado: 14/04/2004
Nº mensajes: 491

  Living QuotePrivado  
 
I have read that the origin of the problem is the MIME type configuration of the web server. But if you use html 4.01 transitional it should work in any browser.

You can read more in this page

http://devedge.netscape.com/viewsource/2002/incorrect-mime-types/
 
 

El mayor placer de un hombre inteligente es aparentar ser idiota, delante de un idiota que aparenta ser inteligente.



 
30/08/2004    12:38


Registrado: 14/04/2004
Nº mensajes: 491

  Living QuotePrivado  
 
Try to put the complete path in the href, not the relative path. Example:

<link href="http://servidor/paginas/css/estilos.css" rel="stylesheet" type="text/css" />
 
 

El mayor placer de un hombre inteligente es aparentar ser idiota, delante de un idiota que aparenta ser inteligente.



 
30/08/2004    12:57


Registrado: 14/04/2004
Nº mensajes: 425

  Moriarty QuotePrivado  
 

yes, maybe it's some problem with the server, since I'm checking the document with a validator http://validator.w3.org/ and it says that I have a valid XHTML 1.0 transitional.
But what it keeps telling me is the following:

"The HTTP Content-Type header sent by your web browser (unknown) did not contain a "charset" parameter, but the Content-Type was one of the XML text/* sub-types (text/xml). The relevant specification (RFC 3023) specifies a strong default of "us-ascii" for such documents so we will use this value regardless of any encoding you may have indicated elsewhere. If you would like to use a different encoding, you should arrange to have your browser send this new encoding information."

I've tried every combination that I can think of, but since I'm not an expert, I don't know if I'm doing it correctly.. I've tried the following:

1) <?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml" lang="sp">


2) <?xml version="1.0">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml" lang="sp">
  <head >
   <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />


and many other combinations, but since I don't really understand what I'm doing, It must be wrong!
If you see the code of these web pages, you'll see all of them are different:

http://validator.w3.org/check
http://home.worldonline.es/jlgranad/xhtml/xhtml1.htm
http://www.w3.org/International/O-charset.html

Which one to choose? I just want xhtml 1.0 to a Spanish written web page.. that's all.. buaahhhhh

 
 

"Naruhito saludiiiiito... ni rastro de Hannoooover"



 
30/08/2004    13:01


Registrado: 14/04/2004
Nº mensajes: 425

  Moriarty QuotePrivado  
 
and by the way, thanks for your help, Living

And yes, I am already using complete paths to the external css
 
 

"Naruhito saludiiiiito... ni rastro de Hannoooover"



 
30/08/2004    13:09


Registrado: 14/04/2004
Nº mensajes: 425

  Moriarty QuotePrivado  
 
If I take out the DOCTYPE external css work, but I need the DOCTYPE
 
 

"Naruhito saludiiiiito... ni rastro de Hannoooover"



 
30/08/2004    13:20


Registrado: 14/04/2004
Nº mensajes: 491

  Living QuotePrivado  
 
Try to put the css file in the same folder that contains your html page and don't put any folder in the link href:

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

El mayor placer de un hombre inteligente es aparentar ser idiota, delante de un idiota que aparenta ser inteligente.



 
30/08/2004    13:41


Registrado: 14/04/2004
Nº mensajes: 425

  Moriarty QuotePrivado  
 
I did as you said and it keeps displaying the document without css  8(
It must be the server

But at least finally the charset parameter was readed by the validator. I made it this way:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

Anyway.. why did I write "sp" in the first place instead of "es"? I copied it from a page that worked.. I'm just completely lost!
 
 

"Naruhito saludiiiiito... ni rastro de Hannoooover"



 
30/08/2004    13:53


Registrado: 14/04/2004
Nº mensajes: 491

  Living QuotePrivado  
 
For knowing if the problem is in the server you can test it out of the server. Copy your file.html and style.css to your desktop . Be sure that your href link hasn't got any folder when you test it, directly put the name of the css file.

If it works then the problem is in the web server.


p.d: Why are you asking this question in the english section?
 
 

El mayor placer de un hombre inteligente es aparentar ser idiota, delante de un idiota que aparenta ser inteligente.



 
       [1] 2 >