nevets2001uk
IS-IT--Management
Thanks to the help of some members of this site I've started to get my head around coding with a DOCTYPE for cross browser compliance of my website.
I'm now stuck trying to get a fairly simple input form to work styled using CSS. I attached the code below. In IE it's displaying properly with all of the input fields within the containing DIV, formatted correctly. In firefox however most of the formatting is correct except the final input box is not the right size and drops over the top of the grey containing div. The pushes the next paragraph to the right of the page.
I did wonder if it was to do with having the height element in the 'row' div but if I take it out it works in neither.
Is this something silly I'm doing?
HTML
CSS
Steve G (MCP)
I'm now stuck trying to get a fairly simple input form to work styled using CSS. I attached the code below. In IE it's displaying properly with all of the input fields within the containing DIV, formatted correctly. In firefox however most of the formatting is correct except the final input box is not the right size and drops over the top of the grey containing div. The pushes the next paragraph to the right of the page.
I did wonder if it was to do with having the height element in the 'row' div but if I take it out it works in neither.
Is this something silly I'm doing?
HTML
Code:
<div class="form">
<div class="row">
<span class="label">Name:</span>
<span class="formw"><asp:TextBox ID="txtName" CssClass="textbox" Runat="server" /></span></div>
<div class="row">
<span class="label">Email:</span>
<span class="formw"><asp:TextBox ID="txtEmail" CssClass="textbox" Runat="server" /></span>
</div>
<div class="row">
<span class="label">Subject:</span>
<span class="formw"><asp:TextBox ID="txtSubject" CssClass="textbox" Runat="server" /></span>
</div>
<div class="row">
<span class="label">Message:</span>
<span class="formw"><asp:TextBox ID="txtContent" Font-Name="Arial" TextMode="MultiLine" Height="150px" Width="500px"
CssClass="textbox" Runat="server" /></span>
</div>
</div>
<p>Test</p>
CSS
Code:
/* CSS FOR FORMS LAYOUT */
div.form {
background : #DEDEDE;
border: 1px dotted #333;
padding: 10px;
margin-bottom : 15px;
}
div.row {
clear: both;
height : 25px;
/*padding-top: 10px;*/
}
div.row span.label {
float: left;
width: 100px;
text-align: left;
font-weight : bold;
}
div.row span.formw {
float: left;
width: 550px;
text-align: left;
}
.textbox {
width : 180px;
border : 1px solid #878787;
}
Steve G (MCP)