Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Assign Style Rule to variable--How

Status
Not open for further replies.

dwest100

Technical User
Aug 9, 2003
59
US
Hi folk,
I have an external CSS attached to a page.
i need to capture the css rule for certain styles and assign the value to a variable.
I'm trying this with no luck.

Any advice would be much appreciated.

var Test1=document.styleSheets[0].cssrules[45].style.cssText

Thanks!
 
i think you do that with meta tags actually might be wrong

__________________________________________________________
"The only difference between me and a mad man is that I'm not mad."
- Dali
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top