Sunday, June 8, 2008

Clean and pure CSS FORM design

Some readers of my blog hate html tables and often ask to me which is the better way to design FORMS with CSS, without using tables to place each form element in a table's cell.

How I said some time ago... tables are not evil. Sincerly, in some case I used pure CSS code to design forms but, in general, I prefer to use tables. It's simpler and faster than use only CSS property "to simulate" a table structure. In any case, for CSS lovers, this tutorial illustrates a proposal about how to design a pure CSS form without using html tables.


You can download the source code and use it in your web projects.


Download source code


Step 1: HTML Code
Create a new page index.html and copy and past this code into the tag <body>:

<div id="stylized" class="myform">
<form id="form" name="form" method="post" action="index.html">
<h1>Sign-up form</h1>
<p>This is the basic look of my form without table</p>

<label>Name
<span class="small">Add your name</span>
</label>
<input type="text" name="name" id="name" />

<label>Email
<span class="small">Add a valid address</span>
</label>
<input type="text" name="email" id="email" />

<label>Password
<span class="small">Min. size 6 chars</span>
</label>
<input type="text" name="password" id="password" />

<button type="submit">Sign-up</button>
<div class="spacer"></div>

</form>
</div>

How you can see from the code above, the structure of our CSS form is the following:



I used <label> for the name of each input element and <span> tag for the short description. All labels and input elements have float CSS property set to left;


Step 2: CSS Code
Copy and paste the following CSS code in the <head> tag of your page:

body{
font-family:"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif;
font-size:12px;
}
p, h1, form, button{border:0; margin:0; padding:0;}
.spacer{clear:both; height:1px;}
/* ----------- My Form ----------- */
.myform{
margin:0 auto;
width:400px;
padding:14px;
}

/* ----------- stylized ----------- */
#stylized{
border:solid 2px #b7ddf2;
background:#ebf4fb;
}
#stylized h1 {
font-size:14px;
font-weight:bold;
margin-bottom:8px;
}
#stylized p{
font-size:11px;
color:#666666;
margin-bottom:20px;
border-bottom:solid 1px #b7ddf2;
padding-bottom:10px;
}
#stylized label{
display:block;
font-weight:bold;
text-align:right;
width:140px;
float:left;
}
#stylized .small{
color:#666666;
display:block;
font-size:11px;
font-weight:normal;
text-align:right;
width:140px;
}
#stylized input{
float:left;
font-size:12px;
padding:4px 2px;
border:solid 1px #aacfe4;
width:200px;
margin:2px 0 20px 10px;
}
#stylized button{
clear:both;
margin-left:150px;
width:125px;
height:31px;
background:#666666 url(img/button.png) no-repeat;
text-align:center;
line-height:31px;
color:#FFFFFF;
font-size:11px;
font-weight:bold;
}


This is only a proposal for the form layout. You can reuse this code changing all properties how you prefer.

Download source code


Related Post
Table's anatomy: why tables are not so bad
Are you a CSS fanatic?
Improve form usability with auto messages

Thursday, June 5, 2008

Free Stock Ticker

Free Stock Ticker is an application designed to retrieve stock quotes from the internet while being minimalistic in size and obstruction. You can move it anywhere on the screen and adjust it's width.Stay on top of your stocks with Free Stock Ticker.You will never miss a Wall Street beat when you are getting quotes with updating intervals as low as every minute.Free Stock Ticker makes tracking

Wednesday, June 4, 2008

Photoshop Lady: best Photoshop tutorials around the world

Photoshop Lady is a great resource on-line (with a very nice layout), which provides you daily, all the best Photoshop tutorials to find inspiration and new ideas for your design projects.

All tutorials are divided in categories (3D, abstract, drawing, photo, text, texture, patterns effects) to make simpler browsing and finding everything you are looking for. You can also create your custom profile, save your preferred bookmarks, vote and share them with all other readers.



Subscribe RSS Feed
In order not to miss all new post visit Photoshop Lady and subscribe the RSS feed of the site.
For more info about this site take a look at the link below:

Photoshop Lady



Related post
Get a review for your site

Monday, June 2, 2008

Beautiful CSS buttons with icon set

Do you like simple and clean design? Take a look at this collection of buttons for your website.

I love clean design and in general simple solutions to design nice and attractive elements for my websites. This tutorial illustrates how to design nice clean buttons using some lines of HTML, CSS code and proxal icon set. The result is something like this:


Simple, clean and nice. Click on the link below to download the source code ready to use in your web projects.

Download source code


Step 1: HTML Code
You can design this kind of buttons using this simple structure: a link (<a> tag) with a span tag inside, in this way:

<a href="#" class="button">
<span class=
"add">Add to your bookmark</span>
</a>

You can replicate this structure for all buttons you want to add in your page:



...where link tag (<a>) is the "container" of the button:




...and class property for span tag is equal to CSS class which contains in CSS background propery the icon you want to apply to the current button:




For example, you can define new buttons in this way:

<a href="#" class="button">
<span class=
"delete">Delete this bookmark</span>
</a>

<a href="#" class="button">
<span class=
"user">Add to friends</span>
</a>



Step 2: CSS Code
This is the CSS code for button "container" which includes the button background and how the button looks (font, width, height...):

a.button{
background:url(img/button.gif);
display:block;
color:#555555;
font-weight:bold;
height:30px;
line-height:29px;
margin-bottom:14px;
text-decoration:none;
width:191px;
}
a:hover.button{
color:#0066CC;
}

...and now we can add some classes to design each button in this way:

/* -------------------- */
/* CLASSES */
/* -------------------- */
.add{
background:url(img/add.gif) no-repeat 10px 8px;
text-indent:30px;
display:block;
}
.delete{
background:url(img/delete.gif) no-repeat 10px 8px;
text-indent:30px;
display:block;
}
.user{
background:url(img/user.gif) no-repeat 10px 8px;
text-indent:30px;
display:block;
}
...

For each class, you can set background property with the icon you want, directy from your preferred icon set. In this example I used Proxal Icon Set V2, a very clean and nice icon set I found on Deviantart. Thake a look here for the original link to this icon set.

Download source code


Related content
See also:

CSS Message Box collection
Perfect pagination style using CSS

Photoshop book - FREE DOWNLOAD

Photoshop ebook(PDF) that was $ 29.29 is now free to download.That’s right! No catches, no samples. For a LIMITED TIME only, a COMPLETE COPY of Corrie Haffly’s Brilliant Photoshop Web primer is free to download.Source (click in the link-url to download): Sitepoint website.

Sunday, June 1, 2008

Write Abstracts and EARN MONEY

Write Abstracts and EARN MONEY Lifetime "Shvoong" is a world-wide center for abstracts, offering a wide variety of abstracts in 34 different languages.All the abstracts are written by "Shvoong-users" (register is free) who not only enjoy sharing their knowledge with everyone, but also earn royalties for their work- LIFETIME.It is very simple and works.write, and earn lifetime

Google Spreadsheets Tips: Gantt Chart (Microsoft Project-like) using Widget

Google Spreadsheets is a powerful web application to do everything you do using Excel. A nice way to use it is to manage a project plan with a gantt chart (microsoft project-like) and share it on-line with your team.This is a free and versatile solution to do that. This tutorial illustrates how to use Google Spreadsheets Viewpath Gadget to implement it.


Take a look at this spreadsheet


Step 1: Project Plan structure
First step is defiing your project plan structure. I suggest you to use this basic structure:
Column A: Task ID (WBS) (an unique ID which identifyes each task with a progressive number).
Column B: Task description (a short description of the activity).
Column C: Percentage of completion (0%-100%).
Column D: Predecessor (finish-start relationships between tasks).
Column E: Start date (task start date).
Column F: Finis date (task finish date).
The result is something like this:



All previous fields are required for viewpath gadget but, if you want, you can add other columns with other infos (for example the name of a resource assigned to each task, task duration in terms of day, ecc...). When your project plan structure is completed you are ready to add Gantt Chart using Google Spreadsheets Viewpath Gadget.

Step 2: Add Gantt Gadget
Click on Chart icon and select Gadget option.



In the Gadget window find and select Gantt Chart gadget (by Viewpath) and click on Add to spreadsheet button:



In the option window assign all required parameters to the correct column of your project plan structure (for example Start dates in this example are in the column E):



After assigned all columns, click on apply button and see the result. Now you can save your project plan , publish and share it with all member of your team.


Related Content
See also the following link about this topic: