Solved

Stylesheet Firefox Issue...

Posted on 2008-06-20
4
528 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 42

Accepted Solution

by:
David S. earned 500 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

777 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