View Full Version : Javascript can't read from external CSS page

12-28-2006, 03:21 AM
Hello! After a few hours of tracking down an error this is what I've discovered.
If you give an element an inline property, as in

<div id='testDiv' style='display:block'>blah</div>
then an alert(document.getElementById('testDiv').style.display) will of course give you "block." But, if you give the element a property through an external CSS file, the same alert comes up empty!

This is causing me big problems as I've discovered and is ridiculous. Can javascript read properties from external CSS sheets? What little thing am I missing? Thanks,

12-28-2006, 03:30 AM
Is this link helpful?



12-28-2006, 03:39 AM
This is precisely what I need!

Thank you so much for your perfect and prompt reply.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum