I am using a windows based program, coded in Delphi, to generated HTML (and can restrict the browser to MSIE 7 +).
I need absolute, pixel perfect WYSIWYG. However, I am having text-wrap problems.
What looks like this in Delphi
-- -----------------
| aaaa bbb ccc ddd |
--------------------
looks like this in the browser (both MS IE and FF. Although I am targeting MSIE only, I am using FF to have access to FireDebug)
--------------------
| aaaa bbb ccc |
--------------------
ddd
Now, Delphi has an Object Inspector

which allows me to precisely set a control’s top/left/width/height and when generating the HTML, I use those for CSS positioning of each control on the form. e.g.
<fieldset style="position: absolute; top: 56px; left: 32px; width: 185px; height: 13px; ">
<legend> </legend>
<div style="position: absolute; top: 0px; left: 0px; width: 179px; height: 13px;">
Label1 000 111 222 aaa bbb cccc dd
</div>
</fieldset>
But since I am getting text wrap I guess that I am overlooking something, like setting of margin/border/padding. Any ideas what?
Btw, I use Arial 10 as my font for windows/browser comparability, so it shouldn’t be a font size problem.
I think that Delphi must have something akin to the box model, insomuchas it draws the control with a margin (a control starting at 0 left has a visible gap from the left of the form; if I give it width 100 and position another with left =100 there is a visible gap between them).
Any idea how I am going to achieve WYSIWYG? The HTMl must reflect the control layout in the Delphi form.
Try this, is this what you are trying to achieve?