Ken McCormack wrote:

Now, in a big app might have 250 buttons and icons across all dialogs; if you don't organise your css classes in this kind of hierarchical manner, then the alternative looks like this:
<a class="savebutton">Save</a>
<a class="cancelbutton">Cancel</a>
..
<a class="anotherbutton">Click Me</a>

Interesting idea, but if I have to use a class on every element, then I consider that a failure.

I would approach your base style + deviation method by creating an id or class for the container for the links and specifying what all links within the container should look like and only using a class on the links that are different.

so I'd have:

ul#nav li a{
padding: 3px 3px 3px 20px; /* pad left for bg image */
  background-color:#cecece;
  border:1px solid #404040;
  white-space:nowrap;
  background-align:left;
  font-weight:normal;
  font-size:small;
  background-image:url(icon.gif); }

and

ul#nav li a.savebutton
{
  background-image:url(saveicon.gif);
}


with:

<ul id="nav">
   <li><a href="#">Clickme</a></li>
   <li><a href="#">Clickme</a></li>
   <li><a href="#">Clickme</a></li>
   <li><a href="#">Clickme</a></li>
   <li><a href="#" class="savebutton">Save</a></li>
</ul>


but you'd probably do the same? and I'm just picking apart your example needlessly right?

;o)







--
Join me: http://wiki.workalone.co.uk/
Thank me: http://www.amazon.co.uk/gp/registry/1VK42TQL7VD2F
Engage me: http://www.boldfish.co.uk/portfolio/



*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to