我有以下的HTML代碼:CSS - 爲什麼文件上傳控件不遵循CSS寬度規則?
<input type='file' class="" maxlength="96" size="16" value="" name='headshot' id='headshot' style="width:21.5em;"/>
看來,「大小」值控制「爆頭」,而不是CSS的實際寬度。 爲了使它成爲一個想法寬度,我不得不使用下面的代碼:
<input type='file' class="" maxlength="96" size="32" value="" name='headshot' id='headshot' style="width:21.5em;"/>
你知道爲什麼此處的CSS不起作用?我已經在Firefox 3.6.8中測試了上面的代碼。
謝謝
我不認爲這會工作在這種情況下。 !重要的是爲了覆蓋其他CSS值。如果瀏覽器不讓正常的CSS覆蓋的大小屬性,它不會,如果你將其標記改變!重要... – 2010-07-28 04:18:24