Reputation: 5575
Please see: http://jsfiddle.net/E4Zgj/227/
How can I change the height of left
, and right
based on the height of middle
(which is dynamic and can change) using HTML
and CSS
?
If 1 is not possible then, how can I change the height of left
, and right
to cover the whole visible screen using HTML
, and CSS
?
Upvotes: 0
Views: 54
Reputation: 76
Granted that this question is not tagged with javascript or specifically jQuery. If you were able to load jQuery you can match the height of the middle element easily.
var middleHeight = $('.middle').height();
$('.left, .right').height(middleHeight);
Upvotes: 0
Reputation: 1741
Question 1 can't be done without Javascript.
Question 2 can be done with using
position:absolute;
min-height:100%;
height:100%;
The height:100%;
is optional but without position:absolute;
it won't work. If you set position:absolute;
you have to set left:80%;
for your right side because otherwise it overlaps your left side.
Upvotes: 1