Html css class name with space
How to reference a long class name with spaces in CSS? Ask Question 22. 8. but class names cannot contain spaces. Browse other questions tagged html css drupal or ask your own question. asked. 6 years, 11 months ago. viewed. 51, 797 times. active. 6 years, 2 months agoClass names concatenated or separated by a space. Ask Question 23. 7. Which characters are valid in CSS class namesselectors? 1155. Is there a way to make a variable width font act like a fixed width font in HTML? 13. html css class name with space
If it contains spaces, it is not legal HTML. You shouldn't expect this to work. Here is the relevant section of the HTML 4. 01 specification. [EDIT As others have noted, you can get around this by assigning one or more class names to the div and using a class name to do the selection.
Your class CSS is correct. You don't have a class with a space in it, you have two classes, paragraph and one . Your CSS properly selects elements that have both of those classes: html css class name with space To select elements with a specific class, write a period (. ) character, followed by the name of the class. You can also specify that only specific HTML elements should be affected by a class. To do this, start with the element name, then write the period (. ) character, followed by the name of the class (look at Example 1 below). HTML elements can have more than one class name, each class name must be separated by a space. Example Style elements with the class name city , also style elements with the class name main : Jun 23, 2008 Technically speaking, it's not a class name with a space in it, but the element has two classes. If the tag is, the css to match all links with classes 'forum' AND 'first' should be a. forum. first. Note that IE6 does not support multiple classes correctly: it only reads the last class of the css selector. Jun 25, 2008 Best Answer: very close The div, has two classes clearfix profileWidth not one class with a space in it. In this case, I would use the class profileWidth to address it, only because I know that it is using class clearfix on multiple divs, and I know that is the only div in class profileWidth i. e. see thisRating: 4.66 / Views: 629