1

幅が固定されたサイドバーと高さが固定されたボトムバーを備えた、単なる iframe である Web ページを表示したいと考えています。

次のようになります。ここに画像の説明を入力

これは私が今いるところですが、うまくいきません:

<style>
body {margin:0;overflow:hidden;background-color:#f4f4f4;}
#iframe {position:absolute;left:0px;top:0px; width:100%; height:100%; padding:0px 200px 100px 0px;}
#bars {width:100%;height:100%;}
#bottombar {width:100%; height: 100px; position: absolute; bottom: 0; background: grey}
#sidebar {width:200px; height: 100%; position: absolute; right: 0;background: grey}
</style>


<iframe id="iframe" name="iframe1" frameborder="0" height="100%" width="100%" src="http://someurl.com"></iframe>

<div id="bars">
     <div id="bottombar"></div>
     <div id="sidebar"></div>
</div>

どんな助けでも大歓迎です!

4

2 に答える 2

0

あなたのコードは問題なく動作しているようです。どのブラウザ/バージョンでテストしていますか? Firefox などの一部のブラウザーでは、特定の要素を正しく表示するには、高さに加えて「最小高さ」を設定する必要があります。Internet Explorer にも、CSS に関する多くの問題があります。より多くのコンテキストを提供してください。

于 2013-06-20T01:15:36.483 に答える