Oh no, my layout on my aspx page looks totally messed up in IE9! It's perfect in Chrome though:
But in IE9, it's all out of whack and looks like this:
I finally found out the reason behind this strange display. Apparently IE9 wrapped my "save Note" button, description label, and description textbox in a div and made it float right. And the maincontent holder is showing up twice because IE duplicated it but in the duplicated content holder, there are no controls or anything - just the background color.
Here is the HTML that was generated:
<div class="mainContentHolder">
<span style="display: none;">
<label>File</label>
<label style="width: auto;" id="lblCaseFileID">2011630988 - </label>
</span>
<h3 id="quickNoteHeader">Quick Note: 2011630988 / 10/04/2012 08:47:12 <div style="float: right;">USES CURRENT DATE AND TIME<div></div></div></h3><div style="float: right;"><div>
<span>
<label class="inlineLbl">Description</label>
<input style="width: 82%;" id="txtDescription" name="txtDescription" type="text">
<span style="color: red; display: none;" id="ctl02" class="validation" title="Description is required">*</span>
<input style="width: 75px;" id="saveNote" onclick="saveNewQuickNote()" name="saveNote" value="Save Note" type="button">
</span>
</div>
<input id="hidCaseFileID" name="hidCaseFileID" value="2011630988" type="hidden">
<input id="hidInvestigatorLoggedOnID" name="hidInvestigatorLoggedOnID" value="25" type="hidden">
</div>
<div class="mainContentHolder">
<div style="float: right;">
</div>
This is the content of my .aspx page:
<!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>
</head>
<body>
<form id="form1" runat="server">
<div class="mainContentHolder">
<span style="display:none;">
<label>File</label>
<label style="width:auto;" runat="server" id="lblCaseFileID"></label>
</span>
<h3 runat="server" id="quickNoteHeader">Quick Note</h3>
<span>
<label class="inlineLbl">Description</label>
<input type="text" style="width:82%;" id="txtDescription" runat="server" />
<asp:RequiredFieldValidator class="validation" ErrorMessage="*" Display="Dynamic" ControlToValidate="txtDescription" ToolTip="Description is required" runat="server" />
<input type="button" ID="saveNote" style="width:75px;" Value="Save Note" runat="server" onclick="saveNewQuickNote()" />
</span>
</div>
<asp:HiddenField ID="hidCaseFileID" runat="server" />
<asp:HiddenField ID="hidInvestigatorLoggedOnID" runat="server" />
</form>
</body>
Any ideas on how to fix this? I'm completely stumped about why IE decided to mess things up like this. EDIT: css:
.mainContentHolder
{
margin: 0px;
background-color: #f3f3f3;
border: solid 1px #a1a1a1;
min-width:890px;
width:920px;
height:50px;
}
.mainContentHolder h3
{
font-size:13px;
font-style: normal;
font-variant: normal;
font-weight: normal;
line-height: 20px;
margin-right: 1%;
}
.mainContentHolder label
{
font-size: 11px;
font-style: normal;
font-variant: normal;
font-weight: normal;
line-height: 20px;
margin-bottom: 10px;
margin-right: 1%;
}
.mainContentHolder input
{
width:70px;
}
.ui-dialog
{
font-size:12px;
}
.ui-widget-header
{
background: #8D122B;
}
.ui-datepicker
{
font-size:12px;
}
#quickNoteHeader
{
color: Green;
}
EDIT - Turns out the layout works fine in IE 10, just not in IE9