Reply
JS Reference for CSS
Old 07-16-2003, 03:08 PM JS Reference for CSS
c2k
c2k's Avatar
Skilled Talker

Posts: 67
Location: Germany
Hi,
I would like to change the color of the links if the user should like to. I would like to do so with JS. My problem is, that I cannot find any JS that corresponds to the A:Link, A:active, etc.

Does anyone know what the JS tag would be or does at exist?
Any clue?

Thanks for your help.
c2k
c2k is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 07-16-2003, 03:33 PM
david's Avatar
King Spam Talker

Posts: 1,314
Location: Glasgow, UK
I think you are looking for CSS, not JavaScript.

http://www.freewebmasterhelp.com/tutorials/css/
__________________
Free Webmaster Help - Everything a webmaster needs - for free
Free-Webhosting.info - Free web hosts reviewed and rated
Web Hosting Hunt - Impartial hosting directory - Add your host today for FREE
david is offline
Reply With Quote
View Public Profile Visit david's homepage!
 
Old 07-16-2003, 03:40 PM
c2k
c2k's Avatar
Skilled Talker

Posts: 67
Location: Germany
Hi,
thanks for your quick reply.

No, actually I am looking for JS.

I would like to change i.e. the link color. I would like to do so by the JS function

Code:
getElementsByTagName()
Well, I need to actually "talk" to the css attribute A:link color.

Example:
To change the border color of a table for example it would be
Code:
getElementsByTagName("table")[i].style.borderColor = document.form1.textfield.value
The problem is, that I do not know how to change the links.
Thanks for you help.
c2k is offline
Reply With Quote
View Public Profile
 
Old 07-17-2003, 03:55 PM
RedMage's Avatar
Average Talker

Posts: 27
Location: ROY UTAH USA
Try "color" When you access an anchors style with "color" it should refer to "A:LINK { COLOR: # }"
RedMage is offline
Reply With Quote
View Public Profile Visit RedMage's homepage!
 
Old 07-18-2003, 09:22 AM
c2k
c2k's Avatar
Skilled Talker

Posts: 67
Location: Germany
Hi,
I got it for the link color:
Code:
documet.getElementsByTagName("a")[i].style.color = 'red'
The thing I don't know yet is how to change the color of the visited Links. Does anyone know that?
c2k is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to JS Reference for CSS
 

Thread Tools

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.13049 seconds with 12 queries