I want to make simple content page with silverlight with next requirments: Page must contains:
- top space for banners(html)
- center - silverlight component. and he will stretch to fitt page.
- bottom space for banners(html)
Looks quite easy but i faced problem with internet explorer 8. Silverlight component have small size and doesnot stretch. In others browsers its works fine.
Styles:
<style type="text/css">
html, body
{
height: 100%;
overflow: auto;
}
body
{
padding: 0;
margin: 0;
}
#silverlightControlHost
{
height: 100%;
text-align: center;
}
</style>
HTML:
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" style="overflow: hidden;
height: 100%; width: 100%;">
<table frame="none" cellpadding="0" cellspacing="0" style="height: 100%; width: 100%; border:0px solid White;
padding: 0px;">
<tr style="background-color: Red; height: 30px; width: 100%;">
<td>
</td>
</tr>
<tr style="background-color: Blue; height: 100%; width: 100%;">
<td>
<div id="silverlightControlHost" style="height: 100%; width: 100%; background-color: Black;">
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2"
width="100%" height="100%">
<param name="source" value="ClientBin/test.xap" />
<param name="onError" value="onSilverlightError" />
<param name="background" value="white" />
<param name="minRuntimeVersion" value="4.0.50401.0" />
<param name="autoUpgrade" value="true" />
<a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50401.0" style="text-decoration: none">
<img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Получить Microsoft Silverlight"
style="border-style: none" />
</a>
</object>
<iframe id="_sl_historyFrame" style="visibility: hidden; height: 0px; width: 0px;
border: 0px"></iframe>
</div>
</td>
</tr>
<tr style="background-color: Red; height: 30px; width: 100%;">
<td>
</td>
</tr>
</table>
</body>
Chrome(works perfect):
IE8(not so good):
What wrong with it? How to fix it?