CSS Hackary

A friend of mine recently asked me what was my most used CSS hack. The first thing I said was that I am not a web designer, I just play one on TV. I have found that everybody knows or can easily look up how to apply a border, text alignment, background image, etc to an HTML element using CSS. What I have discovered through experimentation is that browsers allow you to define more than one CSS class per element. I have recently been using the Yahoo UI Library and their yui-u CSS class that defines a layout block. But for that block I wanted to apply some additional style attributes. I was able to combine the yui-u layout and my style CSS class by doing the following:

<DIV class="yui-u content">CONTENT HERE</DIV>

Technorati Tags: , , ,


Leave a Reply