View Full Version : Trying to Get Inputs to Have Consistent Width

05-17-2008, 04:22 AM
Hi everyone,

I have a little issue that's really buggin me. I just finished validating my home page (www.infiniteguitar.com) with the following doctype:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

The rest of the site's pages however have this incomplete doctype:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

I noticed though that the difference in doctype affects the size of form inputs. If you look at the top right, you'll see the login area. When going from the home page to any other page, the inputs shrink in size by a few pixels. Very annoying. Is there a way I can make it to where they don't change in size even though different doctypes are being used?

Here's the current css that I'm using for the inputs:

.loginbox {

font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
color: #000000;
background: #FFFFFF;
border-top: 1px solid #777777;
border-right: 1px solid #777777;
border-bottom: 1px solid #777777;
border-left: 1px solid #777777;

Is there a different way I can define the width of the inputs where they are consistent regardless of doctype? Any help would be much appreciated. Thank you!!

05-17-2008, 07:43 AM
Try this at the start of your css. It resets browsers to zero at the start. It is easy to implement and sometimes works wonders.

* {
margin: 0;
padding: 0;
html, body {


05-17-2008, 09:53 AM
Could you also share to us the reason behind using incomplete doctypes :)