If I alert the element which has a css selector set to width:100% I get it\'s with in px, is there some way to get it in % as
alert
width:100%
px
%
function percentwidth(elem){ var pa= elem.offsetParent || elem; return ((elem.offsetWidth/pa.offsetWidth)*100).toFixed(2)+'%'; }