Re: [css-d] ID vs. Class

2010-07-22 Thread Reese
On 19-Jul-10 23:26, Beth Lee wrote: ...but you can use getElementsByClassName. That wasn't available in IE, the last I heard. Has that changed? Reese __ css-discuss [cs...@lists.css-discuss.org]

[css-d] ID vs. Class

2010-07-19 Thread Chris Blake
Hi, I understand the difference between class and ID to a basic level. I am adding a #div but I may want to add another later. Therefore I should use class but what is the danger if I use a class - is it slower, does something cache that may not if it's an ID - what's the real difference

Re: [css-d] ID vs. Class

2010-07-19 Thread Beth Lee
-Original Message- From: css-d-boun...@lists.css-discuss.org [mailto:css-d-boun...@lists.css-discuss.org] On Behalf Of Chris Blake Sent: Monday, July 19, 2010 8:50 PM To: css discuss discuss Subject: [css-d] ID vs. Class I understand the difference between class and ID to a basic level

Re: [css-d] ID vs. Class

2010-07-19 Thread Chris Blake
On 20/07/2010, at 11:06 AM, Beth Lee wrote: -Original Message- From: css-d-boun...@lists.css-discuss.org [mailto:css-d-boun...@lists.css-discuss.org] On Behalf Of Chris Blake Sent: Monday, July 19, 2010 8:50 PM To: css discuss discuss Subject: [css-d] ID vs. Class I understand

Re: [css-d] ID vs. Class

2010-07-19 Thread Beth Lee
Chris writes: 3. If you use Javascript, your getElementById functions could go blooey if there are multiple divs with the same ID. (If there's a more technical terms for it, I don't know it.) But it's OK if they classes? Well, you can't use getElementById (obviously), but you can use

Re: [css-d] ID vs. Class

2010-07-19 Thread Claude Needham
On Mon, Jul 19, 2010 at 8:15 PM, Chris Blake ch...@3pointdesign.com wrote: Really for this because it is only appearing once for now I should use ID - but there's a good chance I may use it again later on this page - so class for now is OK? I like to treat class and id semantically -- or at

Re: [css-d] ID vs. Class [solved]

2010-07-19 Thread Chris Blake
On 20/07/2010, at 11:32 AM, Claude Needham wrote: On Mon, Jul 19, 2010 at 8:15 PM, Chris Blake ch...@3pointdesign.com wrote: Really for this because it is only appearing once for now I should use ID - but there's a good chance I may use it again later on this page - so class for now

Re: [css-d] ID vs. Class [solved]

2010-07-19 Thread Michael Adams
On Tuesday 20 July 2010 15:37, Chris Blake wrote: I like to treat class and id semantically -- or at least according to my understanding of what that means. SOUNDS GOOD TO ME! But there is nothing really wrong with a combination of both:- code div id=this1 class=content Content /div

[css-d] ID vs Class

2007-06-27 Thread Travis Killen
Why should class be used to define an element vs. id? I'm sure each one should be used in different situations, and would like more information on making the right choice. Do child elements inherit properties from there parent class? from there parent id? Any links to information on this

Re: [css-d] ID vs Class

2007-06-27 Thread Marcus Taylor
Technically, ids should only be declared once in a page, and classes can be repeated as many times as necessary. So I would declare page structure with ids and elements within as classes. If you have a button (for example) that is repeated many times in a page use a class. If you use Tidy (I use

Re: [css-d] ID vs Class

2007-06-27 Thread James Gadrow
Travis Killen wrote: Why should class be used to define an element vs. id? You use ids for unique page elements. ie: id=contentWrapper id=mainNav id=inbox You use classes for styling similar elements. ie: class=externalLink class=topItem class=message However, you only need an id / class

Re: [css-d] ID vs Class

2007-06-27 Thread john saylor
hi On 6/27/07, Travis Killen [EMAIL PROTECTED] wrote: Why should class be used to define an element vs. id? http://www.w3.org/TR/REC-CSS2/selector.html#id-selectors Any links to information on this topic would be much appreciated. http://www.w3.org/TR/REC-CSS2/cover.html#minitoc -- \js [

Re: [css-d] ID vs Class

2007-06-27 Thread Zoe M. Gillenwater
Travis Killen wrote: Why should class be used to define an element vs. id? I'm sure each one should be used in different situations, and would like more information on making the right choice. Do child elements inherit properties from there parent class? from there parent id? Any links

[css-d] ID vs Class

2006-05-27 Thread Wintergreen
I am learning CSS and cannot distinguish between ID and Class. Please advise. Many thanks. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.1.394 / Virus Database: 268.7.1/347 - Release Date: 5/24/2006

Re: [css-d] ID vs Class

2006-05-27 Thread Scott Wilcox
hey there, Take a look at the following links: http://css-discuss.incutio.com/?page=ClassesVsIds http://developers.evrsoft.com/article/web-design/css/css-the-basics-id-s-and-classes.shtml Scott. Wintergreen wrote: I am learning CSS and cannot distinguish between ID and Class. Please advise.

Re: [css-d] ID vs Class

2006-05-27 Thread Dave Goodchild
On 27/05/06, Wintergreen [EMAIL PROTECTED] wrote: I am learning CSS and cannot distinguish between ID and Class. Please advise. Many thanks. I don't think that is going to get much of a reponse as it is so basic that you could find it out on the web or in a book (not even a good book) in

Re: [css-d] ID vs Class

2006-05-27 Thread Ed Seehouse
On 5/27/06, Wintergreen [EMAIL PROTECTED] wrote: I am learning CSS and cannot distinguish between ID and Class. Just google on css id class. Google is your friend. -- Ed Seedhouse __ css-discuss [EMAIL PROTECTED]