homepage Welcome to WebmasterWorld Guest from 54.237.54.83
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderator: open

CSS Forum

    
CSS in NS6 doesn't work at all?
Jon_King




msg:1221618
 10:11 pm on Aug 27, 2002 (gmt 0)

I can't seem to find out why styles are not being applied in NS6. I have several very basic type styles/colors which work fine in IE, but its as if they don't exist in NS.

 

moonbiter




msg:1221619
 10:13 pm on Aug 27, 2002 (gmt 0)

Can you give a short example?

nancyb




msg:1221620
 10:19 pm on Aug 27, 2002 (gmt 0)

I've just recently converted everything to CSS and it works fine in NS6.2. Did you run the css file through a validator? That might give you a clue. The one at WDG is a little more helpful with the errors than the one at W3C but use them as final authority.

Jon_King




msg:1221621
 10:21 pm on Aug 27, 2002 (gmt 0)

Check this page in both browsers and you'll see what I mean. One example is the first piece of text "Rubber Extrusions" is 24pt Arial in red.

<sorry, no URLs>

[edited by: tedster at 2:30 am (utc) on Aug. 28, 2002]

bobriggs




msg:1221622
 10:37 pm on Aug 27, 2002 (gmt 0)

Just to let you know, it doesn't display as 24pt arial in Opera or Moz1.1 either. Only MSIE gets it.

The problem might be with inheritance.

Try <p class="24pt-arial-red"> (your inside <p> in the table).

moonbiter




msg:1221623
 10:59 pm on Aug 27, 2002 (gmt 0)

I believe the problem is that you are beginning your selector with a number. Although it isn't clear in the html recommendations, starting a class name with a number seems to be a problem.

Change the class names in your stylesheet to see what I mean.

Besides, a name like "24-point-arial-red" kind of defeats the purpose of using classes anyway -- what if you decided you wanted to change all of your subheads to 30pt blue helvetica?.

[edited by: moonbiter at 10:59 pm (utc) on Aug. 27, 2002]

Jon_King




msg:1221624
 10:59 pm on Aug 27, 2002 (gmt 0)

Well, I see what you mean, I tried your advice but unfortunately it didn't pay off. There are other styles on the page as well in which inheritance is not a problem and they do not display either.

bobriggs




msg:1221625
 11:05 pm on Aug 27, 2002 (gmt 0)

Do you need the <p> tag inside the <td>?

moonbiter




msg:1221626
 11:06 pm on Aug 27, 2002 (gmt 0)

Yep, the numbers are definitely it. According to the W3C's CSS Validation Service [jigsaw.w3.org]:

In CSS1, a class name could start with a digit (".55ft"), unless it was a dimension (".55in"). In CSS2, such classes are parsed as unknown dimensions (to allow for future additions of new units) : To make ".12pt-arial-black" a valid class, CSS2 requires the first digit to be escaped

The relevant information can be found in the CSS 2 Recommendation [w3.org]

Jon_King




msg:1221627
 11:08 pm on Aug 27, 2002 (gmt 0)

Thanks, Moonbiter.

You do make a point regarding class names, I'm just a holdover from print advertising.

BUT, you were exactly correct! Leading numbers as class names are the culprit.

Thanks so much.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved