?
Solved

changing web page row height dynamically

Posted on 2013-01-29
2
Medium Priority
?
257 Views
Last Modified: 2013-02-04
My web page has 3 sections, header area (height 50px), central body area (height 300px) and footer area (height 50px). it will always remain the same.

I have inserted a div between the central body and the footer, and its height is zero by default.

I want to dynamically set its height when the page loads, so that the TOTAL height of all the elements above always fills the browser screen height for all standard screen sizes.

I know how to do this, but i am having difficulty finding the browser height. there are compatibility issue in IE, and also i am getting incorrect results. Please tell me the best way to achieve this
0
Comment
Question by:RTKHOT
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 42

Accepted Solution

by:
sedgwick earned 1200 total points
ID: 38830609
did u try use window dimensions:

var totalWidth = $(window).width() 
var totalHeight = $(window).height()

Open in new window

0
 
LVL 42

Expert Comment

by:sedgwick
ID: 38830611
also check this post to get document height (cross-browser):
Get document height (cross-browser)
function getDocHeight() {
    var D = document;
    return Math.max(
        Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
        Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
        Math.max(D.body.clientHeight, D.documentElement.clientHeight)
    );
}

Open in new window

0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question