A
Andrew Poulos
There's this HTML
<input id="print" type="submit" value="" onclick="printPage();">
and this javascript
if (document.getElementById("print")) {
var prn = document.getElementById("print");
prn.value = str.printbutton;
prn.style.position = "absolute";
prn.style.right = "24px";
prn.style.bottom = "24px";
prn.style.cursor = "pointer";
}
str.printbutton is a string that the user sets earlier.
On IE 7 the button stretches across the entire page, except for 24
pixels on the right hand side. If a width is set then the button honours
it but as I can't know the button label the user will set beforehand I
can't set a width.
Is there a way to get the button to be only as wide as it needs to be
and no more?
Andrew Poulos
<input id="print" type="submit" value="" onclick="printPage();">
and this javascript
if (document.getElementById("print")) {
var prn = document.getElementById("print");
prn.value = str.printbutton;
prn.style.position = "absolute";
prn.style.right = "24px";
prn.style.bottom = "24px";
prn.style.cursor = "pointer";
}
str.printbutton is a string that the user sets earlier.
On IE 7 the button stretches across the entire page, except for 24
pixels on the right hand side. If a width is set then the button honours
it but as I can't know the button label the user will set beforehand I
can't set a width.
Is there a way to get the button to be only as wide as it needs to be
and no more?
Andrew Poulos