@Template("<div style=\"{0}\"><div style=\"position:absolute;display:none;"\></div><div>{1}</div></div>")
SafeHtml unsorted(SafeStyles imageWidthStyle, SafeHtml text);
double width = 34.34d;
SafeStyles imageWidthStyle = SafeStylesUtils.fromTrustedString("width:"+width+"px;");
SafeHtml text = SafeHtmlUtils.fromString("blah");
unsorted( imageWidthStyle, text ); // call your template
That is how I'd do it. I had to fix some warnings to this end this morning for some code, so I had to look this usage up. Hope it helps.