Home   News  Product reviews  Website reviews  Forums   Competitions  Subscribe 


Web Building >> Web design & build
 |  Print Topic
Jump to first unread post. Pages: 1
Turbo
regular


Reg'd: Sat
Posts: 133
CSS not working in Firefox
      #152415 - Thu Jan 20 2005 07:21 PM

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.




Post Extras: Print Post   Remind Me!   Notify Moderator  
predator
regular


Reg'd: Sun
Posts: 542
Re: CSS not working in Firefox [Re: Turbo]
      #152451 - Thu Jan 20 2005 08:33 PM

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


Post Extras: Print Post   Remind Me!   Notify Moderator  
Turbo
regular


Reg'd: Sat
Posts: 133
Re: CSS not working in Firefox [Re: predator]
      #152475 - Thu Jan 20 2005 09:20 PM

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


Post Extras: Print Post   Remind Me!   Notify Moderator  
predator
regular


Reg'd: Sun
Posts: 542
Re: CSS not working in Firefox [Re: Turbo]
      #152701 - Fri Jan 21 2005 02:10 PM

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


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1

Rate this topic

Jump to


Extra information
0 registered and 14 anonymous users are browsing this forum.

Moderator:  putasolutions, Joe_London, greysts, bricat, Nanook, Hello_There, John_McKenna, Mouse, TheFatControlleR 


Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      Mark-up is enabled

Rating:
Topic views: 980

Contact Us | Privacy statement Main website