There are many ways to go about creating a single page login. There are also many different styles that you can use when creating these logins. Before you start it is a good idea to have a good idea of what you are creating, this way you can always use it as a template in case things start to go wrong.

The design I would like to create is going to consist of the title of the site, a quick description and the forum to login with. For this tutorial I will be creating the login so it will look similar to WordPress’ login screen except it will be off center and there will be no header. These types of login pages are great if the login information is in its own folder or you have a site that requires users to login prior to seeing any of the information.
The first step to creating a login that looks good knowing where the content will be placed. Because I plan on having my content in the middle area of the screen I am going to have to rely on percent based margin properties. After I get all of the padding and margin properties sorted out It will then be time to create a functional and easily useable text.
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Login || Code With Design</title>
<link href=”main.css” rel=”stylesheet” type=”text/css” />
</head>
<body>
<div id=”container”>
<div id=”mainContent”>
</div>
</div>
</body>
</html>
By using the code above you will create the base structure for the design. It contains all of the div tags required to line this all up later with the CSS file. Now all we need to do is create a functioning form that users can enter their password and username.
<h1>Code With Design</h1>
<form id=”form1″ name=”form1″ method=”post” action=”somepage.php”>
<table width=”375″>
<tr>
<td width=”142″><label>
<div align=”right”>Username:</div>
</label></td>
<td width=”162″><input type=”text” name=”username” id=”username” /></td>
<td width=”55″> </td>
</tr>
<tr>
<td><label>
<div align=”right”>Password:</div>
</label></td>
<td><input type=”password” name=”password” id=”password” /></td>
<td><input type=”submit” name=”login” id=”login” value=”Login” /></td>
</tr>
</table>
<h5><a href=”somelink.php”>Lost your password?</a></h5>
<label></label>
</form>
If you read over the information above you will notice that the information in the tables has been moved around with the tables and not with the CSS sheet. Whatever method you use is up to you, Normally its safer to go with the CSS method but at the time of creating this login I wanted to keep the CSS clean for creating more login pages.
@charset “utf-8″;
body {
font: 100% Plantagenet Cherokee;
background: #ffffff;
margin: 0;
padding: 0;
text-align: center;
color: #000000;
}
body a {
text-decoration:none;
color:#333333;
}
body a:hover {
text-decoration:none;
color:#666666;
}
.oneColElsCtr #container {
width: 100%;
margin: 0 auto;
text-align: left;
}
.oneColElsCtr #mainContent {
padding: 3px 20px;
margin-top:20%;
margin-left:20%;
margin-bottom: 10%;
width:400px;
background: #e4edfe; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px;
}
.oneColElsCtr #mainContent h1 {
background: #ffffff; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px;
}
.oneColElsCtr #mainContent input {
font-family: “Plantagenet Cherokee”;
background: #e4edfe;
border: 2px #333 solid;
}
Now we are going to go through the CSS file that was entered above. The body is pretty standard here and doesn’t have a whole lot to do with the placement of the login container. The placement of the login container is built up within the one column elastic container main content. If you look at the code you will see that there is padding so the information is not touching the outside of the div. There is also a lot of margins created here and as mentioned above its measurement is percent based. This will help the login div stay within the central areas of the page. There is also a set width, this is so the div doesn’t extend all the way to the right.
.oneColElsCtr #mainContent {
padding: 3px 20px;
margin-top:20%;
margin-left:20%;
margin-bottom: 10%;
width:400px;
background: #e4edfe; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px;
}
The next thing on the page that you will notice is how the content is wrapped in a round border. This is because of the following code. It is a simple way to make the content rounded inside of your browser. It is also possible to make a border with this style method, however the look of this login is flat so a boarder is not going to be needed.
background: #e4edfe; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px;
The third and final thing that you will notice is how the login box contains the same font as the rest of the page and the button does not look like a normal forum button. This is because of the following code in the CSS file.
.oneColElsCtr #mainContent input {
font-family: “Plantagenet Cherokee”;
background: #e4edfe;
border: 2px #333 solid;
}
It forces the input properties within the MainContent to have a background that matches that of the rest of the page and also creates square borders around the button and input text lines.
Here are the final results

Caleb Jonasson
Stop Spammers From Attacking Your WP Blog
Introduction
More and more users on WordPress are getting spammed and now I have a few tips on how to prevent this from happening to you. There are two general ways that people have their blogs set up one is more reliable then the other. the first setup is where users don’t need to log in and all that is provided is a username, email and a website is optional. The second setup requires the reader to register prior to submitting a comment on anything. This is the more secure method to choose from.
Setup Number One
The first setup has some flaws but the spammers can be prevented. WordPress is setup so that once a poster has been approved through its IP address they will be accepted in the system. When they are accepted the users can post without being manually accepted. Because of this you should hold the comments for moderation for up to two days. There are some signs as to suspicious user activity these signs consist of posts that have a site end with anything other then the regular .com, .org etc. Also if the email has a lot of one letter repeating then it is most likely a spammer. The reason you want to wait multiple days before accepting posts from a user is so you can check the IP address coming from multiple posters. Generally if someone posts multiple times on the same blog post and they are not contributing anything to a discussion they are spammers who picked up on a permanent link and are monitoring the posts to see if they have gotten through just by posting and being accepted into the system.
The Second Setup
In this setup your users must register to your blog and fill out their username and password. It is much more secure because the spammers are more likely going to just find another blog rather then waste their time trying to get a post worthy account. I recommend going with this setup if you have something to offer regular users, However it may be best to keep the first setup until your community begins to grow. Without a community you are just going to have a blog with no discussions and/or comments.
Stop The Spam
There are some methods that you can use to prevent spam from happening. The first best thing that you can do is install Akismet. This is a WordPress plugin that checks your comments against the Akismet web service. This will check to see if the comment is spam or not. The only downfall is that you will require a WordPress API key. These are easy enough to get your hands, you just need to visit the WordPress site. Another method is to open up your admin page, locate the settings area on the left sidebar, click discussion. Now fill in the comment moderation as you see fit. On blacklist I have set the yandex.ru mail service because the only page requests from Russia are all spam related. Within the moderation section you should enter in all of the bad words you can think of. Another way to stop spam is to install yet another plugin. Math Comment Spam is a plugin that requires the user to answer a simple math equation before posting a comment. This stops a lot of spammers in their tracks but there are some that do get by. This plugin is a little annoying to install because it requires that you modify the comment or post page within your theme. There are step by step instructions on achieving this. The final thing that you can do to prevent spam is moderate the comments properly and use your best judgement. Don’t immediately accept positive feedback just because it is there. This is how spammers work. They gain your trust and then fill your database up with spam.