Basically, you just put them all in a row with a space between them when you attach the class, as in this <div> example, where three different styles are used:

<div class="styleOne styleTwo styleThree">

For instance, let's say we have this style script in the head of the page:


.bigText { font-family: sans-serif; font-size: 20px; }

.redItalic { color : red; font-style: italic; }

.lineThrough { text-decoration: line-through; }


To attach that to a <div> with some text, it would look like this:

<div class="bigText redItalic lineThrough">
The dogs of war eat watermelons.

with the result showing, thus…
The dogs of war eat watermelons.

If you think this through a bit, it can greatly simplify the use of styles, by segregating particular characteristics to individual styles that are then combined as needed — rather than making numerous, longer, more complex styles for every possible combination of characteristics.

Posted in: Java

Related FAQ's

Marius Ion ANGEL HOT SOFT LLC (800) 316-7677