Turbo
(regular)
Thu Jan 20 2005 07:21 PM
CSS not working in Firefox

I started to learn CSS and thought i was getting good at it.
But when i open my site in firefox it doesn't work.
Here is an example site:
http://www.freewebs.com/swindontfc/uktrainers.htm

Please could you help, thankyou.




predator
(regular)
Thu Jan 20 2005 08:33 PM
Re: CSS not working in Firefox

I think there are errors in your css. Some browsers are more tolerant of bad css than others, so while one browser may accept some invalid css, others may ignore it.

Try using the validator at http://jigsaw.w3.org/css-validator/ to see where you are going wrong
http://www.predatorconservation.com


Turbo
(regular)
Thu Jan 20 2005 09:20 PM
Re: CSS not working in Firefox

Thankyou for the link predator, it was very helpful.
It says that these lines are wrong but i am totally mystified as to why though. Could anyone help me correct them please?

<style type="text/css">
table.1 {
background: #316599;
width: 770px;
height: 120px;
border: thin solid #DDDDDD 1px;
}
table.2 {
background: #ededed;
width: 200px;
height: 370px;
border: thin solid #DDDDDD 1px;
}
table.3 {
background: #FFFFFF;
width: 350px;
height: 370px;
border: thin solid #DDDDDD 1px;
margin: 5px;
}
</style>

Thankyou in advance


predator
(regular)
Fri Jan 21 2005 02:10 PM
Re: CSS not working in Firefox

ok I've fixed the problems you had so this should work - I tested it in netscape and IE so firefox should be ok with it too. I would make a few comments though.......

Try using the html validator at http://validator.w3.org/ as well as the css validator.
Get rid of the font tags and use css to replace them
Think about using css to position the various bits rather than using tables



<html><head><style type="text/css">
.table1 {
background: #316599;
width: 770px;
height: 120px;
border: thin solid #DDDDDD 1px;
}
#table2 {
background: #ededed;
width: 200px;
height: 370px;
border: thin solid #DDDDDD 1px;
}
#table3 {
background: #FFFFFF;
width: 350px;
height: 370px;
border: thin solid #DDDDDD 1px;
margin: 5px;
}
</style>
<title>UKTrainers</title>
</head>

<!--------!-----!START OF BODY!----!-------!>

<body>
<center>

<table class="table1">
<tr>
<td>
<center><font onMouseover="color='#DDDDDD'" onMouseout="color='white'" color="white" size="7"

face="verdana">UKTrainers</font>
</tr></td>
</table>

<table><tr><td>
<table id="table2"><tr><td>


<center><font size="4">Links<hr></font><font size="2">


</table></td><td>
<table id="table3"><tr><td>


Content 2


</table></td><td>
<table id="table2"><tr><td>


Content 3


</table></table>

http://www.predatorconservation.com


Contact Us | Privacy statement Main website
Hitwise Top 10 Award Winner - Jan-Mar 2005

About us | Contact us | Link to us | Terms & Conditions | Privacy Policy
© Copyright IPC Media Limited, All rights reserved