Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Stylesheet Firefox Issue...

Posted on 2008-06-20
4
Medium Priority
?
554 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

610 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