Page 1 of 1

Button Width Setting with Javascript

Posted: Fri Mar 14, 2014 4:45 pm
by Andy Parker

Hi,

I'm using the code below to set the width of a button:

Appery("button1).css("width",buttonwidth+"px");

where buttonwidth is the result of a calculation depending upon screen size.

The problem is, it appears to be ignored, and I can't add an !important to it as it's JS.

Is there a way around this? Obviously I cant use the CSS option as the width required is a calculated figure and not a constant.

regards

Andy.