Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 225
  • Last Modified:

Is there is a Java Script that will Find is Res of the screen and resize mysite to fit

Hi all
I know it is not a good fix but i need this as a quick one to make it work, i was wonding if there was a java script out there that i can add to my site so it resizes it to fit on there screen, i need this one in a rush as i need to show the client tomorrow, he failted to tell me and even in the spec that there is a screen size he wanted

any help would be great
0
awolarczuk
Asked:
awolarczuk
1 Solution
 
AmickCommented:
Size information is available in the screen object.

alert('Screen resolution is '+screen.width+'x'+screen.height)

You may use this information to direct your user to an appropriate page, resize your browser window, or to modify the content of your web page.

Resize window:
http://www.codeave.com/javascript/code.asp?u_log=7065

Modify HTML:
http://www.w3schools.com/jsref/dom_obj_document.asp
0
 
COBOLdinosaurCommented:
There is no way of knowing what the script needs to change without seeing HTML and CSS.  If elements dimensions are expressed in percentages then all that is needed is to set the width if the body to 100%.  However if there are fixed dimensions on all or some elements or if absolute positioning is used, then it will required detailed scripting for each such page.

So what exactly does the code currently look like?

0
 
awolarczukAuthor Commented:
i am at work atm and will show you the code tonight thanks for the feed back
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now