HTML Tutorial


 /help/HTML Help Forum   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Web Design Size
Post new topic   Reply to topic    HTML Help Forum -> Templates
View previous topic :: View next topic  
Author Message
Witty Dolphin



Joined: 30 Sep 2009
Posts: 2

PostPosted: Wed Sep 30, 2009 8:41 am     Web Design Size Reply with quote

Hi All, I am so glad that I came upon this site. I really need the following information please. I have design a site on my computer size screen: 1280x1024, the client want the site to be smaller so that she don't have to scroll to the right all the time. I have done some research on the net and there are source codes that I can download they call it Screen Display Controllers meaning that the site would adjust to any person's screen size. I have no idea what to change in the source code for it to work propperly. Could anyone please assist me? I need a code for my site's which I design on my size screen to adjust to the client's screen size.

Regards
Susan Venter
sticks464



Joined: 31 Dec 2006
Posts: 2629

PostPosted: Wed Sep 30, 2009 1:51 pm     Reply with quote

If you supply a link or post your code someone will gladly assist you.
Witty Dolphin



Joined: 30 Sep 2009
Posts: 2

PostPosted: Thu Oct 01, 2009 4:27 am     HTML Codes I have Reply with quote

Here are the 3 code examples I have.

1. 1. Copy the coding into the HEAD of your HTML document
2. Add the onLoad event handler into the BODY tag
3. Put the last coding into the BODY of your HTML document -->

<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->

<HEAD>

<script type="text/javascript">
<!-- Begin
/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: liveing sacrifice :: http://ls-design.forthelads.net */

function resize()
{
var wide = window.screen.availWidth
var high = window.screen.availHeight
var maxh = 600 // your max height here; enter 0 if not used
var maxw = 600 // your max width here; enter 0 if not used
var content = document.getElementById('content')
content.style.position = 'absolute'
if(maxh > 0 && high <= maxh)
{
content.style.height = high
}
if(maxw > 0 && wide <= maxw)
{
content.style.height = high
}
if(maxh > 0 && high > maxh)
{
content.style.height = maxh
high = (high - maxh) / 2
content.style.top = high
}
if(maxw > 0 && wide > maxw)
{
content.style.width = maxw
wide = (wide - maxw) / 2
content.style.left = wide
}
// Do not remove line below
content.innerHTML = content.innerHTML + "<p style='position:absolute;top:95%;width:40%;left:30%;'>provided by: <a href='http://ls-design.forthelads.net'>liveing_sacrifice</a></p>"
}
//-->
</script>
</HEAD>

<!-- STEP TWO: Insert the onLoad event handler into your BODY tag -->

<BODY onLoad="resize()">

<!-- STEP THREE: Copy this code into the BODY of your HTML document -->

<div id="content">
<p>
All your content would go here.</p>
</div>

<p><center>
<font face="arial, helvetica" size"-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>

<!-- Script Size: 1.87 KB -->


The seconde one:

<script language="Javascript"><!--

// ***********************************************
// AUTHOR: WWW.CGISCRIPT.NET, LLC
// URL: http://www.cgiscript.net
// Use the script, just leave this message intact.
// Download your FREE CGI/Perl Scripts today!
// ( http://www.cgiscript.net/scripts.htm )
// ***********************************************

// for NN4/IE4
if (self.screen) {
width = screen.width
height = screen.height
}

// for NN3 w/Java
else if (self.java) {
var javakit = java.awt.Toolkit.getDefaultToolkit();
var scrsize = javakit.getScreenSize();
width = scrsize.width;
height = scrsize.height;
}
else {

// N2, E3, N3 w/o Java (Opera and WebTV)
width = height = '?'
}

document.write("Your Screen Resolution is set to: "+ width +"×"+ height)

//-->
</script>

The Third one:
...
<head>
<?
if(isset($_COOKIE['screenresolution'])) {
//cookie found!
$screenres = $_COOKIE['screenresolution'];
} else {
//cookie is not found, so set it with JavaScript
?>
<script language="javascript">
<!--
writeCookie();
function writeCookie() {
var enddate = new Date("December 31, 2060");
document.cookie = "screenresolution="+ screen.width +"x"+ screen.height + ";expires=" + enddate.toGMTString();
window.location.replace("<?= $_SERVER['PHP_SELF'] .'?'.$_SERVER['QUERY_STRING'] ?>");
}
//-->
</script>
<?
}
?>
</head>
sticks464



Joined: 31 Dec 2006
Posts: 2629

PostPosted: Thu Oct 01, 2009 5:41 am     Reply with quote

Javascript trickery is not the way to go. Using css to create a fluid layout that adjust to screensize is.
What happens to users that surf with javascript turned off?

Posting html/xhtml and css or a link will get you help in the right direction.
leahmarie



Joined: 04 Aug 2009
Posts: 60

PostPosted: Sun Oct 25, 2009 9:49 pm     Reply with quote

sticks464 wrote:
Javascript trickery is not the way to go. Using css to create a fluid layout that adjust to screensize is.
What happens to users that surf with javascript turned off?


I agree on this one. I seldom use javascript on this sort of things. I usually use CSS for my screen size and other appearance factor on the site.
dalescratchie



Joined: 13 Oct 2009
Posts: 2

PostPosted: Tue Nov 10, 2009 9:04 pm     Reply with quote

Good tips are to host your images on another domain to where the html is located. It increases the amount of simultaneous requests that can be made to download content which, in most browsers, is limited to a maximum of 2 simultaneous connections to each domain name.
charlieangles



Joined: 12 Feb 2010
Posts: 3

PostPosted: Tue Feb 16, 2010 5:16 am     Reply with quote

Excellent Tips given in this article in order to design the perfect window size while designing the web site. I want to make a new web site. I hope these tips will really help me in designing the website.
leon match



Joined: 03 Mar 2008
Posts: 14

PostPosted: Tue Mar 02, 2010 12:57 pm     Reply with quote

Hello,

I was searching the forum with the same question.
I have a website, which is buid for 1200px resolution.

Therefore it does not center on 980px monitors
Please have a look:
www.topsite10.com

From the answers above, could you please give me a clear answer on what should be done in my CSS and HTML to correct it?

Thank you.
jeeva



Joined: 12 Mar 2010
Posts: 3

PostPosted: Wed Mar 17, 2010 11:28 pm     Reply with quote

It's nice information...I got the reseller plan here http://www.goresellers.com/ It provides hosting package at very very cheap cost...
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum -> Templates All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
DARFUR
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial