?
Solved

Stylesheet Firefox Issue...

Posted on 2008-06-20
4
Medium Priority
?
557 Views
Last Modified: 2013-12-16
Hi,

I have this in my stylesheet:

.star-rating a.1stars-active
{
      background: url(/images/star_rating.gif) left bottom;
      width: 20px;
}

I got this from another website, so I don't EXACTLY understand what they're trying to do.  But I get this warning in Firefox.

Warning: Expected ',' or '{' but found '0.2stars'.  Ruleset ignored due to bad selector.
Source File: http://localhost/stars.css
Line: 78

Any suggestions about how I can fix it, while still having it do what it's meant to do?  Seems to work fine in IE.

EJ
0
Comment
Question by:kalliopi
4 Comments
 
LVL 11

Expert Comment

by:asafadis
ID: 21833495
You probably have HTML syntax in you CSS file, such as:
    <style> ... </style> or
    <!-- ... //-->

Neither of these belong in a CSS file.

P.S.
The link you provide goes to YOUR local server.  It inaccessible to the world!
You can attach it or copy-paste it next time. Or even provide a live link.
0
 
LVL 18

Expert Comment

by:Richard Lee
ID: 21835828
The style should probably look like this:

.star-rating a:active
{
      background: url(/images/star_rating.gif) left bottom;
      width: 20px;
}

This style states that there is a class called star-rating which when applied to a container, all A tags (links) when active will have the background and width adjusted as above.
0
 
LVL 43

Accepted Solution

by:
David S. earned 2000 total points
ID: 21835864
Classes may not start with a number.
http://www.w3.org/TR/REC-CSS2/syndata.html#q4
0
 
LVL 6

Author Closing Comment

by:kalliopi
ID: 31469237
This is EXACTLY what I was looking for.  Thank you.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses
Course of the Month13 days, 18 hours left to enroll

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question