user1212 user1212 - 17 days ago 5
CSS Question

handling css id and classes with spaces

I have a paragraph as

<p id="para one" class="paragraph one">Content</p>


How does one represent the id and class with spaces in the css

When I use

#para#one{
}

.paragraph.one{
}


It does not work with the css above.

Answer
class="paragraph one" 

actually represents two different classes

id="para one"

won't work, but you'll probably end up having an actual id of para

Comments