HighDots Forums  

how to change cor of all elements of some class

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


Discuss how to change cor of all elements of some class in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Nikolay I.Nikolskiy
 
Posts: n/a

Default how to change cor of all elements of some class - 08-25-2004 , 07:53 AM






I have class defined in CSS

<style>
..bigone {color:red;}
</style>

and html like

<span class=bigone>test1</span>
<span class=bigone>test2</span>
....

Is it possible to change dinamically using javaScript color of all elements
of class bigone to blue?

thanks,
Nikolay.



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

Default Re: how to change cor of all elements of some class - 08-25-2004 , 09:07 AM






On Wed, 25 Aug 2004 16:53:50 +0400, Nikolay I.Nikolskiy <nik (AT) tepkom (DOT) ru>
wrote:

Quote:
I have class defined in CSS

style
.bigone {color:red;}
/style

and html like

span class=bigone>test1</span
span class=bigone>test2</span
...

Is it possible to change dinamically using javaScript color of all
elements
of class bigone to blue?

thanks,
Nikolay.


Why would you want this? I'm really confused. You realize that
no-Javascript UAs will not get the change? If the class won't have the
color in the stylesheet, then why set it at all?

Finally, why not do it server-side with some PHP which puts in the head
<style type="text/css">.bigone{color:blue}</style> ? Doing it client-side
with Javascript isn't as smart as doing it on the server.

A test page URL would be useful.


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.