html - Delphi & CSS - box model question -
i using windows based program, coded in delphi, generated html (and can restrict browser msie 7 +).
i need absolute, pixel perfect wysiwyg. however, having text-wrap problems.
what looks in delphi
-- ----------------- | aaaa bbb ccc ddd | --------------------
looks in browser (both ms ie , ff. although targeting msie only, using ff have access firedebug)
-------------------- | aaaa bbb ccc | -------------------- ddd
now, delphi has object inspector
which allows me precisely set control's top/left/width/height , when generating html, use css positioning of each control on 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 getting text wrap guess overlooking something, setting of margin/border/padding. ideas what?
btw, use arial 10 font windows/browser comparability, shouldn't font size problem.
i think delphi must have akin box model, insomuchas draws control margin (a control starting @ 0 left has visible gap left of form; if give width 100 , position left =100 there visible gap between them).
any idea how going achieve wysiwyg? html must reflect control layout in delphi form.
try this, trying achieve?
<html> <head> </head> <body> <form style="margin:0 0 0 0; padding:0 0 0 0;"> <fieldset style="position: absolute; top: 56px; left: 32px; width: 185px; height: 18px; "> <legend></legend> <div style="text-align: center; position: absolute; top: 0px; left: 0px; width: 179px; height: 18px;">aaa bbb cccc dd</div> </fieldset> </form> </html>
Comments
Post a Comment