In part 2 we styled the list elements in the first 2 columns. For the last part of this tutorial we are going to go over the web form for the newsletter. Here is our design so we can see what we are going to be creating.
Our form markup is very simple with an input box, label for the input box, and then a submit button. The markup is something like this:
<li class="columns">
<h4>Newsletter</h4>
<form>
<label for="email">Enter Email</label>
<input type="text" name="email" tabindex="1" class="email" />
<input type="submit" class="submit" value="Submit" />
</form>
</li>
The CSS is also very simple.
form {
margin-top: 10px;
}
form label {
display: block;
color: 07070;
margin-bottom: 5px;
font-size: 15px;
}
form input.email {
border: 1px solid #bfbfbf;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
padding: 6px;
font-size: 14px;
color: #707070;
margin-right: 5px;
width: 210px;
}
form input.submit {
border: 1px solid #bfbfbf;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
padding: 5px 0;
font-size: 14px;
color: #fff;
background: #65bd49 url('../images/submit_background.png') repeat-x;
}
As you can see we used some browser specific code to create the rounded corners on the submit button. It will be styled that way on WebKit browsers (Safari and Chrome) and Firefox. In Internet Explorer browser it will have the traditional straight corners.
The last thing to do is to create the copyright test below the columns. To make it display right because of the nature of floated items, we will need to clear the floats. This is done by a clearing element with some simple CSS which goes right after the unordered list in the code.
<div class="clear" />
We have already done the CSS for this element in part 1 when we declared the clear class.
The text on the bottom is just a simple paragraph tag after the clearing div with some very simple styles applied to it.
<p>© Company Name. All rights reserved.</p>
#footer p {
border-top: 1px solid #c2c2c2;
padding-top: 10px;
text-align: center;
font-size: 14px;
color: #707070;
}
View the demo of the mutli-column footer. Post any questions you might have in the comment section.
