<html>
<head>
<style type="text/css">
#theInput
{
border:solid 1px gray;
height:20px;
}
#theButton
{
border:solid 1px gray;
height:20px;
}
</style>
</head>
<body>
<input type="text" id="theInput"><input type="button" value=" Go " id="theButton">
<body>
</html>
在Firefox中渲染前一個按鈕時,該按鈕比文本字段高出約1px。如何解決這個問題? 沒有指定文檔類型,高度在Chrome中是完美的,甚至令人驚訝的是IE6,但Firefox中沒有?如何正確呈現Firefox中文本字段旁邊的按鈕?
即使它在現代的DOCTYPE背景聽起來有些不可思議:造型按鈕比文本框高2px以使它們同樣高,這是正確的答案。投了票。 – Bazzz 2010-11-24 07:17:55