Hey Kevin,

There's no problem with styling ID's since there is only one instance on the page at any one time. Such as your header with your site's main navigation. I don't have more than one "mainnav" container on my site so styling #mainnav is perfectly acceptable.

As for not styling tag elements, I don't see how this is beneficial, because having to classify every <p>, <a>, <address>, <h1-6> (and so-on) tags would be extremely unreadable and problematic for a number of reasons. Such as when using a CMS that dynamically generates a large chunk of your content.

There's no problem with styling anything in your markup, within the limits of altering your site's presentation, you just need to be smart about your styles.

Cheers,
- Brandtley McMinn
Creative Director - Gigglebox Studios



On 3/2/2011 11:04 AM, Kevin A. Cameron wrote:
That's what I mean, JS for behavior and binding to element's IDs.
If you style IDs with CSS, you can get into trouble if you want to have a second element on the same page with the same styles (2 elements with same ID being a problem), or if you want to change the element's look in a single instance, but keep the functionality.

Kevin


On Tue, Mar 1, 2011 at 11:34 PM, andrew23 <[email protected] <mailto:[email protected]>> wrote:



    On Feb 24, 10:34 am, "Kevin A. Cameron" <[email protected]
    <mailto:[email protected]>>
    wrote:
    > I've found the best usage of the 2 types of selectors is to
    style classes,
    > and not elements or ids. For the most part I leave IDs unstyled
    so that they
    > are open for use for JS

    Why Kevin?

    CSS is for presentation

    Scripts are for behaviour

    Blurring the two is a recipe for a mess

    --
    --
    You received this because you are subscribed to the "Design the
    Web with CSS" at Google groups.
    To post: [email protected]
    <mailto:[email protected]>
    To unsubscribe: [email protected]
    <mailto:[email protected]>


--
--
You received this because you are subscribed to the "Design the Web with CSS" at Google groups.
To post: [email protected]
To unsubscribe: [email protected]

--
--
You received this because you are subscribed to the "Design the Web with CSS" 
at Google groups.
To post: [email protected]
To unsubscribe: [email protected]

Reply via email to