Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resizing content in web page according to resolution

Status
Not open for further replies.
Dec 4, 2004
10
0
0
US
Hi techs...

I want my web page to resize according to the end-user's screen resolution. What is it that I need to do ?

Highly appreciate your help.

-AKS
 
This should help
Code:
var correctwidth=1024 //redirect script for 800x600
var correctheight=768
if (screen.width<correctwidth||screen.height<correctheight)
location.href="800x600.htm"

Glen
 
Here's how you resize a window according to the size of the screen.

Code:
<html>

<head>

<script>
<!--

function resize() {
    var w = screen.availWidth;
    var h = screen.availHeight;
    window.resizeTo(w, h);
    window.moveTo(0, 0);
}

-->
</script>

</head>

<body onload="resize();">
Stuff
</body>


</html>

*cLFlaVA
----------------------------
[tt]insert funny quotation here.[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top