Monday, 14 April 2008

WebResourcesDepot.com, free web resources everyday

WebResourcesDepot.com is a very interesting site which provides everyday a lot of great and free web resources for designers and developers in order to help them to find new ideas and save time and money in their work.

On WebResourcesDepot.com you can find really everything you need in a simple way and, browsing site's categories, you can reach to resources related to brushes, buttons, fonts, icons, xhtml & css code or CMS, project/newsletter management applications and, more in general, all kind of tools which can simplify you web development

Subscribe Rss Feed
There are already more than 200 free resources presented and new ones added daily. In order not to miss the new resources visit Webresourcesdepot.com and make sure you grab the RSS feed (full content) of the site.

Suggest new resources
You can also suggest your site or the great web resources that you know here.

WebResourcesDepot.com


Related post
Get a review for your site

Read More

Sunday, 13 April 2008

Improve form usability with auto messages

Animated auto messages are useful to improve FORM usability and Scriptaculous is a great framework to use in this case.

This tutorial explains how to improve form usability adding an auto message which appears and disappears with a nice fade-in and fade-out effect when an user select a field.



I used Scriptaculous toggle effect to implement it. For more info download the full code or take a look at how it works.

Download this tutorial


Step 1: include scriptaculous libraries
Create a new page index.html and add a link to prototype.js and scriptaculous.js in the <head> tag of your page:

<script src="scriptaculous/lib/prototype.js" type="text/javascript"></script>
<script src="scriptaculous/src/scriptaculous.js" type="text/javascript"></script>


Step 2: HTML code
Add an input search field with an hidden input field with ID msgstatus to "save" the actual status of auto message (0=hidden; 1=visible):

<input type="text" name="name" id="name" onfocus="javascript:showMsg(1)"/>
<input id="msgstatus" type="hidden" value="0" />
<div class="msg" id="msg1" style="display:none;">
...some html code here...
<a href="#" onClick="javascript:hideMsg(1)"> Close </a>
<div/>

<input type="text" name="email" id="email" onfocus="javascript:showMsg(2)"/>
<input id="msgstatus" type="hidden" value="0" />
<div class="msg" id="msg2" style="display:none;">
...some html code here...
<a href="#" onClick="javascript:hideMsg(2)"> Close </a>
<div/>


If you want to add other input fields remember to use a progressive numeration for each message ID (id="msg1", id="msg2", id="msg3", id="msg4"...) and change the value of the parameter in input to hideMsg() and showMsg() functions.

Step 3: JavaScript functions
Now, in order to enable Scriptaculous fade-in and fade-out effects, add this code into the page on your page for the function showMsg() which displays an auto message when an user click on input field:

<script language="javascript">
function showMsg(idElement){
idEl= idElement;
statusMenu = document.getElementById('msgstatus');
if(statusMenu.value==0){
statusMenu.value=1;
Effect.toggle('msg'+idEl, 'appear'); return false;
}
}


...and this code for hideMsg() function to hide the menu when an user click on the link "close":

function hideMsg(idElement){
idEl= idElement;
statusMenu = document.getElementById('msgstatus');
if(statusMenu.value==1){
statusMenu.value=0;
Effect.toggle('msg'+idEl, 'appear'); return false;
}
}</script>


How you can see code and structure are very simple to understand and ready to reuse in your projects. Download the zip file with the full code, including CSS and Scriptaculous framework.

Download this tutorial

Read More

Wednesday, 9 April 2008

Nice animated menu using CSS and Mootools

This tutorial illustrates how to implement a nice animated menu using Mootoolsand some lines of CSS and HTML code ready to reuse in your project.

This is the basic version with a basic design, but you can customize it how you prefer modifying the CSS related source code.


Download this tutorial Live Preview

Step 1: HTML Code
HTML code is very simple. You have a layer with ID mymenu which is your menu container, section header (H3 tag) and section content (ul list) which contains some sub-links for each section:



... so, HTML code is something like this:

<div id="mymenu">
<h3 class="toggler menusection">Menu Section 1</h3>
<div class="element menusection">
<ul>
<li><a href="1">Link 1</a></li>
<li><a href="2">Link 2</a></li>
<li><a href="3">Link 3</a></li>
<li><a href="4">Link 4</a></li>
</ul>
</div>

<h3 class="toggler menusection">Menu Section 2</h3>
<div class="element menusection">
<ul>
<li><a href="1">Link 1</a></li>
<li><a href="2">Link 2</a></li>
</ul>
</div>
<!-- Add here other sections... -->
</div>

You can add other sections using the previous structure for each new section.

Step 2: Javascript Code
Ok, now add a link to mootools framework in the tag of your page using this line of code:

<script type="text/javascript" src="mootools.svn.js"></script>

...and add this code in the <head> tag of the page:

<script type="text/javascript">
window.addEvent('domready', function(){
var accordion = new Accordion('h3.menusection', 'div.menusection', {
opacity: false,
onActive: function(toggler, element){
toggler.setStyle('color', '#333333');
toggler.setStyle('background', '#FFFFCC');
},
onBackground: function(toggler, element){
toggler.setStyle('color', '#FFFFFF');
toggler.setStyle('background', '#999999');
}
}, $('mymenu'));
});
</script>


Step 3: Customize CSS code
You can change the look of your menu simply changing some lines of CSS code:




It's all! Download source code to reuse it in your projects.

Download this tutorial

Read More

Monday, 7 April 2008

DesignFlavr, design inspiration

DesignFlavr is an awesome resource of the best Artworks / Websites / Design Related Contents, where you can find inspiration and a lot of new ideas for your design projects. The site mission is to help support to the vaste and ever groving number of designers and artists around the web providing high quality visual contents.


DesignFlavr is not only a classical gallery of CSS websites (that you see everywhere) but it's mainly a portal about everything around Design and Digital Art for example Flash/CSS Websites, Illustrations, Vector Art, Portfolios, Urband Art, General Design and other.
The site interface is very clean and you can select several options to browse all its content choosing for example a Category, Colour Scheme or Popular Tag.



You can also rate each artwork, add your comment and choose the way to arrange and browse all content (most viewed, newest, higest rated).



Resources link is another interesting DesignFlavr section where you can find a lot of useful, daily updated, links/post about some of the most interesting topics design-related on the web.

Submission
If you are an Artist or Web Designer and you want to to submit some work (Artwork or Website) for inclusion on DesignFlavr, take a look at this page.

Support
If you want to support DesignFlavr take a look here to find a collection of nice icons/banner to add on your site.

DesignFlavr


Related post
Get a review for your site

Read More

Sunday, 6 April 2008

Scriptaculous effects compilation ready to use

This post is a compilation of five Scriptaculous tutorials ready to use in your projects (with source code to download) inspired to some Web 2.0 sites.

It includes: images slider Flickr-like, opacity change, drag and drop to reorder a list, fade-in effect and Edit in Place.

1. Simple images slider to create Flickr-like slideshows
A simple image slider ready to use to implement a Flickr-like slideshow.

2. Opacity change using Scriptaculous
This tutorial explains how to use Scriptaculous to implement a nice opacity change effect for a layer and its content.

3. Drag and drop to order list elements with Scriptaculous
This tutorial explains how to use Scriptaculous to implement an HTML list with drag and drop feature to reorder list elements.

4. Effect appear (fade-in) using Scriptaculous
Digg-like fade-in effect which you can see when you click on the Login link on the Digg topbar.

5. Edit in place with Scriptaculous and PHP
This tutorial explains how to implement a simple Edit in Place effect (Flickr-like) using Scriptaculous and PHP


Related Content
Mootools effects compilation
Five web 2.0 CSS menu tutorials

Read More

Saturday, 5 April 2008

Top-Down approach to simplify your CSS code

What is the correct approach to design a CSS file? Today I want to return to talk about a topic very popular on my blog about which I already dedicated two popular posts (optimize your CSS files to improve code readability and write a well structured CSS file without becoming crazy). Now I want to try to reply to this question I often receive from some readers of this blog:
What is the correct approach to design a CSS file?
In this post I want to illustrate some tips which can help you to write a better CSS code using a Top-Down approach.


Top-Down approach
I think the best way to design a CSS file is using a top-down approach, in other words first defining the main sections of your layout (in general an high-level design is composed from 4-6 main section) and after defining all single elements which compose these sections. So you can proceed to write your code in a more structured way avoiding unnecessary code. In fact, defining main sections is simple and not so problematic. The "unwanted code explosion" happens when you define the detail elements. To simplify this process take a mind these two simple "rules":
- minimize the number of CSS elements
- use/redefine HTML standard tag (P, H1, UL, LI...) instead of creating new classes
For example, in your blog, to design the post title style you can redefine <h1> tag instead of defining a new class "post-title".

Define main sections
How I said, before starting to write your CSS code you must have clear in mind which are the main sections of your page layout. For example, in case of a blog with a typical 2 columns layout you can identify these main sections:



Your high-level layout is composed from these section:
1. Header (#header)
2. Main content section (#main-content)
3. Sidebar (#sidebar)
4. Footer (#footer)
Second step is identify all elements which compose each section. Take a look at the following example to have an indea about how to proceed.


Header section
A typical header section contains the website logo and the navigation bar:



You can inlcude the website logo in the CSS background property of #header element in the following way:

#header{background:url(logo.png) no-repeat;}

Someone could say: "but in this way I can't add a link to my home page to the logo". Yes, but I think this is not a dramatic issue which compromises the usability of your site. If you add a link "home" in the navigation bar is exactly the same thing. So, you can design your navigation bar using <ul> tag with a <li> element for each link you need (home, about, contact...). In this way your CSS code will be something like this:



How you can see, you don't need to define a class "#navigation-bar" beacuse your navigation bar is defined using <ul> tag in the #header section (#header ul, #header ul li). In this way your code will be clear and simpler to manage. In any case, to improve the CSS code readability I suggest to use comments to separate each single section element and indent your CSS code.


Main content section
In a typical blog structure, the main content section contains in general the body of post (title, date, text, tag...) and it can be represent in this way:



So, a good way to design it using CSS is redefining these standard HTML tag for the #main-content section:
- Post section paragraph (<p>)
- Post title (<h1>)
- Post date (<h2>)
- Post tag (<small>)
...and CSS code will be something like this:



... simple and very readable.


Sidebar
Another example: take a look at my sidebar. It contains some section which you can design in this simplifyed way, using just <h1> and <p> tag:



...and CSS code will be like the following:



I suggest to use this simple approach to all sections of your websites. I think it can help you to write a better code simplifying in the same time the complexity of your CSS files. Take a look at the following related content links to find other infos about this topic.

Related content
Optimize your CSS files to improve code readability
Write a well structured CSS file without becoming crazy

Read More

Thursday, 3 April 2008

Blog Design Madness Round 3...

New day, new round in the Blog Design Madness competition... Today is started the third round and I hope to arrive to the final round! You can vote for woork at this link:

http://vandelaydesign.com/blog/competition/round-three/

Thanks to everyone for your vote!

Read More