Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Implementing CSS in Mozilla

Status
Not open for further replies.

TheDust

Programmer
Aug 12, 2002
217
US
I have a CSS class that Mozilla won't recognize. The styles work when I put them inline like this:

Code:
<table>
  <tr>
    <td style="font-family:Verdana, Arial, Helvetica, sans-serif;font-size:10px;line-height:16px;font-weight:bold;color:#DED9E6;padding-top:5px;padding-right:8px;padding-bottom:5px;padding-left:12px;">text here</td>
  </tr>
</table>

However, it doesn't work when I implement it this way:

Code:
<style type="text/css">
.2005myp_adcopy {
  font-family:Verdana, Arial, Helvetica, sans-serif;
  font-size:10px;
  line-height:16px;
  font-weight:bold;
  color:#DED9E6;
  padding-top:5px;
  padding-right:8px;
  padding-bottom:5px;
  padding-left:12px;
}
</style>
<table>
  <tr> 
    <td class="2005myp_adcopy">text here</td>
  </tr>
</table>

Does anyone know what in sam hell is going on here? I'm starting to lose my faith in Mozilla...
 
Do other defined styles work in your stylesheet?

How are you bringing in the style sheet? Is it linked or imported?


[cheers]
Cheers!
Laura
 
Unfortunately, I cannot find the reference right now, but classes that begin with the number are not allowed in the w3 specs. Mozilla correctly ignores the class name that begins with the number. Rename your class so that it starts with a letter and it should work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top