headerIMG

B2B Articles - July 08, 2010

Assign Two CSS Classes Together For One Object

It is possible to assign an object two or more classes at the same time. WordPress does this out of the box for images, for example.

<img class="alignnone size-full wp-image-144"

We used color coding of each class to detail each class applied to the image tag. To add multiple classes, simply separate each class with a space (not a comma). In the case above, the image will use the rules for both "alignnone" and "size-full" as well as "wp-image-144."

This can be useful if you are using a CSS grid framework or if you have created your own CSS primer style sheet, which requires further customization. It will allow you to leave the framework untouched while you can add further specifications or style to the second class. This way, classes can be reused and recycled.

Tel 212-993-7809  

Ironpaper ®
10 East 33rd Street 
6th Floor
New York, NY 10016
Map

Ironpaper - B2B Agency

B2B Marketing and Growth Agency.

Grow your B2B business boldly. Ironpaper is a B2B marketing agency. We build growth engines for marketing and sales success. We power demand generation campaigns, ABM programs, create B2B content, strengthen sales enablement, generate qualified leads, and improve B2B marketing efforts.

Ironpaper Twitter Ironpaper Linkedin