Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

How do I ensure that the size of input boxes are equal in a form across all browsers?

Avatar of bayross
bayross asked on
CSSHTMLWeb Browsers
4 Comments1 Solution242 ViewsLast Modified:
I've created a registration form built using DIV's.  It has in-iine styling.  The form renders perfectly across Opera 9.X, Firefox 3.X, Chrome 1.X.

However in IE 8.X two input boxes (type="password" render with incorrect widths.

I've included the code spec below and a grab of the IE 8 screen.

Can anyone help me fix this please?
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Tableless Form Using DIVs</title>
 
<link rel="stylesheet" type="text/css" href="regform.css" />
 
<style type="text/css">
	@charset "utf-8";
	/* CSS Document */
	
	/* Styling HTML Elements  */
	html, body
	{
	padding:0;
	border:0;
	font-family:Arial, Helvetica, sans-serif;
	font-size:10pt;
	font-weight:normal;
	color: #000000; 
	}
	
	
	legend{
	border:1px solid #000000;
	padding:5px;
	margin-left:15px;
	background-color:#FFFFCC;
	}
	
	
	/* Main DIV which wraps the Registration form */
	.wrapper
	{
	width: 500px;
	padding: 20px;
	height: auto;
	}
	
	/* DIV holding the labels*/
	.lbls
	{
	width: 230px;
	margin: 0px;
	padding: 0px; 
	
	float: left;
	text-align: right;
	}
	
	/* DIV holding the de objects*/
	.deObjs
	{
	width: 230px;
	margin: 0px;
	padding: 0px; 
	
	float: right; 
	
	text-align: left;
	}
	
	.clr
	{
	clear: both;
	padding: 4px;
	}
</style>
 
</head>
 
<body>
 
<center>
 
<div class="wrapper">
 
    <form name="frmRegister" method="post" action="#">
    
        <fieldset>
        	<legend> Member Registration </legend>
        
            	<div class="lbls">Your name <strong>:</strong></div> 
                <div class="deObjs"><input type="text" value="" title="Please enter your name" name="txtName" id="txtName" maxlength="250" size="30" /></div>
                <div class="clr"></div>
            
            
            	<div class="lbls">E-Mail <strong>:</strong></div> 
                <div class="deObjs"><input type="text" value="" title="Please enter a EmailID" name="txtEmail" id="txtEmail" maxlength="250" size="30" /></div>
            	<div class="clr"></div>
            
            
            	<div class="lbls">Password <strong>:</strong></div> 
                <div class="deObjs"><input type="password" value="" title="Please enter a password" name="txtPassword" id="txtPassword" maxlength="250" size="30" /></div>
            	<div class="clr"></div>
            
            
            	<div class="lbls">Confirm password <strong>:</strong></div> 
                <div class="deObjs"><input type="password" value="" title="Please confirm your password" name="txtConfirmPassword" id="txtConfirmPassword" maxlength="250" size="30" /></div> 
            	<div class="clr"></div>
            
            
            	<div class="lbls">Select a user type <strong>:</strong></div> 
                <div class="deObjs"> 
                    <select name="optRegUserType" id="optRegUserType" tabindex="6" title="Please select a user type" >
                        <option value="1" selected="selected" >Data Entry Operator</option>
                        <option value="2">Programmer</option>
                        <option value="3">Business Associate</option>
                        <option value="4">Network Partner</option>
                        <option value="5">Administrator</option>
                    </select> 
	            </div>
                <div class="clr"></div>
            
            
            	<div class="lbls">&nbsp;</div> 
                <div class="deObjs"><input type="checkbox" name="i_agree" value="1" /> I agree to the terms &amp; conditions</div>
           		<div class="clr"></div>
            
           
            	<div class="lbls">&nbsp;</div>
                <div class="deObjs"><input class="button" type="submit" name="btnSubmit" value="Send Information" /></div>
            	 <div class="clr"></div>
            
            <div class="clr"></div>
        
        </fieldset>
    
    </form>
 
</div>
 
</center>
 
</body>
</html>
regform.jpg
ASKER CERTIFIED SOLUTION
Avatar of David S.
David S.Flag of United States of America imageConsultant & Challenge Subduer
Commented:
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answers