You can try setting the
height[
^] and
width[
^] of the button on your Javascript code.
As for the screen resolution, it would not make sense to base your button sizes on that one because browsers already have the functionality that allows you to zoom pages. You can check the current zoom level of your browser though in Javascript but seems that almost each browser has a their own solution. See
here[
^] for a more detailed explanation.