Before loading my page i want to make some modification on class style.
The style class is included in MyStyle.css
.divNew {
float: left;
margin: 10px 5px 5px 25px;
}
And loading a new page i want to modify/overload the margin and to add height. Any suggestion? This is what i've tried:
function pageLoad() {
var theRules = new Array();
if (document.styleSheets[0].cssRules) {
theRules = document.styleSheets[0].cssRules;
} else if (document.styleSheets[0].rules) {
theRules = document.styleSheets[0].rules;
}
for (n in theRules) {
if (theRules[n].selectorText == 'divNew') { ? ? ? ?
}
}
}
document readysuites you just fine.