Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Oct 2008
    Location
    India, Banglore
    Posts
    50
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question can numbers can be declared as classes??

    The below code does'nt give any result in case of style. I have given class name as "3" and have given proper css for it, but the style is not affected.. Any problem in the code??

    Code:
    <html>
    <head>
    <style type="text/css">
    .3 {
    color:red;
    border:1px solid blue;
    }
    </style>
    </head>
    <body>
      <a href="mailto:mailman@localhost" class="3">mailman@localhost</a>
    </body>
    </html>

  • #2
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by ksanjanadevi View Post
    The below code does'nt give any result in case of style. I have given class name as "3" and have given proper css for it, but the style is not affected.. Any problem in the code??

    Code:
    <html>
    <head>
    <style type="text/css">
    .3 {
    color:red;
    border:1px solid blue;
    }
    </style>
    </head>
    <body>
      <a href="mailto:mailman@localhost" class="3">mailman@localhost</a>
    </body>
    </html>
    yes is a problem, 3 is not a valid class name:

    see class, ident, nmstart and nmchar:

    http://www.w3.org/TR/CSS2/grammar.html#q1
    http://www.w3.org/TR/CSS2/grammar.html#q2

    best regards


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •