Page 1 of 1

CSS problems with FireFox

Posted: Wed Mar 15, 2006 6:14 am
by mjseaden
Hi,

I have a normal, non-special CSS file which I include in my HTML file using the usual <link rel=...> method in the <head></head> tags. It works on IE (as do most things), however on FireFox it doesn't seem to pick up the CSS at all. I'm not sure why. Any ideas?

Many thanks

Mark

Posted: Wed Mar 15, 2006 6:26 am
by matthijs
You should post this in the client side forum.

And about your question:

Code: Select all

<!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">
<head>

  <title>MyTitle</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

  <link rel="stylesheet" type="text/css" media="screen" href="css/screen.css"/>
</head>

<body>
..
works in all modern browsers.

Posted: Wed Mar 15, 2006 6:32 am
by mjseaden
what's wrong with this

Code: Select all

<style type="text/css">
	body
	{
		background-color:#ffffff;
	}
	
	table
	{
	    border: 0px;
	    border-collapse: collapse;
	    cell-spacing:0px;
	    padding: 0px;
	    margin:0px;
	}
	
	form
	{
		border:0px;
		padding:0px;
		margin:0px;
	}
	
	input
	{
		font-size:9pt;
	}

	select
	{
		font-size:9pt;
	}
	
	table.wrksp
	{
		vertical-align:top;
	}
	
	table.menu
	{
		border:0px;
		border-collapse: collapse;
		cell-spacing:0px;
		padding: 0px;
		margin:0px;
		width:100%;
	}
	
	td.ds
	{
		background-color:#ddddff;
		border-right: 2px solid #bbbbbb;
		padding-right:2px;
		margin: 0px;
	}
	
	td.ls
	{
	    background-color:#eeeeff;
	   	border-right: 2px solid #bbbbbb;
	    border: 0px;
	    padding-right:2px;
	    margin: 0px;
	}
	
	td.header
	{
		background-color:#ffffff;
		border-bottom: 1px solid #1f78cd;
		border-spacing:0px;
		margin:0px;
		padding:3px;
		width:100%;
		height:50px;
		vertical-align:middle;
	}

	td.headerlogo
	{
		background-color:#ffffff;
		border-bottom: 1px solid #1f78cd;
		border-spacing:0px
		margin:0px;
		padding:3px;
		width:120px;
		height:50px;
		vertical-align:middle;
	}
	
	td.wrkspmenu
	{
		padding-top:20px;
		padding-right:30px;
		padding-left:15px;
	    background-color:#ffffff;
	    height:100%;
	    width:30%;
	    vertical-align:top;
	}
	
	td.wrkspdisplay
	{
		height:100%;
		width:70%;
		padding-top:35px;
	}
	
	td.wrksptitle
	{
		background-color:#1f78cd;
		height:15px;
		width:200px;
	}
	
	td.wrkspbutton
	{
		background-color:#ddddff;
		height:15px;
		border:1px solid #1f78cd;
		width:200px;
	}
	
	td.tabletitle
	{
		background-color:#1f78cd;
		height:30px;
	}
	
	a.wrkspbutton
	{
		font-family: sans-serif;
		color: #000000;
		font-size:9pt;
		text-decoration:none;
	}
	
	a.wrkspbutton:hover
	{
		font-family: sans-serif;
		font-weight: bold;
		color: #ff0000;
		font-size:9pt;
		text-decoration:none;
	}
	
	font
	{
		font-family: sans-serif;
		color: #000000;
		font-size:9pt;
	}
	
	font.large
	{
		font-family: sans-serif;
		font-weight: bold;
		color: #000000;
		font-size:12pt;
	}

	font.wrksptitle
	{
		font-family: tahoma,sans-serif,arial;
	    font-size:9pt;
	    font-style:bold;
	    color:#ffffff;
	}

	font.wrkspbutton
	{
		font-family: tahoma,sans-serif,arial;
	    font-size:9pt;
	    color:#000000;
	}
	
	font.tabletitle
	{
		font-family: tahoma,sans-serif,arial;
		font-size:9pt;
		color:#ffffff;
		font-weight:bold;
	}
	
	input.norm
	{
		font-size:9pt;
	}

</style>
This is prs.css which is included via the <link rel..> method. It doesn't seem to work on FireFox, but works fine on IE.

Many thanks

Mark

Re: CSS problems with FireFox

Posted: Wed Mar 15, 2006 6:54 am
by Roja
mjseaden wrote:Hi,

I have a normal, non-special CSS file which I include in my HTML file using the usual <link rel=...> method in the <head></head> tags. It works on IE (as do most things), however on FireFox it doesn't seem to pick up the CSS at all. I'm not sure why. Any ideas?

Many thanks

Mark
Share the html code that doesn't work.

Posted: Wed Mar 15, 2006 7:28 am
by matthijs
Get rid of the

Code: Select all

<style type="text/css"> </style>
in the stylesheet. You don't need those when you link to it.

Posted: Wed Mar 15, 2006 7:44 am
by John Cartwright
Moved to Client-Side.

Posted: Wed Mar 15, 2006 8:18 am
by mjseaden
The <head> tags are not showing in "View->Page Source", but they are in IE visible, but with no <html> tag at the beginning. I'm sending these HTML headers:

Code: Select all

HTTP/1.0 200 OK
Content-type: text/html"
Followed by the <html> opening tag, which as just mentioned is not showing in either IE or FireFox.

However, the code for the page I am currently typing into is showing. The question is, what's causing the specific problem here? The fact that I'm doing direct CGI stdout sending of HTML headers and HTML code (I'm programming in Visual C++/MFC and running through CGI) might be something to do with it....

Posted: Wed Mar 15, 2006 8:29 am
by feyd
the content-type should be text/css and it shouldn't have those html tags..

Posted: Wed Mar 15, 2006 8:33 am
by mjseaden
Got it...I didn't have a blank line between my HTTP headers and the <html> tag, which for some reason caused IE to ignore the html tag but do it anyway, and for FireFox to completely ignore the <html><head></head> tags.

Posted: Wed Mar 15, 2006 8:58 am
by matthijs
Mark, would you like to post your code next time or explain the problem some more? That would have saved me some time trying to help you. Thanks.