I have an aspx page with 1 table containing 2 rows:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style>
html, body
{
height: 100%;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<table style="height:100%; width:100%">
<tr>
<td>
<img src="img/Logo.png" />
</td>
</tr>
<tr>
<td style="height:100%;">
<asp:Silverlight
ID="sllUI"
runat="server"
Source="~/ClientBin/My.Silverlight.UI.xap"
MinimumVersion="2.0.31005.0"
Width="100%"
Height="100%"
OnPluginLoaded="sllUI_OnPluginLoaded"
PluginBackground="Transparent"
Windowless="true">
</asp:Silverlight>
</td>
</tr>
</table>
</div>
</form>
<body>
</html>
The table fills the page correctly, and the bottom row fills grows to the remaining height of the table that the top row doesn't fill, which is what I want. The problem is that the silverlight control takes on the height of the page, not the height of the row that it is in, which causes my page to get scroll bars because the top of the silver light control is at the top of the row it's in, but it's hight is 100% of the browser. I don't know if this is caused by my html or by silverlight. All my silverlight user controls are set to auto height & width. I've also tried using divs instead of the table and I get the same result. How can I fix this?
I've found that (at least in IE7) the doctype I've specified causes it to use standards mode IE6, but if I take the doctype out it goes into quirks mode IE5 (I find the mode by using DebugBar v5.1.1). Quirks mode causes it to display properly, but I think I'd rather avoid quirks mode if I can get the display correct in standard mode.