It depends on the dimensions (mostly the width) of the screen(s) you are trying to support. If you wanted to specifically set your web pages to, say, the DSi's screens, you'd use the following:
<meta name="viewport" content="width=240">
Once you know the screen width of the mobile device (in pixels), you can do the same for them.
It's my job to help the next generation, and set a good example for them. And for that I'll gladly lay down my life.
I'm not sure whether he was asking how to make a website fit a mobile browser, or how to create a mobile version of a website. But the latter is a bit more in-depth--involving setting up a "mirror" subdomain and creating appropriate PHP files to alter the source structure/content for the mobile version.
here a login made by html
<script type = "text/javascript">
var count = 2;
function validate() {
var un = document.myform.username.value;
var pw = document.myform.pword.value;
var valid = false;
var unArray = ["Philip", "George", "Sarah", "Michael"]; // as many as you like - no comma after final entry
var pwArray = ["Password1", "Password2", "Password3", "Password4"]; // the corresponding passwords;
for (var i=0; i <unArray.length; i++) {
if ((un == unArray[i]) && (pw == pwArray[i])) {
valid = true;
break;
}
}
if (valid) {
alert ("Login was successful");
window.location = "http://www.google.com";
return false;
}
var t = " tries";
if (count == 1) {t = " try"}
if (count >= 1) {
alert ("Invalid username and/or password. You have " + count + t + " left.");
document.myform.username.value = "";
document.myform.pword.value = "";
setTimeout("document.myform.username.focus()", 25);
setTimeout("document.myform.username.select()", 25);
count --;
}
else {
alert ("Still incorrect! You have no more tries left!");
document.myform.username.value = "No more tries allowed!";
document.myform.pword.value = "";
document.myform.username.disabled = true;
document.myform.pword.disabled = true;
return false;
}
}
</script>
<form name = "myform">
<p>ENTER USER NAME <input type="text" name="username"> ENTER PASSWORD <input type="password" name="pword">
<input type="button" value="Check In" name="Submit" onclick= "validate()">
</p>
lol mj.king you just said its and html page but if i used that someone could see my html and see the usernames and passwords therefore this script is vulnerable and pretty much useless.