| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| Made in the U.K. Join Date: Mar 2005 Location: Gods country
Posts: 931
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | A little bit of code... Does anybody know any HTML code that automatically re-sizes the page to suit the resolution of the screen it is being viewed on? (so you don't get half the page on a small screen - that sort of thing) Thanks for the help
__________________ :music: |
| |
| | THREAD STARTER #3 (permalink) |
| Made in the U.K. Join Date: Mar 2005 Location: Gods country
Posts: 931
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Thanks squeaky14, I am developing the site in frontpage ( ) and corel (again )... do you have any suggestions? It is just about finished and I am happy with it, but it really spoils the look if you only see half a page when it comes up - is there something I could export it too when its done to add this feature before I upload it?Cheers, Mike
__________________ :music: |
| |
| | #4 (permalink) | ||||
| Tech Support Join Date: Mar 2005
Posts: 4,944
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
When users visit your page, JavaScript will determine their screen's resolution and redirect them to the page of your site that you wrote for that screen size! Code:
<!-- THREE STEPS TO INSTALL RESOLUTION PAGE:
1. Paste the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document
3. Be sure to update the resolution pages to ones on your site -->
<!-- STEP ONE: Copy this code into the HEAD of your HTML document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
function redirectPage() {
var url640x480 = "http://www.yoursite.com/640x480";
var url800x600 = "http://www.yoursite.com/800x600";
var url1024x768 = "http://www.yoursite.com/1024x768";
if ((screen.width == 640) && (screen.height == 480))
window.location.href= url640x480;
else if ((screen.width == 800) && (screen.height == 600))
window.location.href= url800x600;
else if ((screen.width == 1024) && (screen.height == 768))
window.location.href= url1024x768;
else window.location.href= url640x480;
}
// End -->
</script>
<!-- STEP TWO: Copy this code into the BODY of your HTML document -->
<center>
<form>
<input type=button value="Enter!" onClick="redirectPage()">
</form>
</center>
<!-- STEP THREE: Don't forget to update the URLs in the code above! --> | ||||
| |
| | THREAD STARTER #5 (permalink) | ||||
| Made in the U.K. Join Date: Mar 2005 Location: Gods country
Posts: 931
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
__________________ :music: | ||||
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Basic HTML Tutorial | webgear | Webmaster Tutorials | 8 | 04-02-2005 02:20 PM |
| 2 Huge Name Forsale | Vegas Entertainment | Domains For Sale - Make Offer | 9 | 09-21-2004 02:37 PM |
| CorePimps Code Is For Sale! | contemptx | For Sale / Advertising Board | 2 | 07-20-2004 09:24 AM |
| Free Source Code Protector! | getthis | For Sale / Advertising Board | 7 | 05-10-2004 03:14 PM |