Thomas Brunt's OutFront Hosting
 
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Understanding Your Website

Creating Funky Forms with CSS  Part II  
by Outfront Moderator Katherine Nolan (abbeyvet)

Adding a Style to the Submit Button

Submit buttons are gray, right? Well not necessarily. Of course you can just replace the standard form button with an image, but using CSS will give you a nice effect without the need to create and load an image, however small.

The HTML for a form button looks like this:

<input type="submit" value="Submit">

The part of that to which we will add the style is the 'input', this is called the selector for our style. Since we are going to make the button red we will call the style class we add 'red', it could be called anything but for clarity it is a good idea to call classes names that will mean something to you.

So, the style is added by creating a class of 'input' and adding some style properties to it. Specifically we will add a red background color to the button:

input.red {background-color: #cc0000;}

To make this readable as a style sheet it needs to have style tags surrounding it:

<style type=text/css>
input.red {background-color: #cc0000;}
</style>


Copy this style sheet and paste it before the </head> tag of your page.

Then find the HTML that makes the button:

<input type="submit" value="Submit">

 and alter it to read:

<input class="red" type="submit" value="Submit">

and you should have a nice red button for your form. 


Note: You will need to preview the page to see the effects of the styles in FrontPage, they will not appear in normal view.

However the black text is not too clear on that button, so let's add a little more to the style definition to make it look crisper:

<style type=text/css>
input.red {background-color: #cc0000; font-weight: bold; font-size: 12px; color: white;}
</style>


This will give you a red button with bold white text on it. Of course you can alter the colors to suit your site.


Browser Note: This does not work in Netscape, but Netscape users will be able to use your form, just with the standard ol' gray button.

>>Part III: Adding interest to text boxes

<<Part I: Introduction

 

Fun With Background Images
Fun With Bulleted Lists
Are You Compliant?
Introduction To Cascading Style Sheets
Creating Custom Error Pages
Designing Fast Loading Sites
Creating Funky Forms With CSS
htaccess Magic
An Introduction To JavaScript
JavaScript Snippets
Getting More From Mailto
Installing And Using Perl Scripts
Preparing Photos For Your Web Site
The Popup Dilemma
Paint Shop Pro Album 4
Creating And Using robots.txt File
Creating JavaScript Rollover Buttons
 

Microsoft Corporation in no way endorses or is affiliated with "OutFront." 
OutFront is published and edited by Thomas Brunt
440 Great Circle Dr., St. Matthews, SC 29135.  803-655-6151
© 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 All Rights Reserved
Click here to view our privacy statement.