Stylesheet Firefox Issue...


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.

Who is Participating?
David S.Connect With a Mentor Commented:
Classes may not start with a number.
You probably have HTML syntax in you CSS file, such as:
    <style> ... </style> or
    <!-- ... //-->

Neither of these belong in a CSS file.

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.
Richard LeeSoftware EnthusiastCommented:
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.
kalliopiAuthor Commented:
This is EXACTLY what I was looking for.  Thank you.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.