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: , , ,

Related posts:

  1. JavaScript FX
  2. Style And Class
  3. Unobtrusive JavaScript with Prototype and Behavior
  4. The 1Kb CSS Grid
  5. Div Align With CSS

This entry was posted in CSS, TechKnow. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*