Script Categories













User Details >>> Style Sheets By Resolution.

Loads a style sheet depending on the user's screen resolution. Includes a default size for Netscape users.

DONE!

Add the below code to the <body> section of your page:

<!-- Set default stylesheet for Netscape users at 800 x 600 -->
<!-- Set variable stylesheets for Internet Explorer users -->
<script language="javascript" type="text/javascript">      
/* Visit http://www.yaldex.com/ for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- Begin
//document.write('Your settings are ' + screen.width + ' x ' + screen.height + '');
if (screen.width == 640) {
//document.write('<link rel="stylesheet" type="text/css" href="640.css">');
alert("Style Sheet for 640 x 480 would have been loaded, but this is just a demo.");
}
if (screen.width == 800) {
//document.write('<link rel="stylesheet" type="text/css" href="800.css">');
alert("Style Sheet for 800 x 600 would have been loaded, but this is just a demo.");
}
if (screen.width == 1024) {
//document.write('<link rel="stylesheet" type="text/css" href="1024.css">');
alert("Style Sheet for 1024 x 768 would have been loaded, but this is just a demo.");
}
if (screen.width == 1280) {
//document.write('<link rel="stylesheet" type="text/css" href="1280.css">');
alert("Style Sheet for 1280 x 960 would have been loaded, but this is just a demo.");
}
if (screen.width == 1600) {
//document.write('<link rel="stylesheet" type="text/css" href="1600.css">');
alert("Style Sheet for 1600 x 1200 would have been loaded, but this is just a demo.");
}
//  End -->
</script>

JavaScript Editor Get Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.



Code was highlighted by 1st JavaScript Editor (The Best JavaScript Editor!).




©