adBakriGravinaof
New Member
\[code\]function scrollfun(){ var ob = document.getElementById('rowScroll'); ob.style.height ="300px"; ob.style.width = "200px"; }\[/code\]Here \[code\]rowScroll\[/code\] is the \[code\]<div>\[/code\] id. The above code is working properly. But the following code is not working:\[code\]function scrollfun(){ var ob = document.getElementById('rowScroll'); ob.style.height ="30%"; ob.style.width = "20%"; }\[/code\]How can I get this working with percentages?