Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

how to resize window to content

Avatar of PhotoCompManager
PhotoCompManager asked on
Web Languages and StandardsJavaScriptScripting Languages
20 Comments1 Solution1186 ViewsLast Modified:
I'm trying to resize the browser window so that it just fits the content, or has scroll bars if the content is longer than the screen height. (I create the content dynamically in ASPX)
I've put the following in a function and called it on body onload

        window.resizeTo(1020,document.body.style.clientHeight+'px');

but I get zero height. I've also tried with.Height and with a Div that encompasses the whole body, but still get zero height.

Can you suggest as javascript or CSS solution?
ASKER CERTIFIED SOLUTION
Avatar of Michel Plungjan
Commented:
This problem has been solved!
Unlock 1 Answer and 20 Comments.
See Answers