Re: OT: CSS Class vs ID?

2004-10-20 Thread Mark Drew
Thank you for all of the replies I think i shall have to do it via the javascript route as if you can imagine I *CANT* touch the html and I was trying to override existing classes (long story and reasons why, we could argue till cows come home and make dinner , beef burgers persumably) simply usi

Re: OT: CSS Class vs ID?

2004-10-20 Thread Nathan Strutz
Just to add to the conversation, another simple selector is the built-in HTML tags. I see too many and . Use to , , etc. -nathan strutz http://www.dopefly.com/ Damien McKenna wrote: > Which is the more correct method for calling CSS styles, to use the id > attribute or the class attribute

Re: OT: CSS Class vs ID?

2004-10-20 Thread Michael Wilson
Hi, Either method is correct but id's must be unique per document. Classes may be applied to multiple elements and instances in a single document, so in some instances a class offers more flexibility. I use id's as often as possible because I find them to be more human readable and because the

Re: OT: CSS Class vs ID?

2004-10-20 Thread Jochem van Dieten
Dick Applebaum wrote: > What if you want to change the attributes of some related items? > > Say you have table cells: > > >row 1 column 1 >row 1 column 2 > > >row 2 column 1 >row 2 column 2 > > * > * > * > > You can change the column width for all cells in the column with: >

Re: OT: CSS Class vs ID?

2004-10-20 Thread Dick Applebaum
What if you want to change the attributes of some related items? Say you have table cells: row 1 column 1 row 1 column 2 row 2 column 1 row 2 column 2 * * * You can change the column width for all cells in the column with: document.getElementById("col1").style.width = 100; T

Re: OT: CSS Class vs ID?

2004-10-20 Thread Jochem van Dieten
Mark Drew wrote: > On a similar note, as I have been doing this *right now* I wonder if > the fllowing is possible: > (excuse the pseudocode. > > >.mystyle1 { // some styles here } >.mystyle2 { //a different stule here } > > //now change mystyle1 to mystyle 2 > >.mystyle1 { //overw

Re: CSS Class vs ID?

2004-10-20 Thread Massimo, Tiziana e Federica
> Which is the more correct method for calling CSS styles, to use the id > attribute or the class attribute? I think this cover the topic pretty well: http://css-discuss.incutio.com/?page=ClassesVsIds Massimo Foti DW tools: http://www.massimocorner.com CF tools: h

Re: OT: CSS Class vs ID?

2004-10-20 Thread Barney Boisvert
You can do it with javascript, as the entire content of a stylesheet is accessible as a variety of data structures, but you can't do it with CSS itself. cheers, barneyb On Wed, 20 Oct 2004 18:52:47 +0200, Mark Drew <[EMAIL PROTECTED]> wrote: > On a similar note, as I have been doing this *right n

RE: OT: CSS Class vs ID?

2004-10-20 Thread Dave Francis
Latest style "wins". -Original Message- From: Mark Drew [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 20, 2004 12:53 PM To: CF-Talk Subject: Re: OT: CSS Class vs ID? On a similar note, as I have been doing this *right now* I wonder if the fllowing is possible: (

Re: OT: CSS Class vs ID?

2004-10-20 Thread Mark Drew
On a similar note, as I have been doing this *right now* I wonder if the fllowing is possible: (excuse the pseudocode. .mystyle1 { // some styles here } .mystyle2 { //a different stule here } //now change mystyle1 to mystyle 2 .mystyle1 { //overwrite with mystyle2 } Basically I

Re: OT: CSS Class vs ID?

2004-10-20 Thread Barney Boisvert
Yes, you can nest IDs. There isn't a "right" one for referencing a certain element. If the element is unique in a document, use ID, but if it's one of many, use class. Classes are more general, so I tend to use those when I can, reserving ids mostly for page layout tasks (rather than formatting

Re: OT: CSS Class vs ID?

2004-10-20 Thread Andy Allan
The ID attribute is unique. It should apply to one and only one . Use the class attribute for general styles. Andy On Wed, 20 Oct 2004 12:06:20 -0400, Damien McKenna <[EMAIL PROTECTED]> wrote: > Which is the more correct method for calling CSS styles, to use the id > attribute or the class attr

OT: CSS Class vs ID?

2004-10-20 Thread Damien McKenna
Which is the more correct method for calling CSS styles, to use the id attribute or the class attribute? Can IDs be nested, e.g. #box #inside #field {...}, like classes can be, e.g. table.box th.inside td.field {...}. -- *Damien McKenna* - Web Developer - [EMAIL PROTECTED]