If you are looking for a fixed header of fixed footer you have come to the right place. In this tutorial I will be going over the basic page setup for sections of content, the header bar, footer bar, CSS and HTML.
The CSS code for a header is quite simple depending on how you would like it to interact with the rest of the page.
#header {
top:0px;
right:20px;
left:20px;
position:fixed;
background: #eee;
border:1px solid #ccc;
padding: 0 10px 0 20px;
}
#header h1 {
margin: 0px;
padding: opx;
font:18px “Plantagenet Cherokee”;
letter-spacing:2px;
}
The above CSS contains the header div and the H1 tag. There are four very important things that are required when having a fixed header. First: It must have the position set to fixed. The other three are all about positioning and linking it to the top and sides. With the above code we set the sides to link 20px from the browser and the top to link directly.
Another important part of the CSS is having the page contents forced below what the header is covering. This will allow us to see div that is underneath. That chunk of CSS looks like this.
body {
font: 100% Verdana, Arial, Helvetica, sans-serif;
background: #666666;
margin: 0;
padding: 0;
text-align: center;
color: #000000;
margin-top:40px;
}
The HTML looks something like this.
<html>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Code With Design Fixed Header</title>
<link href=”style.css” rel=”stylesheet” type=”text/css” />
</head><body>
<div id=”header”>
<h1>Header</h1>
<!– end #header –></div>
<div id=”container”>
<div id=”mainContent”>
<h1> Main Content </h1>
</div>
<div id=”footer”>
<p>Footer</p>
</div>
</div>
</body>
</html>
Generally the header is kept withing the container to keep it aligned with the rest of the page however we wanted it to break out of the rest of the page and thus we moved it up, out and away.
The rest of this article will cover the footer which is very similar except for a few things. The footers CSS is going to be fixed to the bottom and not the top which is unlike the header. We will also need to pull it out of the HTML so it can fill up and be safe across browsers.
So first we will take note of the css which goes something like this:
#footer {
padding: 0 10px;
background:#EEE;
bottom:0px;
right:0px;
left:0px;
position:fixed;
}
#footer p {
margin: 0;
padding: 10px 0;
}
Once again we bring in the four important properties; bottom, left, right, and position. You will also need to change the body tag in the CSS so the footer does not overlap the content you would like the readers to see. This CSS is going to look like this:
body {
font: 100% Verdana, Arial, Helvetica, sans-serif;
background: #666666;
margin: 0;
padding: 0;
text-align: center;
color: #000000;
margin-bottom:50px;
}
And now finally we will look at the HTML to see the footer break out of the container similar to what the header did.
<!– end #container –></div>
<div id=”footer”>
<p>Created by Caleb Jonasson</p>
</div>
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.