css - How to change last child with inline style -
so have element want send via email, style has defined inline. style applied array of element. need last element different style there way it?
<div class='label' style=' margin-bottom: 5px; min-height: .75em; width: 8em; font-weight:bold; font-size:1.2em; color:#333; display: inline-block;'>$key: </div>
i assume using javascript said elements in array. here how can access last element , apply style it:
var last = arrayname.length -1; arrayname[last].style.cssproperty = 'value';
where have replace arrayname array, cssproperty property want change , value value of property. example,
arrayname[last].style.color='red';
Comments
Post a Comment