Solved

Stylesheet Firefox Issue...

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

747 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now