To display gauges with their values I tried to use 'position:relative' together with 'left:-<GaugeLen>%'. That works fine in IE Browser but Prince seems to ignore percent values.
If Prince does not support percent in position is there an other solution to position the values to the left (negative values) or right (positive values) of the gauges?
Example:
If Prince does not support percent in position is there an other solution to position the values to the left (negative values) or right (positive values) of the gauges?
Example:
<html>
<head>
<title>Gauge</title>
<style type="text/css">
p {
font-size: 6pt;
margin:0;
padding:0;
}
.gauge {
width:100%;
}
.gauge-positive,
.gauge-negative {
width: 50%;
}
.gauge-positive-gauge,
.gauge-negative-gauge {
border: 1px solid grey;
height: 6pt;
margin: 0;
padding: 0;
}
.gauge-positive-gauge {
background-color: green;
}
.gauge-negative-gauge {
background-color: red;
}
.gauge-negative-value,
.gauge-positive-value {
height: 6pt;
font-size: 6pt;
margin: 0;
padding: 0;
}
.gauge-negative-value {
direction:rtl;
}
tr {
margin:0;
padding:0;
}
td {
margin:0;
padding:0;
border: 1px dotted lightgrey;
}
</style>
</head>
<body style="font-size:14pt;">
<table style="width:100mm;border: 1px solid black; font-size: 6pt;">
<tr>
<td style="width:1px;"><p style="visibility:hidden;">-100.0</p></td>
<td>
<div class="gauge">
<div class="gauge-positive" style="float:right;font-size:1px;"> </div>
<div class="gauge-negative" style="float:right;margin-bottom:-1em;text-align:right;">
<div class="gauge-negative-gauge" style="margin-left:0%;width: 100%;font-size:1px;"> </div>
<div class="gauge-negative-value" style="position:relative;top:-1em;right:100%;">100.0-</div>
</div>
</div>
</td>
<td style="width:1px;"><p style="visibility:hidden;">-100.0</p></td>
</tr>
<tr>
<td><p style="visibility:hidden;">-25.0</p></td>
<td>
<div class="gauge">
<div class="gauge-positive" style="float:right;font-size:1px;"> </div>
<div class="gauge-negative" style="float:right;margin-bottom:-1em;text-align:right;">
<div class="gauge-negative-gauge" style="margin-left:75%;width: 25%;font-size:1px;"></div>
<div class="gauge-negative-value" style="position:relative;top:-1em;right:25%;">25.0-</div>
</div>
</div>
</td>
<td><p style="visibility:hidden;">-25.0</p></td>
</tr>
<tr>
<td style="width:1px;"><p style="visibility:hidden;">100.0</p></td>
<td>
<div class="gauge">
<div class="gauge-negative" style="float:left;font-size:1px;"> </div>
<div class="gauge-positive" style="float:left;margin-bottom:-1em;">
<div class="gauge-positive-gauge" style="width: 100%;font-size:1px;"> </div>
<div class="gauge-positive-value" style="position:relative;top:-1em;left:100%;">100.0</div>
</div>
</div>
</td>
<td><p style="visibility:hidden;">100.0</p></td>
</tr>
<tr>
<td><p style="visibility:hidden;">15.0</p></td>
<td>
<div class="gauge">
<div class="gauge-negative" style="float:left;font-size:1px;"> </div>
<div class="gauge-positive" style="float:left;margin-bottom:-1em;">
<div class="gauge-positive-gauge" style="width: 15%;font-size:1px;"> </div>
<div class="gauge-positive-value" style="position:relative;top:-1em;left:15%;">15.0</div>
</div>
</div>
</td>
<td><p style="visibility:hidden;">15.0</p></td>
</tr>
</table>
</body>
</html>