View Full Version : Standards Compliant Mode
azlatin2000
03-06-2004, 08:53 PM
I have a stylesheet which when i don't use a doctype works fine. But when i add a html transitional doctype and view the page in Mozilla it looks as if there was no style sheet. In Microsofts non standards compliant browser it works fine. I am really stumped cuz adding a doctype should do the opposite.
pascal
03-07-2004, 01:22 AM
Do you use an external or an internal style sheet?
azlatin2000
03-07-2004, 05:32 AM
External
DCElliott
03-07-2004, 08:28 AM
A link or some posted code would be helpful - at least from your <DOCTYPE ... through to the <body> tag and maybe a bit of your stylesheet as well.
DE
azlatin2000
03-07-2004, 10:01 AM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML>
<HEAD>
<TITLE>.: Title :.</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<LINK REL="STYLESHEET" TYPE="TEXT/CSS" HREF="ECT/STYLE.CSS">
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" SRC="ECT/SCRIPTS.JS" DEFER></SCRIPT>
<LINK REL="Shortcut Icon" HREF="favicon.ico">
</HEAD>
<BODY>
I can't give a link because the site is currently being hosted on the person who i am making this site for computer so its not on most of the time.
Begining of stylesheet code:
BODY {
BACKGROUND:BLUE;
COLOR:BLACK;
}
.CONTENTBODY {
BACKGROUND:WHITE;
VERTICAL-ALIGN:TOP;
WIDTH:92%;
BORDER:1PX SOLID BLACK;
}
.HEADER {
FONT-SIZE:1.5EM;
FONT-WEIGHT:BOLD;
FONT-FAMILY:"Comic Sans MS";
}
.TEXT1 {
FONT-SIZE:10PT;
FONT-FAMILY:"Comic Sans MS";
}
The site is only like 90% done so far anyway and it works fine if i leave the doctype out.
DCElliott
03-07-2004, 01:07 PM
OK - how do you refer to your classes in your document because classes are supposed to be case sensitive. You can read a bit about how IE handles CSS depending on whether it is running stndards compliant mode or not. [ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnie60/html/cssenhancements.asp ]. I'd change to 4.0 strict and see if the same problem occurs in IE as well.
DE
azlatin2000
03-09-2004, 07:01 PM
It didn't work but i don't care because it looks the same in all browsers.
I know have yet another problem, how do you get rid of the br that automatically goes when you insert a form tag?
like if i have:
ASD<FORM>asd
it will end up looking like:
ASD
ASD
I read somewhere how to do it before using css but i forgot and i can't find it again.
azlatin2000
04-11-2004, 02:25 PM
After thinking of looking in Mozilla's Javascript Console i found out that it didn't work because i named the stylesheet STYLE.CSS instead of STYLE.css and the server didn't recognize the uppercase extention and sent text/plain instead of text/css as the header.
pascal
04-12-2004, 04:00 AM
Azlatin, I have a question.
What is the empty DEFER attribute in the SCRIPT element?????
Originally posted by azlatin2000
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" SRC="ECT/SCRIPTS.JS" DEFER></SCRIPT>
I have never seen that before.
Please, tell me.
Pascal
azlatin2000
04-12-2004, 11:45 AM
I read that it doesn't load the script until all the html code is loaded but it didn't seem to do anything so i removed it.
vBulletin® v3.7.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.