Solved

Stylesheet Firefox Issue...

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…

749 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