Click to See Complete Forum and Search --> : EDIT a linked CSS file


Mitsukai
May 9th, 2008, 08:53 AM
hi i have a CSS file loaded through the LINK tag, is there anyway i can edit this stylesheet through javascript?

Alsvha
May 9th, 2008, 09:16 AM
I don't think you can alter/edit the CSS file via JavaScript, but you can alter the classes and styles on HTML objects in the rendered DOM tree via JavaScript, so you can change it that way.

Mitsukai
May 9th, 2008, 09:43 AM
i need to edit the css file... the properties of the css must be loaded in memory somewhere.

Mitsukai
May 10th, 2008, 08:50 AM
ok this is what i did

get the HREF from the linked css.
delete the link node.
use AJAX to recieve css.
edit csss.
add style node and put text in it.

PeejAvery
May 10th, 2008, 09:55 AM
Why don't you just create your own class and then change the className property?

Mitsukai
May 10th, 2008, 12:33 PM
cus i need to edit the css file not the class >.>