Get an elements style value as it is in the .css file

Dave <[email protected]>
Newsgroups gmane.comp.mozilla.devel.dom
Organization http://groups.google.com
Message-ID <8da1480d-52e8-431a-ada7-7a9369926fe2@g31g2000yqc.googlegroups.com>
Hi

How do I, via javascript, get an elements style value as it is in
the .css file, and not the computed value.
For #span, in the code below, I would like to get the value 167% and
not 22px.


So are there an direct way to get that value just as you would when
using, window.getComputedStyle(element, pseudoElt) or element.style.


Thanks / Dave


test.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Test</title>
    <link rel="stylesheet" type="text/css" href="test.css" />
</head>
<body>
    <p id="p">Lalala lalala <span id="span">hmm</span> lalala lalala</
p>
</body>
</html>


test.css
body{font-size:13px;}
#p{font-size:100%;}
#span{font-size:167%;color:green;}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.