Controlling the web browser screen height and width


I want to write a simple app. I have my default page where I will put my details. However, when it loads, I do not want to be shown in full screen of the browser. Instead it should be in a controlled manner. Lets say I want the browser to be resized to 800x600(just like you have popups). Is there a way to control this?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ted BouskillSenior Software DeveloperCommented:
No.  You are running in a sandbox that allows only read-only access to such attributes.  With a JavaScript popup window you can set the height width however most people block popups because they can be dangerous and are definitely annoying.
Shaun KlineLead Software EngineerCommented:
If you are only concerned that your details do not stretch, you could wrap your details in a DIV tag and give the tag a defined width.
DoubtManAuthor Commented:
Hi Shaun,
Yes my concern is only for details not to stretch. Shaun can you please elaborate a bit or script that for me so that I know how that can be accomplished?

Introduction to Web Design

Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.

Ted BouskillSenior Software DeveloperCommented:
If you are working in ASP.NET then use a Panel tag and set the width attribute.  The Panel is converted to a DIV in ASP.NET.
Kamal KhaleefaInformation Security SpecialistCommented:
also you can use a table with fix size or use a gridview whith fiz size

Alan WarrenApplications DeveloperCommented:
An Ajax ModalPopup is totally resizable and doesn't alarm popup blockers.

Respectfully yours,
Shaun KlineLead Software EngineerCommented:
As tedbilly said, a Panel control will work. If you have web accessibility concerns try to avoid using a table for layout purposes, as it requires additional configuration so that screen readers can handle them.
DoubtManAuthor Commented:
For some reason I couldnt get this work to my favour.

Can somebody please tell me how to put a table that will have a fixed size on the browser(not matter what screen size it is). Lets say I want a table always having 800x600 size. ?
Shaun KlineLead Software EngineerCommented:
Try this:
<table width="800">
<tr height="600">
<td width="100%"><!-- Content Here --></td>
Ted BouskillSenior Software DeveloperCommented:
You have to add style='table-layout:fixed' otherwise the table can grow.  The width and height are actually "minimum" values, not guaranteed to stay that size if you put an image larger than 800 it will grow bigger unless you use the style setting I provided.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
DoubtManAuthor Commented:
Thanks. The key was setting up the table to fixed.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.