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">
<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;
}
</sty开发者_JS百科le>
</head>
<body>
<input type="text" value="Text alignment" id="q">
</body>
</html>
forget the height and just set padding to give the height you are after.
精彩评论