HighDots Forums  

May a Tag have Two Classes?

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss May a Tag have Two Classes? in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Steve Pugh
 
Posts: n/a

Default Re: May a Tag have Two Classes? - 01-10-2005 , 11:23 AM






"Wayfarer" <wfping2004-x (AT) yahoo (DOT) com> wrote:

Quote:
I recently got a warning from the WDG HTML Validator at
http://www.htmlhelp.com/ for assigning two classes as shown for
http://www.journeys.ws/books.asp :

Line 71, character 23:

p class="menu" class="nw"

Error: duplicate specification of attribute CLASS

I Googled but can't find anything on it. Is there a way to assign two
classes so the page will validate (yes, I know there are other errors and
I'm working on them)?
Yes. Multiple classes are space separated e.g. <p class="menu nw">

Neither class will be applied by Netscape 4, but both will be applied
by IE5 (maybe IE4) and more modern browsers.

Steve



Reply With Quote
  #2  
Old   
Wayfarer
 
Posts: n/a

Default May a Tag have Two Classes? - 01-10-2005 , 11:27 AM






I recently got a warning from the WDG HTML Validator at
http://www.htmlhelp.com/ for assigning two classes as shown for
http://www.journeys.ws/books.asp :

Line 71, character 23:

<p class="menu" class="nw">

Error: duplicate specification of attribute CLASS

I Googled but can't find anything on it. Is there a way to assign two
classes so the page will validate (yes, I know there are other errors and
I'm working on them)?

TIA

Neill

--
Wayfarer
Journeys: http://www.journeys.ws/

There is a difference between knowing the path and walking the path. -
Morpheus



Reply With Quote
  #3  
Old   
Michael Winter
 
Posts: n/a

Default Re: May a Tag have Two Classes? - 01-10-2005 , 05:09 PM



On Mon, 10 Jan 2005 17:23:21 +0000, Steve Pugh <steve (AT) pugh (DOT) net> wrote:

Quote:
[...] both [classes] will be applied by IE5 (maybe IE4) [...]
IE4 doesn't support multiple classes.

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.


Reply With Quote
  #4  
Old   
Steve Pugh
 
Posts: n/a

Default Re: May a Tag have Two Classes? - 01-11-2005 , 02:59 AM



"Michael Winter" <M.Winter (AT) blueyonder (DOT) co.invalid> wrote:

Quote:
On Mon, 10 Jan 2005 17:23:21 +0000, Steve Pugh <steve (AT) pugh (DOT) net> wrote:

[...] both [classes] will be applied by IE5 (maybe IE4) [...]

IE4 doesn't support multiple classes.
There we are then. Another benefit to using multiple classes - it
hides our CSS from IE4 as well as from NN4. Good stuff.

Steve



Reply With Quote
  #5  
Old   
Andreas Prilop
 
Posts: n/a

Default Re: May a Tag have Two Classes? - 01-11-2005 , 08:09 AM



On Tue, 11 Jan 2005, Steve Pugh wrote:

Quote:
IE4 doesn't support multiple classes.

There we are then. Another benefit to using multiple classes - it
hides our CSS from IE4 as well as from NN4. Good stuff.
You don't even need multiple classes: just write
<p class="mystyle mystyle">

--
Top-posting.
What's the most irritating thing on Usenet?



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.