izikon
08-31-2003, 05:01 AM
i have this script:
<style>
.myClass {
width:100%;
left:0px;
}
</style>
<div class="myStyle" id="myDiv">
blah blah
</div>
<script>
alert(myDiv.style.width)
</script>
the alert return blank
how can i get the class properties
when i using in elemnt style attribute the alert
return me the property i need
but i need to use class and not style attributes
because i'm using dynamic classes inside my page
please help me!!....
Izikon
<style>
.myClass {
width:100%;
left:0px;
}
</style>
<div class="myStyle" id="myDiv">
blah blah
</div>
<script>
alert(myDiv.style.width)
</script>
the alert return blank
how can i get the class properties
when i using in elemnt style attribute the alert
return me the property i need
but i need to use class and not style attributes
because i'm using dynamic classes inside my page
please help me!!....
Izikon