HTML/CSS: Create a div that always fills the entire page... and then a resizeable div within it?

I feel like this is an easy question, but for whatever reason I can't figure it out today. I need a div that always fills the entire page, no matter how large that page is. Then I need another div which I can re-size with javascript (mydiv.style.width = x; mydiv.style.height = y;). If the second div is resized to be taller than the existing browser window height, the first div should resize to fit. i.e. If the first div's background color is red, I should *never* see any white background color, because the first div always expands to the size of the entire page. I tried this, it doesn't work because the red background doesn't expand to the size of the entire page: [example of the problem][1] [1]: http://www.academickeys.com/tmp/test.html
What are you ultimately trying to achieve? Putting the scroll_layer inside flashlayer will make the flashlayer to expand with it, as long as the scroll_layer div is in the flow (eg. not floated and statically/relatively positioned)

以上就是HTML/CSS: Create a div that always fills the entire page... and then a resizeable div within it? 的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » HTML5 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏