I am using JSignature to accept the signature. How can i increase the default height? I tried giving height to the signature div but not working as expected.
Code:
<div id="signature" style="background-color:#fff9cb;border:0px;height:200px"></div>
How to fix this?
I am using JSignature to accept the signature. How can i increase the default height? I tried giving height to the signature div but not working as expected.
Code:
<div id="signature" style="background-color:#fff9cb;border:0px;height:200px"></div>
How to fix this?
Share Improve this question asked May 21, 2014 at 6:44 user3554548user3554548 852 silver badges7 bronze badges 2- I am using github./willowsystems/jSignature to capture the signature. The Html code is mentioned above to add the Jsignature canvas element. It takes the height dynamically based on screen width and height. I would like to increase the height to 200px. – user3554548 Commented May 21, 2014 at 6:51
- Any idea on how to fix this. – user3554548 Commented May 21, 2014 at 7:56
3 Answers
Reset to default 3replace this line in jSignature Sample
var $sigdiv = $("#signature").jSignature({ 'UndoButton': true })
to
var $sigdiv = $("#signature").jSignature({ 'UndoButton': true, 'width': 400, 'height': 400 })
I've had trouble altering the size or the line width of the signature box in <div>
(capture) and <img>
(display) tags. Try modifying the size with jQuery (and make sure you have jSignature.js added to your project):
<div id="mySignatureBox" style="background:#000000; color:#ffffff"></div>
$('#mySignatureBox').jSignature({ lineWidth: 1, width: 700, height: 200 });
It seems you can also use percentage values, this did the job for me:
$('#signature').jSignature({
width: '100%',
height: 250
});