tags:

views:

34

answers:

1

Using this code firefox 3.5.9 will display input text in the top part of the input field. Safari and Opera will center it.

How do I make Firefox align the text like the other two browsers?

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd"&gt;
<head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
    <title>Test</title>
    <style type="text/css">
        #q {
            padding:0;
            height: 30px;
            font-size:18px;
            line-height:20px;
        }
    </style>
</head>
<body>
<input type="text" value="Text alignment" id="q">    
</body>
</html>  
+1  A: 

forget the height and just set padding to give the height you are after.

matpol
Padding the text field triggers other inconsistencies with opera and safari, so I was hoping to avoid that.
Hobhouse
look at your stats firefox probably has more users than safari or opera so is more important to fix.
matpol