How to avoid top space and make full dimension in justgage?

2.7k views Asked by At

Is there any option to avoid top space. Actually I am looking solution to show as full width and full height.

enter image description here

demo http://jsfiddle.net/ugFmE/12/

var g = new JustGage({
  id: "spedometer",
  title: "Monthly expense",
  value: 1986, 
  min: 0,
  max: 2450,
  shadowOpacity: 0,
  relativeGaugeSize: true
});
2

There are 2 answers

2
jcruzz92 On

Add some css to the div to make it go up...

#spedometer{ 
    margin-top: -##px 
}

where '##' is the amount of pixels you would like to move the div towards the top..

demo http://jsfiddle.net/ugFmE/17/

0
foxt7ot On

Use style attribute of div tag and change value of top-margin to negative. I hope that would help you

<div id="g1" style= margin-top:-100px;></div>

window.onload = function () {
    var g1 = new JustGage({
        id: "g1",
        value: getRandomInt(0, 100),
        min: 0,
        max: 100,
        relativeGaugeSize: true
    });
}