html 100% 高度和 200px 下边距?
请一些聪明的人帮我设计这个页面布局或者告诉我是否可能?
尝试嵌入一些随浏览器调整大小但左侧边距为 400 像素、底部边距为 200 像素的 Flash 内容。已设法获得左侧边距,但无法使底部边距留在浏览器内。
我的 div 看起来像这样:
<div style="height:100%;margin-left:400px;">
<div id="flashcontent"></div>
</div>
swf 与 swfobject 一起动态嵌入到 flashcontent div 中,对此的任何帮助将不胜感激。
麦克风
please can some brilliant person help me with this page layout or tell me if it is possible?
Trying to embed some flash content which resizes with the browser but has a 400px margin on the left and a 200px margin at the bottom. Have managed to get the margin on the left but cannot get the bottom margin to stay within the browser.
My div looks like this:
<div style="height:100%;margin-left:400px;">
<div id="flashcontent"></div>
</div>
The swf is embedded with swfobject into the flashcontent div dynamically, Any help with this would be greatly appreciated.
Mike
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您可以承受不支持 IE6 的后果,我想您可以使用
position:fixed
。它不是很优雅,但从它的声音来看(您似乎没有在此页面上需要考虑任何其他布局注意事项),它可能会这样做。
我现在无法对此进行测试,但
flashcontent
div 现在应该能够根据外围 div 调整大小。If you can afford not to support IE6, I guess you could work with
position: fixed
.It's not very elegant but from the sound of it (you don't seem to have any other layout considerations to take care of on this page), it might do.
I can't test this right now, but the
flashcontent
div should now be able to resize according to the outlying div.Pekkas的答案非常好,我没有考虑设置所有边缘的选项。但我也提出了这个表建议,它应该适用于自诞生以来的几乎所有浏览器。
Pekkas answer is pretty good, I didn't consider the option of setting all edges. But I also made this table proposal, which should work in just about all browsers since the dawn of time.