Example: Attaching One Control to Multiple CSS Classes

Previous Next

See Also

The class attribute of an HTML element can contain a space-separated list of class values. This is called a class list. This way, you can attach one HTML element to more than one class, for example:

<td class="myFont myBorder">text</td>

You can define two generic style sheet rules that both affect this <td> element. One style sheet rule specifies font-characteristics:

.myFont {

   font-family: Eurostile, Arial, Helvetica, sans-serif;

   font-size: 80%;

   font-weight: bold;


And another style sheet rule specifies border characteristics:

.myBorder {

   border-style: inset;

   border-width: 4;


Within Web Designer, you can specify that one control belongs to more than one Class, by separating these classes in a list, and setting the Class List property to:

MyFont MyBorder