문제

I have a popup which has a height of about 70% of the screen. I this popup I have 2 divs,

  1. the header-div with a fixed height of e.g. 20px
  2. and a content-div which should use the rest of height available.

Currently I use a jquery function to get the rest height and assign it to the content-div

    var popup  = $("#popup").height();
    var header = $("#header").height();
    $("#content").height(popup-header);

Is there another/better way to do that, or is it possible to use css only?

Here's a jsfiddle, in the example the content-div is set to 95% which results in the div beeing to high.

http://jsfiddle.net/JhN4j/6/

올바른 솔루션이 없습니다

다른 팁

Is this what you're looking for: jsfiddle.net/v6x35/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top