any way to change the way the page looks depending on there resolution?
ex. (if 600*800, then load index_small)
(if 1024*1028, then load index_big)
+ Reply to Thread
Results 1 to 5 of 5
-
-
Most sizes (eg. tables etc) can be set either in absolutes or percentages. If you use percentages it will scale with the page resolution. Otherwise you are looking some scripint, probably in javascript. Google for some java script tutorial sites and you will probably find some code samples pretty quickly.
Read my blog here.
-
Code:
<SCRIPT language="JavaScript"> <!-- if ((screen.width>=1024) && (screen.height>=768)) { window.location="index_lg.html"; } else { window.location="index_sm.html"; } //--> </SCRIPT>
-
Use a fluid design.... this will give you two columns with a a fluid header and right column.
Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>2 Columns with Fluid Right Column and Header.</title> <style type="text/css"> body,html { width: 100%; height: 100%; background: #000000; } #header { position: absolute; top: 0px; left: 10px; width: auto; height:100px; background: #FF0000; text-align: center; } #leftnav { position: absolute; top: 110px; left: 10px; width: 150px; margin: 0px; height: 100%; background: #008000; } #content { position: absolute; top: 110px; left: 170px; width: auto; height: 100%; background: #808000; vertical-align: middle; text-align: center; } </style> </head> <body> <div id="header"><div style="width: 100%;">Test</div></div> <div id="leftnav">Test</div> <div id="content"><div style="width: 100%;">Test</div></div> </body> </html>
Edit:
Originally Posted by thecoalman
One last note.... if you use this you need to remeber that your pages are going to be fluid so keep that in mind when adding the content, text and images can and will shift.....
Similar Threads
-
DLC.html
By Hangrumps in forum Video ConversionReplies: 4Last Post: 15th Jul 2009, 15:00 -
7z.html files???
By Glenn5782 in forum Newbie / General discussionsReplies: 3Last Post: 17th Mar 2009, 04:43 -
html help
By steve42069 in forum ComputerReplies: 4Last Post: 8th Aug 2008, 10:38 -
HTML Help
By FEEL in forum ProgrammingReplies: 3Last Post: 20th Aug 2007, 08:58 -
html in forum
By Ogilvy in forum FeedbackReplies: 4Last Post: 13th Jul 2007, 18:30