Advertisement

05.13.2008 at 06:39AM PDT, ID: 23397673
[x]
Attachment Details

Problem with IE7, CSS div tags

Asked by G0ggy in Cascading Style Sheets (CSS), Programming for ASP.NET, .NET Framework 2.0

Tags: CSS, ASP.NET, .NET 2.0

Hi all,

I have a problem with a website I'm constructing. Being a good boy, I've created several div classes to emulate a form (see code snippet) so as not to use HTML tables. In Internet Explorer 6 (6.0.2900.2180) the form display perfectly, however in Internet Explorer 7 the div's appear to collapse in on themselves (please see the attached two images).

How can I stop this?Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
.formwrapper
{
	width:100%;
	background-color:#b4cde6;
	border:dotted 1px #cccccc;
}
 
.formlinewrapper
{
	width:100%;
	margin-bottom:10px;
}
 
.formprompt
{
	display:block;
	width:25%;
	font-family:Tahoma;
	font-weight:Normal;
	font-size:13px;
	float:left;
	height:28px;
	padding-left:5px;
	padding-top:5px;
	text-align:left;
}
 
.forminput
{
	display:block;
	width:73%;
	float:right;
	height:28px;
	padding-top:5px;
	text-align:left;
	font-family:Verdana;
	font-weight:normal;
	font-size:12px;
}
 
.formmessages
{
	width:100%;
	padding-left:5px;
	padding-right:5px;
	padding-top:5px;
	padding-bottom:5px;
	text-align:left;
	font-family:Verdana;
	font-weight:normal;
	font-size:12px;
	color:#0033ff;
}
 
.requiredfieldinformation
{
	font-family:Tahoma;
	font-size:12px;
	padding-left:2%;
	padding-bottom:10px;
	padding-top:10px;
	border-bottom:dotted 1px #464646;
	vertical-align:middle;
	width:15%;
}
 
Example Form:
 
<div class="formwrapper">
    <div class="formlinewrapper">
        <div class="formprompt">
            <asp:Label ID="lblDOB" Text="Date of Birth" runat="server"></asp:Label>
        </div>
        <div class="forminput">
            <table cellspacing="0" cellpadding="0" width="280px" border="0">
            <tbody>
            <tr>
                <td align="left">
                    <asp:DropDownList id="drpCalMonth" Runat="Server" AutoPostBack="True" OnSelectedIndexChanged="Set_Calendar"></asp:DropDownList>
                </td>
                <td align="right">
                    <asp:DropDownList id="drpCalYear" Runat="Server" AutoPostBack="True" OnSelectedIndexChanged="Set_Calendar"></asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:Calendar id="myCalendar" SkinID="formcalendar" Width="280px" OnSelectionChanged="SetTextboxDate" Runat="Server"></asp:Calendar>                
                </td>
            </tr>
            </tbody>
            </table>
            <br />
            <asp:Label ID="lblDOBError" Text="Please select your date of birth!" SkinID="fieldError" Visible="false" runat="server"></asp:Label>
        </div>
    </div>
    
    <div class="formlinewrapper">
        <div class="formprompt">
            <asp:Label ID="lblSelectedDate" Text="Selected Date" runat="server"></asp:Label>
        </div>
        
        <div class="forminput">
            <asp:TextBox ID="txtValCalendar" Enabled="false" runat="server"></asp:TextBox> 
            <br />
            <asp:RequiredFieldValidator ID="rfvCalendar" ControlToValidate="txtValCalendar" ErrorMessage="Please select your date of birth" Display="Dynamic" SkinID="fielderror" runat="server"></asp:RequiredFieldValidator>
        </div>
    </div>
    
    <div class="formlinewrapper">
        <div class="formprompt">
            <asp:Label ID="lblMobile" Text="Mobile Number" runat="server"></asp:Label>
        </div>
        <div class="forminput">
            <asp:TextBox ID="txtMobileNumber" Width="200px" runat="server"></asp:TextBox>
        </div>
    </div>
    
    <div class="formlinewrapper">
        <div class="formprompt">
            <asp:Label ID="lblLandline" Text="Landline" runat="server"></asp:Label>
        </div>
        <div class="forminput">
            <asp:TextBox ID="txtLandline" runat="server"></asp:TextBox>
        </div>
    </div>
    
    
    <div class="forminput">
        <asp:Button ID="btnSave" Text="Save Profile" runat="server" />&nbsp;
        <asp:Button ID="btnCancel" Text="Cancel" runat="server" />
    </div>
</div>
[+][-]05.13.2008 at 06:47AM PDT, ID: 21554966

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.13.2008 at 06:51AM PDT, ID: 21554997

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.13.2008 at 07:23AM PDT, ID: 21555301

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.13.2008 at 07:27AM PDT, ID: 21555354

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.13.2008 at 07:31AM PDT, ID: 21555402

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.13.2008 at 07:36AM PDT, ID: 21555444

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.13.2008 at 09:32AM PDT, ID: 21556736

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.13.2008 at 10:32AM PDT, ID: 21557318

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.14.2008 at 12:56AM PDT, ID: 21561925

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.14.2008 at 02:08AM PDT, ID: 21562243

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.14.2008 at 02:25AM PDT, ID: 21562321

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.14.2008 at 03:25AM PDT, ID: 21562591

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.14.2008 at 03:26AM PDT, ID: 21562595

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.14.2008 at 03:32AM PDT, ID: 21562622

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.14.2008 at 04:12AM PDT, ID: 21562836

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.14.2008 at 04:14AM PDT, ID: 21562849

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.14.2008 at 04:24AM PDT, ID: 21562928

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.14.2008 at 06:42AM PDT, ID: 21564045

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Cascading Style Sheets (CSS), Programming for ASP.NET, .NET Framework 2.0
Tags: CSS, ASP.NET, .NET 2.0
Sign Up Now!
Solution Provided By: gwkg
Participating Experts: 3
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628