html - CSS can't select classes/id's with numbers in it? -


i ran problem.

i gave div other divs in class named center , 400-width. means div has centered , have width of 400.

<div class="center 400-width" id="position"> <div class="" id="header"> header </div> <div class="" id="content"> content </div> <div class="" id="footer"> footer </div> </div> 

the css selects class 400-width means container gets width of 400px. , background-color checking if it's true.

.400-width{     width:400px;     background-color:blue;     color:white; } 

it doesn't happen right can see: http://jsfiddle.net/gekkeabt/xqje4/1/

i solved problem replacing 400- four. becomes fourwidth

but question is. why can't use numbers in css , there way of doing job?

thanks!

i have faced same problem.... not problem anyway..

instead of '.400-width' use '.width-400'


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -