2010-03-22 37 views
1

重新设置CSS代码我使用的CSS设置来重置一些常用物品。代码是这样的:表单按钮

html, body, div, h1, h2, h3, h4, ul, ol, li, form, input, fieldset, textarea { 
    margin: 0; 
    padding: 0; 
    border: 0; 
    font-size: 100%; 
} 
ul {list-style: none outside none;} 
img, fieldset {border: 0;} 
h1, h2, h3, h4 {font-weight: normal;} 
em {font-style: italic;} 
strong {font-weight: bold;} 

我知道有YUI和梅耶的重置,但我使用这一个。现在

,我遇到的问题是,我不能让提交按钮,再看看正常。我当然可以从列表中删除input并完成它,但我想知道如何恢复,因为我将来可能需要它。

回答

1
input[type="submit"] 
{ 
    background-color: buttonface; 
    border: 2px outset buttonface; 
    color: buttontext; 
} 
+0

此作品在Chrome,但不是IE8。 – HaleFx

+0

这不会恢复最新的Firefox中的风格,它有圆角。 – yitwail

0

这可能是通过你使用JavaScript或者甚至只是通过像火狐,以获得正确的价值观看着它改变了性质遍历一个好主意,那么你就可以将它们设置为正确的默认值。

从内存我认为在IE,FireFox和Safari之间的按钮的默认大小有相当显着的尺寸差异 - 我真的不使用歌剧,但我认为那里有大小问题 - 所以如果你是然后设置填充在CSS中的按钮上,它可能无法在Safari和Firefox中正确渲染。