...

View Full Version : can numbers can be declared as classes??



ksanjanadevi
02-24-2009, 10:45 AM
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??


<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>

oesxyl
02-24-2009, 12:09 PM
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??


<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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum