Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Jan 2021
    Location
    Santa Barbara, CA, USA
    Posts
    63
    Member #
    62344
    Liked
    1 times

    Question CSS Parse error?

    I quoteth from the w3c css validator:

    Parse Error --1px: 1px;

    ? What's wrong with it?

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,865
    Member #
    5580
    Liked
    731 times
    1px: is wrong

    should be 1px;

    is that what you mean?


  4. #3
    Member
    Join Date
    Jan 2021
    Location
    Santa Barbara, CA, USA
    Posts
    63
    Member #
    62344
    Liked
    1 times
    1px is the var name, well --1px is. Is that an invalid var name?

  5. #4
    Member
    Join Date
    Jan 2021
    Location
    Santa Barbara, CA, USA
    Posts
    63
    Member #
    62344
    Liked
    1 times
    oh ok cant start "ident" names with numbers. Whoops!

    -- edit --

    https://developer.mozilla.org/en-US/...S/custom-ident
    Last edited by Cinder; Mar 22nd, 2021 at 10:36 AM. Reason: link to solution

  6. #5
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,865
    Member #
    5580
    Liked
    731 times
    Correct.... these rules:

    HTML5 supports numbers as id and class name , but css selector have some rules ,

    • A valid name should start with a letter (a-z)[A-Z] , an underscore (_), or a hyphen (-) which is followed by any numbers, hyphens, underscores, letters.
    • A name should be at least two characters long.
    • Cannot start with a digit, two hyphens or a hyphen followed by a number .



Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 03:26 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com