~~DISCUSSION~~
Yes, Sciter environment provides only a limited support for BMP images since this format is not native WWW format.
<html> <head> </head> <body style="background: url(background.bmp);" > <div style="margin: 50%" > <img src="other.bmp" > </div> </body> </html>Answer: Margin collapsing is in effect here. body top margin and div top margin collapse as if body has 50% top margin and div has no margin defined. To prevent collapsing body has to have border according to margin collapsing rules: http://www.w3.org/TR/CSS21/box.html#collapsing-margins
Something like SciterLoadURI() is needed as a script view.load() native API equivalent.
<html> <head> </head> <body > <div style="width: 100%%; flow: horizontal;" > <div style="border: blue 1px solid;" > <img src="img/logo_oce.png" width="70" height="70" > </div> <div style="width: 100%%; height: 100%%; border: green 1px solid;" > Content 100%% wide </div> <div style="width: 100%%; height: 100%%; border: green 1px solid;" > Content 100%% wide </div> </div> </body> </html>Answer:
If you want first div to have width equal exactly its content (image) then use width:max-intrinsic; <div style="border: blue 1px solid; width:max-intrinsic; " > <img src="img/logo_oce.png" width="70px" height="70px" > </div>By default block elements have width:auto that is exactly width:100%%;
<html> <head> </head> <body> <div style="font: bold 8pt;"> Sample </div> <div style="font: bold 10pt;"> Sample </div> <div style="font: bold 12pt;"> Sample </div> <div style="font: bold 14pt;"> Sample </div> <div style="font: bold 16pt;"> Sample </div> <div style="font: bold 18pt;"> Sample </div> <div style="font: bold 20pt;"> Sample </div> <div style="font: bold 22pt;"> Sample </div> <div style="font: bold 24pt;"> Sample </div> </body> </html>
Note: If you swap size and weight as here font: 24pt bold; would be accepted as correct though.
Note: That one should be fixed in 0.9.3.15