resize webbrowser
4 posts
• Page 1 of 1
resize webbrowser
can someone tell me the proper way to resize the web browser? I'm starting my portfolio site and I want to make it so that 1. if a users screen res is 800x600 use a specific style sheet and then > 800x600 use another one. 2. I want it so that when a user enters my website their browser changes to a specific size and does not allow them to resize it. I will probably want to do two different sizes depending on their screen resolution. I think that the code for the first problem is this:
- Code: Select all
<head>
<script language="javascript">
<!--
if ((window.width >= 1024) && (window.height >= 768))
{
<link rel="stylesheet" type="text/css" href="hires.css" />
}
else
{
<link rel="stylesheet" type="text/css" href="lowres.css" />
}
-->
</script>
</head>
also is there a way to modify the above code so that you don't use an outside style sheet file?
thanks
this is hte only way that i know how to make a window open and not be resizable....
this goes in your java script
- Code: Select all
function wOpen() {
window.open('your url here','WindowNameHere','width=400,height=400,resizable=no');
}
this goes in your body
- Code: Select all
body onload="javascript:wOpen()"
you need to add the <> tags
Last edited by c0ldfyr3 on Mon Oct 09, 2006 4:13 pm, edited 2 times in total.
4 posts
• Page 1 of 1
Return to HTML, CSS, and Scripts
Who is online
Users browsing this forum: No registered users and 5 guests