PDA

View Full Version : Thing not positioning on my registration page...


9homie
05-28-2008, 02:37 PM
Hello.

For some reason, my page is going all wrong...

The site page is: http://pokemonoracle.web44.net/register.php

The code is:

<?
/**
* Register.php
*
* Displays the registration form if the user needs to sign-up,
* or lets the user know, if he's already logged in, that he
* can't register another name.
*
* Written by: Jpmaster77 a.k.a. The Grandmaster of C++ (GMC)
* Last Updated: August 19, 2004
*/
include("session.php");
?>

<html>
<head>
<title>Pok&eacute;mon Oracle</title>
<style>
body {
height:100%;
background-color:#B22222;
background-repeat: repeat;
padding:0px;
text-align: center;
margin-top:0px;
margin-bottom: -1px;
margin-left: auto;
margin-right: auto;
}

#wrapper
/*(the div that holds EVERYTHING)*/
{width:800px;height:75%;background:#696969;border:0px solid #666666;margin-top:0px;padding:0px;text-align:left;margin-left: auto;margin-right: auto; margin-bottom:0px;}

#header {background:#696969;width:800px;height:101px;}

#nav { background-color:#696969;width:800px;height:10px;text-align:center;}

#maintitle {background-color:#696969;width:100%; height;0px;text-align:center;}

#main
background-color:#696969;
/*float:left;*/
height:20%;
margin-bottom:0px;
padding:10px;
text-align:center;
/*width:100%;*/
}

#hosting {background-color:#696969;width:80%; height;10%;text-align:center;}

#footer {background-image: url('footer.png'); width:800px; height:50px;}

.nav {color:red; font-family:ms mincho; font-size:35;}
.maintitle {color:white; font-family:copperplate gothic light; font-size:40;text-align:center;}
.news {color:black; font-family:ms mincho; font-size:25;}
.hosting {color:black; font-family:ms mincho; font-size:10; text-align:center;}
.content {text-align:center;}

a.nav:link {color: blue; text-decoration: none; }
a.nav:visited {color: blue; text-decoration: none; }
a.nav:hover {color: red; text-decoration: underline; }

a.hostinglink:link {color: blue; text-decoration: none; }
a.hostinglink:visited {color: blue; text-decoration: none; }
a.hostinglink:hover {color: red; text-decoration: underline; }

</style>
</head>

<body>

<div id = "wrapper"> <!--this div contains all content. i've centered it.-->
<!--header image-->
<div id = "header">
<img id = "headerleft" height = "100px" src = "banner.png" alt = "[dyc banner]" >
</div>

<!--Links/Navbar-->
<!--Horizontal Nav-->
<div id = "nav" class="nav">
<a href="index.html" class="nav">Home</a> | <a href="login.php" class="nav">Login</a> | <a href="register.php" class="nav">Register</a> | <a href="news.html" class="nav">News</a> | <a href="http://pokemonoracle.myfreeforum.org/index.php" class="nav">Forum</a>
</div>

<!--Main Title-->
<div id = "maintitle">
<p class="maintitle">Pok&eacute;mon Oracle - Online {0.5}<br />
Register
</p>
</div>

<?
/**
* The user is already logged in, not allowed to register.
*/
if($session->logged_in){
echo "<h1>Registered</h1>";
echo "<p>We're sorry <b>$session->username</b>, but you've already registered. "
."<a href=\"index.html\">Home</a>.</p>";
}
/**
* The user has submitted the registration form and the
* results have been processed.
*/
else if(isset($_SESSION['regsuccess'])){
/* Registration was successful */
if($_SESSION['regsuccess']){
echo "<h1>Registered!</h1>";
echo "<p>Thank you <b>".$_SESSION['reguname']."</b>, your information has been added to the database, "
."you may now <a href=\"login.php\">log in</a>.</p>";
}
/* Registration failed */
else{
echo "<h1>Registration Failed</h1>";
echo "<p>We're sorry, but an error has occurred and your registration for the username <b>".$_SESSION['reguname']."</b>, "
."could not be completed.<br>Please try again at a later time.</p>";
}
unset($_SESSION['regsuccess']);
unset($_SESSION['reguname']);
}
/**
* The user has not filled out the registration form yet.
* Below is the page with the sign-up form, the names
* of the input fields are important and should not
* be changed.
*/
else{
?>

<?
if($form->num_errors > 0){
echo "<td><font size=\"2\" color=\"#ff0000\">".$form->num_errors." error(s) found</font></td>";
}
?>

<!--Main Text-->
<div id = "main">
<!--Main Content-->
<div class = "content">

<form action="process.php" method="POST">
<table align="left" border="0" cellspacing="0" cellpadding="3">
<tr><td>Username:</td><td><input type="text" name="user" maxlength="30" value="<? echo $form->value("user"); ?>"></td><td><? echo $form->error("user"); ?></td></tr>
<tr><td>Password:</td><td><input type="password" name="pass" maxlength="30" value="<? echo $form->value("pass"); ?>"></td><td><? echo $form->error("pass"); ?></td></tr>
<tr><td>Email:</td><td><input type="text" name="email" maxlength="50" value="<? echo $form->value("email"); ?>"></td><td><? echo $form->error("email"); ?></td></tr>
<tr><td colspan="2" align="right">
<input type="hidden" name="subjoin" value="1">
<input type="submit" value="Join!"></td></tr>
<tr><td colspan="2" align="left"><a href="index.html">Back Home</a></td></tr>
</table>
</form>

</div>

<?
}
?>

<!--Hosting Link-->
<div id = "hosting">
<p class="hosting">
Because my hosting service is SO good, I want to tell you all the link! (Nobody forced me to do this):<br />
<a href="www.***************" class="hostinglink">www.***************</a>
</p>
</div>

<!--footer-->
<div id = "footer">
</div>

<!--Below is the end of Main Text-->
</div>
<!--Below is the end of the DIV wrapper-->
</div>
</body>
</html>


Can anyone see the problem?

Thank You
9homie

abduraooft
05-28-2008, 03:06 PM
For some reason, my page is going all wrong...
Umm...! that' obvious, (though you haven't told us your expected layout) since you have no DOCTYPE and you are using tables for your layout.

You need to have a DOCTYPE (http://www.alistapart.com/articles/doctype/) as the very first line of your document. Nd don't use tables for layout, see Why tables for layout is stupid: problems defined, solutions offered (http://www.hotdesign.com/seybold/)

9homie
05-28-2008, 03:18 PM
I AM NOT USING MANY TABLES... All i am using with a table is the registration... Which basically has to be in a table.

Also i want the registration to be in the page like the login page...

So... I will put DOCTYPES in soon.

QUESTIONS:

1) How do i make the table NOT a table? Especially the one i am using
2) How to i KEEP my footer on the bottom of the page, however long the page is?

whizard
05-28-2008, 03:24 PM
This is really much more of an HTML/CSS issue. If you post in the correct forum, those attempting to answer will be much more knowledgeable.

(Not that what abdurooft said was not helpful - there is no way you can expect consistent cross browser results without a doctype.)

HTH
Dan

9homie
05-28-2008, 03:49 PM
What WOULD be my Doctype? Can't find it out...

whizard
05-28-2008, 04:05 PM
Try this link:

http://htmlhelp.com/tools/validator/doctype.html

HTH
Dan