As for me, its definitely not an ActiveX control-related size calculation problem.
What reinforces my belief in this is that an attempt to run the html source from the OP in firefox, for example, make you end up with the same 'issue'.
If it is question to keep the html source and force the GUI control to fit its size, I can't think of any solution.
I would assume that the aim here is to create some kind of frame encompassing the page, correct me if I'm wrong
Mipha. If so, it might be possible to do this using a table element but div elements are the usual candidates - they are more flexible. The easiest way I can think of is to use four fixed div. An element positioned in a fixed position is positioned relative to the browser window; that is, it always remains in the same place, even if the page scrolls. With this technique, you can use both
left: 0; right: 0; and
top: 0; bottom: 0; in place of
width: 100%; and
height: 100%; respectively:
Code: Select all
#NoEnv
#SingleInstance force
#Warn
html =
(
<!DOCTYPE html>
<html>
<head>
<style type=text/css>
div {
position: fixed;
background: red;
}
.v {
top: 0;
bottom: 0;
width: 2px;
}
.h {
left: 0;
right: 0;
height: 2px;
}
#left {
left: 0;
}
#right {
right: 0;
}
#top {
top: 0;
}
#bottom {
bottom: 0;
}
</style>
</head>
<body>
<div class="v" id="left"></div><div class="v" id="right"></div><div class="h" id="top"></div><div class="h" id="bottom"></div>
</body>
</html>
)
Gui,Margin, 0, 0
Gui, Add, ActiveX, W500 H500 vdoc, HTMLFile
doc.write(html), doc.close()
GUI, Show, AutoSize
return
Css is definitely not my cup of tea - it might exist a nicer way to do this. Otherwise, both the
before: and
after: pseudo-property or the
outline property could be helpful.
Hope this helps.