Hi,

On Tue, 2009-02-17 at 17:44 -0800, itsastickup wrote:
> 
> I'm having to design the UI to a small site, and that means dabbling
> in css. I've never been able to get any kind of decent idea as to how
> to decide on classes and id-ing. 

IME, the decisions you'll need to make will depend on the nature of the
site, especially as it relates to the volume of Javascript you'll be
using.  The HTML / Javascript / CSS interdependencies can get to be
quite a bit to manage.  Like you, I've been unable to find what I would
call a usable set of guidance.  Here's what I've come to.  

We've got three 'identifiers' to work with: id, name, and class.  CSS
uses id and class.  Javascript uses id and name.  So, to keep the issues
as separate as possible, I try to avoid using id for CSS.  The problem
I've run into is that it's difficult to decide what 'class' a thing
belongs to until you've got lots of other things to compare it to.  So
what I'm ending up doing in actual practice is to initially use id to
style elements as the UI emerges, then refactor to classes as the site
comes together.  It's turning out to be a non-trivial exercise.

HTH,
Bill


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to