English 中文(简体)
混合高温管(%和x) a. 保持四分之四,以补足不为平分
原标题:Nested divs with mixed height mode (% & px) Keep the % div fill out space not used by the px div
  • 时间:2011-03-14 13:55:12
  •  标签:
  • html
  • css

I want the "blue" container to always be 70px high, while the previous "green" div always max out the height available when the div is resized with javascript.

我与它在一起,没有找到适当的解决办法。 希望将受到赞赏。

“entergraph

最佳回答

As promised, here s my answer.

rel=“nofollow>>><>Live Demo

<>光>:

<div id="parent">
    <div id="left">height: 100%</div>
    <div id="right">Content</div>
    <div id="rightFooter">height: 70px</div>
</div>

<>CSS:

#parent {
    position: relative;
    height: 200px
}
#left, #right, #rightFooter {
    position: absolute
}
#left {
    width: 200px;
    top: 0;
    bottom: 0;
    left: 0
}
#right {
    top: 0;
    right: 0;
    bottom: 70px;
    left: 200px;
    overflow-y: auto
}
#rightFooter {
    height: 70px;
    right: 0;
    bottom: 0;
    left: 200px
}
问题回答

Made an example for you here :)

您需要留有左侧的浮iv,另外两条右 d也有一个 wrap。

检查:





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签