2013-04-18 90 views
0

我有以下HTML:火狐格物體高度

<div id="wrapper"> 
<div id="radioplayer"> 
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="467" height="26"> 
    <param name="movie" value="http://www.museter.com/ffmp3-config.swf" /> 
    <param name="flashvars" value="url=http://stream.../;&lang=nl&codec=mp3&volume=65&introurl=&autoplay=false&traking=true&jsevents=false&buffering=5&skin=http://www.museter.com/skins/eastanbul/ffmp3-eastanbul.xml&title=Zottebeatjes&welcome=Welkom" /> 
    <param name="wmode" value="transparent" /> 
    <param name="allowscriptaccess" value="always" /> 
    <param name="scale" value="noscale" /> 
    <embed src="http://www.museter.com/ffmp3-config.swf" flashvars="url=http://stream.../;&lang=nl&codec=mp3&volume=65&introurl=&autoplay=false&traking=true&jsevents=false&buffering=5&skin=http://www.museter.com/skins/eastanbul/ffmp3-eastanbul.xml&title=Zottebeatjes&welcome=Welkom" width="467" scale="noscale" height="26" wmode="transparent" allowscriptaccess="always" type="application/x-shockwave-flash" /> 
    </object> 
</div> 
<div id="streaminfobar"> 
    *some info* 
</div> 
</div> 

而這個CSS樣式表:

#wrapper { 
    min-height:100%; 
    width: 100%; 
    position:relative; 
    display: table; 
} 
* {margin:0;padding:0;height:100%;} 
#radioplayer { 
    width: 100%; 
    height:26px; 
    background-color: #222222; 
    text-align:center; 
    display: table-row; 
} 
#streaminfobar { 
    width:100%; 
    height:auto; 
    margin-top:0; 
    background-color: #333333; 
    color: #5E5E5E; 
    display: table-row; 
} 

例如:http://jsfiddle.net/CXBeE/

的問題是,radioplayer DIV必須有高度26像素,在CSS塊中指定。在谷歌瀏覽器中,它確實是26 px,但在Firefox和Internet Explorer中,它的體積大於26像素。

在Firefox中是這樣的:

In firefox

但它應該是這樣的(鉻):

In Google Chrome

我該如何解決這個問題?

+0

你爲什麼把這個放在css中? * {margin:0; padding:0; height:100%;} –

+0

@RupamDatta因爲否則div不會填滿整個頁面,沒有它會有白色邊框 – Kaj

回答

2

變化*{margin:0;padding:0;height:100%;}
變爲body, html{margin:0;padding:0;height:100%;}
你只希望這兩個是100%高,而不是你的代碼中的每個元素。

0

您的HTML缺少結束格。或者這只是這個簡化例子中的一個錯誤?

+0

對不起,這實際上是一個錯誤 – Kaj