<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Xguiden &#187; tutorial</title>
	<atom:link href="http://xguiden.dk/tag/tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://xguiden.dk</link>
	<description>Dine guides findes her</description>
	<lastBuildDate>Sat, 13 Mar 2010 16:37:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to Make an Attractive Vector Butterfly</title>
		<link>http://xguiden.dk/2010/03/10/how-to-make-an-attractive-vector-butterfly/</link>
		<comments>http://xguiden.dk/2010/03/10/how-to-make-an-attractive-vector-butterfly/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 10:20:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Engelske guides]]></category>
		<category><![CDATA[Illustrator]]></category>
		<category><![CDATA[brushes]]></category>
		<category><![CDATA[butterfly wing]]></category>
		<category><![CDATA[ellipse tool]]></category>
		<category><![CDATA[gradients]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[mesh]]></category>
		<category><![CDATA[polygon tool]]></category>
		<category><![CDATA[shades]]></category>
		<category><![CDATA[shape]]></category>
		<category><![CDATA[shapes]]></category>
		<category><![CDATA[transformation]]></category>
		<category><![CDATA[transition]]></category>
		<category><![CDATA[transparency]]></category>
		<category><![CDATA[Transparent]]></category>
		<category><![CDATA[triangle]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[vector]]></category>

		<guid isPermaLink="false">http://xguiden.dk/?p=5551</guid>
		<description><![CDATA[In this tutorial I will show you how to make a vector butterfly using the blending mode from transparency box and the gradient mesh. The techniques shown in this tutorial will help you make shades on objects and liquid transition of colors. Believe me it is very easy.
 
Step 1
Let’s start with creating a butterfly wing. [...]]]></description>
			<content:encoded><![CDATA[<p>In this tutorial I will show you how to make a vector butterfly using the blending mode from transparency box and the gradient mesh. The techniques shown in this tutorial will help you make shades on objects and liquid transition of colors. Believe me it is very easy.</p>
<p><span> </span></p>
<h3>Step 1</h3>
<p>Let’s start with creating a butterfly wing. Open up a new document and select the Polygon Tool, and use it to create a triangle. Apply the settings you see below. I usually use simple shapes and then transform them into complex ones; you can also use the Pen Tool (P) for creating the shape of the wing.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/1.jpg" border="0" alt="" /></div>
<h3>Step 2</h3>
<p>Start the transformation. Convert the corner anchor points to smooth and add new smooth anchor points; deform the shape using the Direct Selection Tool (A). This is how we create the top shape of the butterfly wing.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/2.jpg" border="0" alt="" /></div>
<h3>Step 3</h3>
<p>Create the lower part of the wing using the same technique.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/3.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 4</h3>
<p>Use the Pen Tool (P) to create the shape you see in the picture below.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/4.jpg" border="0" alt="" width="600" height="600" /></div>
<p>Fill it with light-blue. The colors will be adjusted later on. Copy and Paste in Front the blue shape. Select the blue and light-blue copies, then click Intersect in the Pathfinder palette. Then press Expand.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/5.jpg" border="0" alt="" width="600" height="600" /></div>
<p>Keeping it selected, click on the button Divide in the Pathfinder palette. Ungroup all the objects.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/6.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 5</h3>
<p>As the result of these actions we have a lot of redundant objects.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/7.jpg" border="0" alt="" width="600" height="600" /></div>
<p>In order to delete them, lock the sub layer with blue and light-blue shape, then use use the Selection Tool (V) select to all the redundant objects, and press the Delete key.</p>
<h3>Step 6</h3>
<p>The light blue shape has a lot of anchor points. If you want to reduce their amount go to Object &gt; Path &gt; Simplify, and apply the settings you see below.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/9.jpg" border="0" alt="" width="600" height="600" /></div>
<p>This procedure is not necessary to conduct. I just do not like it when there are a lot of unnecessary objects in the project. Are you doing well? There is an easier way: if the light-blue shape is open, just click on the button Divide from the Pathfinder palette and there will be no need to do all the further actions.</p>
<h3>Step 7</h3>
<p>Fill the upper shape with a linear gradient that starts from light green to green, as shown on the picture below.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/10.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 8</h3>
<p>Fill the lower shape with a linear gradient that starts with a light blue and goes to blue as shown.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/11.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 9</h3>
<p>Copy the lower shape and Paste in Front. Fill the shape with a solid light blue color. Now change the Blending Mode and Opacity from the Transparency palette as shown below.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/12.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 10</h3>
<p>Let’s create the darkening on the top of the butterfly wing. Use the Pen Tool (P) to create the shape shown below. Copy and Paste in Front the light blue shape. Now select this copy and the newly created shape, then click on Intersect from the Pathfinder palette. Then press Expand.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/13.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 11</h3>
<p>Use the Mesh Tool (U) to create the gradient mesh shown below.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/14.jpg" border="0" alt="" width="600" height="600" /></div>
<p>Select the upper points of the Mesh using the Direct Selection Tool (A) and change their color to blue. And following is the secret of success. In order to reach the liquid transition of colors, make the lower points of the mesh white. The idea is that a white color during the converting of the Blending Mode from Normal to Multiply turns into transparent. Select the whole shape by using the Selection Tool (V) and set the Blending Mode and Opacity as shown.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/15.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 12</h3>
<p>Now create a few more shades of blue color on the wing. Use the previously described techniques.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/16.jpg" border="0" alt="" width="600" height="600" /></div>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/17.jpg" border="0" alt="" width="600" height="600" /></div>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/18.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 13</h3>
<p>Use the Ellipse Tool (L) to create a few concentric ellipses.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/19.jpg" border="0" alt="" width="600" height="600" /></div>
<p>Add a few more ellipses of varying transparency on the wing.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/20.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 14</h3>
<p>Now let’s create the shading of the green color on the left and bottom part of the wing. Use the technique described in the previous steps.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/21.jpg" border="0" alt="" width="600" height="600" /></div>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/22.jpg" border="0" alt="" width="600" height="600" /></div>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/23.jpg" border="0" alt="" width="600" height="600" /></div>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/24.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 15</h3>
<p>Start creating the veins on the wing. Open up the Brushes box: Window &gt; Brushes and go to Open Brush library &gt; Artistic &gt; Artistic Ink and select Tapered Stroke. Apply a green color for the stroke and create the veins using the Pen Tool (P). Apply the settings you see below.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/25.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 16</h3>
<p>Create a wavy image in the lower part of the wing. Select the Pen Tool (P) and create a wavy shape of a green color. Using Intersect from the Pathfinder to cut it out in the shape of a wing.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/26.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 17</h3>
<p>Now change the settings of the Blending Mode and Opacity from the Transparency palette as shown.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/27.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 18</h3>
<p>Copy the created shape and Paste it in Front. Then move it a little bit down using the Selection Tool (V). Cut out the copy in the shape of a wing.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/28.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 19</h3>
<p>Create the highlights on the wings. Select the Pen Tool (P) and create the shapes with black fills that have no stroke. Such elements have to show the structure of the wing.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/29.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 20</h3>
<p>Select each object and create the Gradient Mesh for it using the appropriate tool. Gradient Mesh has to be as simple as possible – put the point on one of the sides of the selected shape. If the Gradient Mesh is not as desired, one can undo the previous actions by pressing keys Command + Z.</p>
<p>Change it into a green color near the vein points and leave the rest black. Now select all the objects with the Gradient Mesh and set up the Blending Mode and Opacity as shown.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/30.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 21</h3>
<p>Now create the liquid transition of the color in the lower corner of the wing. Use the technique described above, but now instead of the Gradient Mesh use the radial gradient starting with green to white.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/31.jpg" border="0" alt="" width="600" height="600" /></div>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/32.jpg" border="0" alt="" width="600" height="600" /></div>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/33.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 22</h3>
<p>Create the lower part of the wing applying the achieved knowledge.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/34.jpg" border="0" alt="" width="600" height="600" /></div>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/35.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 23</h3>
<p>Make up a pattern on the lower part of the wing as shown in Step 13. Fill the ellipses with different colors, change the Blending Mode – have fun experimenting.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/36.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 24</h3>
<p>The wing is finished. Let’s create another one. Select all the objects of the wing using the Selection Tool (V) or Lasso Tool (Q) and go to Object &gt; Transform &gt; Reflect… Apply the settings you see below.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/37.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 25</h3>
<p>Move the copy of the wing to the left using the Selection Tool (V) while pressing the Shift key to constrain the movement.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/38.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 26</h3>
<p>Create the body of the butterfly. Use the Ellipse Tool (L) to create a brown ellipse without stroke. Add the anchor points using the Direct Selection Tool (A).</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/39.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 27</h3>
<p>Select the body of the butterfly and create the Gradient Mesh using the Mesh Tool (U). Choose the points on Gradient Mesh and change the colors into different shades of the brown color from the Swatches box, starting with dark on the edges to light towards the center. This is how the volume effect is achieved.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/40.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 28</h3>
<p>Put the stripes on the body of the butterfly using the Pen Tool (P).</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/41.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 29</h3>
<p>Fill the stripes with black and white linear gradients and change the Blending Mode and Opacity from the Transparency palette. Apply the settings you see below.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/42.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 30</h3>
<p>Select the Pen Tool (P) and draw the upper part of the body of the butterfly.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/43.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 31</h3>
<p>Now create the shade from the upper part on the lower part of the body. Use the Pen Tool (P) to draw the shape of the shade. Select the lower part of the body and go to Object &gt; Path &gt; Offset Path, and apply the settings you see below.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/44.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 32</h3>
<p>Select the shape of the shade and the created Path and click on Intersect in the Pathfinder palette. Then press Expand.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/45.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 33</h3>
<p>Fill the shape of the shade with a black to white linear gradient and change the Blending Mode and Opacity from the Transparency palette. Apply the settings you see below.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/46.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 34</h3>
<p>Select the upper part of the body and go to Object &gt; Create Gradient Mesh as shown below.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/47.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 35</h3>
<p>Paint the upper part like the lower one, but I made the left lower point light green – that is the reflected light of the wing.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/48.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 36</h3>
<p>Create the eyes of the butterfly. Use the Ellipse Tool to create the dark-brown circle, while holding the Shift key. Then take the Mesh Tool (U) and create the net as shown. Choose the points and change their color to varying shades of brown.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/49.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 37</h3>
<p>Now create the highlight on the eye with the help of the Pen Tool (P). The stroke weight is 2 pixels. In order to round the edges of the highlighting click on the Round Cap button from stroke palette. Set the Opacity to 55% in the Transparency palette. Group (Command + G) all the eye-elements and double them. Drag the copy to its place as shown. The eyes are ready.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/50.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 38</h3>
<p>Create the antennae with the help of the Pen Tool (P). Use the same brush for the curves as for the veins on the the wings (see Step 15).</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/51.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Step 39</h3>
<p>Keeping the antennae selected go to Object &gt; Expand Appearance and fill them with the linear gradient as shown.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/52.jpg" border="0" alt="" width="600" height="600" /></div>
<h3>Conclusion</h3>
<p>The final image is shown below. Have fun creating your own butterfly. If you want to master this tutorial then be sure to experiment with color. Good luck!</p>
<div><a href="http://vector.tutsplus.com/butterfly4.jpg"><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/279_Vector_Butterfly/0.jpg" border="0" alt="" width="600" height="600" /></a></div>
<p> </p>
<p><img src="http://feeds.feedburner.com/~r/vectortuts/~4/H_cf3O5-rOI" alt="" width="1" height="1" /></p>

	Tags: <a href="http://xguiden.dk/tag/brushes/" title="brushes" rel="tag">brushes</a>, <a href="http://xguiden.dk/tag/butterfly-wing/" title="butterfly wing" rel="tag">butterfly wing</a>, <a href="http://xguiden.dk/tag/ellipse-tool/" title="ellipse tool" rel="tag">ellipse tool</a>, <a href="http://xguiden.dk/tag/gradients/" title="gradients" rel="tag">gradients</a>, <a href="http://xguiden.dk/tag/image/" title="image" rel="tag">image</a>, <a href="http://xguiden.dk/tag/mesh/" title="mesh" rel="tag">mesh</a>, <a href="http://xguiden.dk/tag/polygon-tool/" title="polygon tool" rel="tag">polygon tool</a>, <a href="http://xguiden.dk/tag/shades/" title="shades" rel="tag">shades</a>, <a href="http://xguiden.dk/tag/shape/" title="shape" rel="tag">shape</a>, <a href="http://xguiden.dk/tag/shapes/" title="shapes" rel="tag">shapes</a>, <a href="http://xguiden.dk/tag/transformation/" title="transformation" rel="tag">transformation</a>, <a href="http://xguiden.dk/tag/transition/" title="transition" rel="tag">transition</a>, <a href="http://xguiden.dk/tag/transparency/" title="transparency" rel="tag">transparency</a>, <a href="http://xguiden.dk/tag/transparent/" title="Transparent" rel="tag">Transparent</a>, <a href="http://xguiden.dk/tag/triangle/" title="triangle" rel="tag">triangle</a>, <a href="http://xguiden.dk/tag/tutorial/" title="tutorial" rel="tag">tutorial</a>, <a href="http://xguiden.dk/tag/vector/" title="vector" rel="tag">vector</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://xguiden.dk/2010/03/08/draw-a-glowing-vector-pocket-watch-%e2%80%93-front-and-back/" title="Draw a Glowing, Vector Pocket Watch – Front and Back (08/03/2010)">Draw a Glowing, Vector Pocket Watch – Front and Back</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/02/13/shiny-green-button/" title="Shiny Green Button (13/02/2010)">Shiny Green Button</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/02/13/perfect-css-sprite-sliding-doors%c2%a0button/" title="Perfect CSS Sprite / Sliding Doors Button (13/02/2010)">Perfect CSS Sprite / Sliding Doors Button</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/02/13/making-image-overlay-caption-using-css/" title="Making Image Overlay Caption Using CSS (13/02/2010)">Making Image Overlay Caption Using CSS</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/02/13/making-a-photoshoot-effect-with-jquery-css/" title="Making a Photoshoot Effect With jQuery and CSS (13/02/2010)">Making a Photoshoot Effect With jQuery and CSS</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://xguiden.dk/2010/03/10/how-to-make-an-attractive-vector-butterfly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create a spattered photomontage in Photoshop</title>
		<link>http://xguiden.dk/2010/03/10/how-to-create-a-spattered-photomontage-in-photoshop/</link>
		<comments>http://xguiden.dk/2010/03/10/how-to-create-a-spattered-photomontage-in-photoshop/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 10:18:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Engelske guides]]></category>
		<category><![CDATA[Photoshop]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[adobe photoshop]]></category>
		<category><![CDATA[brushes]]></category>
		<category><![CDATA[clipping mask]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[motion blur effect]]></category>
		<category><![CDATA[paint bucket tool]]></category>
		<category><![CDATA[pen tool]]></category>
		<category><![CDATA[photomontage]]></category>
		<category><![CDATA[rgb color mode]]></category>
		<category><![CDATA[slider]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://xguiden.dk/?p=5549</guid>
		<description><![CDATA[In this tutorial, we’ll learn how to make a spattered photomontage in Photoshop using brushes and some filters. Layered PSD file included. Let’s get started!
 
Final Image Preview

Create a new document (Ctrl+N) in Adobe Photoshop with the size 800px by 1068px (RGB color mode) at a resolution of 300 pixels/inch. Use the Paint Bucket Tool (G) [...]]]></description>
			<content:encoded><![CDATA[<p>In this tutorial, we’ll learn how to make a spattered photomontage in Photoshop using brushes and some filters. Layered PSD file included. Let’s get started!<br />
<span> </span></p>
<h2>Final Image Preview</h2>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/58.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
Create a new document (<strong>Ctrl+N</strong>) in <strong>Adobe Photoshop</strong> with the size <strong>800px</strong> by <strong>1068px</strong> (<strong>RGB</strong> color mode) at a resolution of <strong>300 pixels/inch</strong>. Use the<strong> Paint Bucket Tool (G)</strong> to fill with the next color <strong>#4A4B41</strong> the new background layer.</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/1.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
Add some noise on this background layer by applying the next filter: <strong>Filter&gt;Noise&gt;Add Noise</strong></p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/2.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
We’ve got the next result:</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/3.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
Set<strong> Fill</strong> to<strong> 57%</strong> and <strong>Blending mode</strong> to <strong>Hard Light</strong> for this layer in<strong> Layers panel</strong>.</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/4.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
Find a stock photo with a jumping man represented on it, I used this <a href="http://www.sxc.hu/photo/1031935" target="_blank">photo</a> from <a href="http://www.sxc.hu/" target="_blank">stock.xchng</a>. I would like to thank the <a href="http://www.sxc.hu/profile/bizior" target="_blank">author</a> of this photo:</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/5.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
Remove the background using your favorite tools like <strong>Pen Tool (P)</strong>, <strong>Magic Wand Tool (W)</strong>, <strong>Magnetic Lasso (L)</strong> or even a simple <strong>Filter&gt;Extract </strong>and insert it on a <strong>new layer</strong> in our main document.</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/6.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
Choose <strong>Image &gt; Adjustments &gt; Hue/Saturation (Ctrl+U)</strong> and drag the slider to the left to decrease the<strong> Saturation</strong> of the color range for layer containing the jumping man.</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/7.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
We’ve got the next result:</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/8.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
<strong>Create a new layer</strong> and select a <strong>Soft Round</strong> brush of <strong>black color (Opacity 15%)</strong></p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/9.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
Use <strong>Soft Round</strong> brush to dark out the top and bottom parts of the document. Place this layer under the layer containing the jumping man:</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/10.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
Next we’ll make a copy of the layer containing the noise effect:</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/11.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
… and select for it <strong>Filter&gt;Blur&gt;Motion blur</strong></p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/12.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
We’ve got the next result:</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/13.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
Set <strong>Fill </strong>to <strong>27%</strong> for this layer in <strong>Layers panel</strong>:</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/14.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
Let’s create a <strong>clipping mask</strong> to make the content of the <strong>layer containing the motion blur effect</strong> only visible within the content of the <strong>layer containing the darked edges</strong>. Hold down<strong> Alt (Windows) </strong>or <strong>Option (Mac OS)</strong> and click between the last made layer and the layer with the darked edges (on the<strong> Layers panel</strong>)</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/15.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
We’ve got the nest effect:</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/16.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
<strong>Create a new layer</strong> and use on it the <strong>Lasso Tool (L)</strong> to draw a freehand selection border as shown:</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/17.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
Next we have to paint the top edge inside the selection, applying the<strong> Soft Round</strong> brush of white color. Firstly we need to use a brush of bigger diameter for marking the border</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/18.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
then use <strong>Hard Mechanical</strong> brush of smaller diameter to paint the edges.</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/19.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
This layer will be placed lower than the layer with the jumping man.</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/20.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
<strong>Create a new layer</strong> and apply here the same technique to represent the same border for the layer on its bottom part.</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/21.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
This layer will be placed also lower than the man’s layer:</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/22.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
We’ve got the next effect</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/23.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
<strong>Create a new layer</strong> and apply on it the <strong>Spatter</strong> brush of <strong>black color (Opacity 10%)</strong></p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/24.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
to dark out the bottom part of the picture. This layer needs to be placed under the man’s layer:</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/25.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
Click on the same layer on the bottom part of the <strong>Layers panel </strong>on <strong>Add layer mask </strong>icon and paint into mask with<strong> Hard Mechanical</strong> brush of <strong>black color</strong> to hide smoothly the dark spots.</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/26.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
We’ve got the next effect:</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/27.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
<strong>Create a new layer</strong> again and select the <strong>Spatter</strong> brush</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/28.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
Paint with this brush along the layer’s edges. The brush’s color is <strong>#FDC689 (Opacity 10%)</strong>. Place this layer under the layer containing the man.</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/29.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /></p>
<p>Let’s create the next <strong>new layer</strong> and use here the <strong>Rectangular Marquee Tool (M)</strong> to represent the next selection:</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/30.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
Then right mouse click inside the selection and select <strong>Transform Selection</strong>, inclining it as it is demonstrated below:</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/31.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
Use the <strong>Spatter</strong> brush inside the selection and paint the top edge with the white color.</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/32.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
We’ve got the next result:</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/33.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
Make a copy of the last made layer with the inclined line and select the <strong>Free Transform (Ctrl+T)</strong> command to turn over the copy’s layer and place it the same way demonstrated on the next picture. The layer will be situated lower than the man’s layer:</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/34.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
<strong>Create a new layer</strong> and use here <strong>Oil Medium Wet Flow</strong> brush to paint the central part of the picture. The brush’s color is <strong>#F2DABB (Opacity 29%)</strong>. This layer will be situated under the layer with the jumping man.</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/35.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
The next <strong>Spatter</strong> brush will be used for painting the layer’s edges:</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/36.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
We’ve got the next result:</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/37.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
Set the <strong>Blending mode</strong> for this layer to <strong>Vivid Light</strong></p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/38.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
On the next <strong>new layer</strong> we’ll apply the <strong>Spatter</strong> brush of <strong>black color (Opacity 5%)</strong> to add a couple of spots on the central part of the picture.</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/39.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
This layer will be situated under the man’s layer:</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/40.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
<strong>Create a new layer</strong> again and select for it the <strong>Soft Round</strong> and <strong>Hard Mechanical</strong> brush of different diameter to represent several scratches. The brush’s color is <strong>black (Opacity 5%)</strong>.</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/41.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /></p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/42.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
We’ve got the next result:</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/43.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
Next step we’ll download a set of <a href="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/brushes_538.rar" target="_blank">brushes</a> for in Adobe Photoshop, named: <em>Blood_Brushes_by_Zattitud3 </em>and <em>Blood_splatter_brush_by_AnnFrost_stock </em>.</p>
<p><strong>Create a new layer</strong> and choose for it the next brush from downloaded set. The brushes’ color is <strong>#BF100D</strong>. Use here different <strong>Opacity </strong>for the brushes. This layer needs to be situated under the man’s layer:</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/44.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /></p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/45.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
We’ve got the next result:</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/46.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
On the next<strong> new layer</strong> we’ll apply the brushes out of the above mentioned sets to represent several spots of the color <strong>#FBC671</strong>. Place this layer lower than the jumping man’s layer:</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/47.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
Add the next <strong>Drop Shadow</strong> settings for the layer by clicking on <strong>Add a layer style</strong> icon from bottom part of the <strong>Layers panel</strong></p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/48.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
We’ve got the next effect:</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/49.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
Let’s create the next <strong>new layer</strong> and use again brushes out of the above mentioned sets. The brushes’ color is <strong>#677159</strong></p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/50.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
Click on <strong>Add a layer style</strong> icon from bottom part of the<strong> Layers panel</strong> and select<strong> Drop Shadow</strong></p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/51.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
We’ve got the next effect:</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/52.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
On the next <strong>new layer</strong> we’ll apply the brushes out of the next sets: <em>Blood_Brushes_by_Zattitud3</em> and <em>Blood_splatter_brush_by_AnnFrost_stock</em>. We need them to paint the zone along the man’s body with <strong>black color</strong>. Choose different <strong>Opacity</strong> and place this layer also under the man’s one:</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/53.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
Select<strong> Create new fill or adjustment layer</strong> from bottom part of the<strong> Layers panel</strong> and click to <strong>Curves</strong> to adjust the curve shape as shown.</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/54.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
The <strong>Adjustment layer</strong> will be placed also lower than the layer with the jumping man:</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/55.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
<strong>Create a new layer</strong> and choose the <strong>Hard Mechanical</strong> brush to paint accurately the man’s hands and his face.</p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/56.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
The brush’s color is<strong> #E7BF82</strong></p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/57.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
Set <strong>Fill</strong> to <strong>55%</strong> and <strong>Blending mode</strong> for this layer to <strong>Color Burn</strong></p>
<p><img src="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/58.jpg" alt="How to create a spattered photomontage in Adobe Photoshop CS4" /><br />
Finished!</p>
<p>View full size <a href="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/create-a-spattered-photomontage-in-photoshop.jpg">here</a>.</p>
<p>Download free <a href="http://www.adobetutorialz.com/content_images/AdobePhotoshop/ART-D/tutorial525/538.rar" target="_blank">Layered PSD file</a>.</p>
<p><a href="http://feedads.g.doubleclick.net/~a/rdlY5UetdA6w1Z3HkdnaEcWz2X4/0/da"><img src="http://feedads.g.doubleclick.net/~a/rdlY5UetdA6w1Z3HkdnaEcWz2X4/0/di" border="0" alt="" /></a><br />
<img src="http://feedads.g.doubleclick.net/~a/rdlY5UetdA6w1Z3HkdnaEcWz2X4/1/di" border="0" alt="" /><img src="http://feeds.feedburner.com/~r/adobetutorialz/~4/-jhiLEQLAJ4" alt="" width="1" height="1" /></p>

	Tags: <a href="http://xguiden.dk/tag/adobe/" title="Adobe" rel="tag">Adobe</a>, <a href="http://xguiden.dk/tag/adobe-photoshop/" title="adobe photoshop" rel="tag">adobe photoshop</a>, <a href="http://xguiden.dk/tag/brushes/" title="brushes" rel="tag">brushes</a>, <a href="http://xguiden.dk/tag/clipping-mask/" title="clipping mask" rel="tag">clipping mask</a>, <a href="http://xguiden.dk/tag/image/" title="image" rel="tag">image</a>, <a href="http://xguiden.dk/tag/motion-blur-effect/" title="motion blur effect" rel="tag">motion blur effect</a>, <a href="http://xguiden.dk/tag/paint-bucket-tool/" title="paint bucket tool" rel="tag">paint bucket tool</a>, <a href="http://xguiden.dk/tag/pen-tool/" title="pen tool" rel="tag">pen tool</a>, <a href="http://xguiden.dk/tag/photomontage/" title="photomontage" rel="tag">photomontage</a>, <a href="http://xguiden.dk/tag/photoshop/" title="Photoshop" rel="tag">Photoshop</a>, <a href="http://xguiden.dk/tag/rgb-color-mode/" title="rgb color mode" rel="tag">rgb color mode</a>, <a href="http://xguiden.dk/tag/slider/" title="slider" rel="tag">slider</a>, <a href="http://xguiden.dk/tag/tutorial/" title="tutorial" rel="tag">tutorial</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://xguiden.dk/2010/03/03/how-to-design-a-3d-glass-icon-in-photoshop/" title="How To Design a 3D Glass Icon in Photoshop (03/03/2010)">How To Design a 3D Glass Icon in Photoshop</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/02/13/how-to-create-waved-valentine-background-with-hearts/" title="How to create waved Valentine background with hearts (13/02/2010)">How to create waved Valentine background with hearts</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/02/13/how-to-create-a-stone-giant-matte-painting/" title="How to Create a Stone Giant Matte Painting (13/02/2010)">How to Create a Stone Giant Matte Painting</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/02/13/how-to-create-a-romantic-valentine%e2%80%99s-day-card/" title="How to Create a Romantic Valentine’s Day card (13/02/2010)">How to Create a Romantic Valentine’s Day card</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/02/13/how-to-create-a-mythical-creature-photo-manipulation/" title="How to Create a Mythical Creature Photo Manipulation (13/02/2010)">How to Create a Mythical Creature Photo Manipulation</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://xguiden.dk/2010/03/10/how-to-create-a-spattered-photomontage-in-photoshop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Awesome CSS+JS form styling</title>
		<link>http://xguiden.dk/2010/03/10/awesome-cssjs-form-styling/</link>
		<comments>http://xguiden.dk/2010/03/10/awesome-cssjs-form-styling/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 10:14:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Engelske guides]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[attribute]]></category>
		<category><![CDATA[auto login]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[content]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[element]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[GET]]></category>
		<category><![CDATA[input type text]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[javascript library]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[open source project]]></category>
		<category><![CDATA[scenarios]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[Transparent]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://xguiden.dk/?p=5558</guid>
		<description><![CDATA[Sexy CSS+JS Form

I was working on our new open source project that i think you will like and I was working on the registration page. This is what I got in the end and i will walk you trough the process with me. This new tutorial is about styling the forms of your website, I [...]]]></description>
			<content:encoded><![CDATA[<div><a rel="attachment wp-att-312" href="http://xguiden.dk/?attachment_id=312"><img class="size-medium wp-image-312" src="http://blog.ajaxmasters.com/wp-content/uploads/2010/03/sexy-form-300x214.png" alt="Sexy CSS Form" width="300" height="214" /></a>Sexy CSS+JS Form</p>
</div>
<p>I was working on our new open source project that i think you will like and I was working on the registration page. This is what I got in the end and i will walk you trough the process with me. This new tutorial is about styling the forms of your website, I find it very good looking and very simple to implement. We will use simple CSS and some JavaScript.</p>
<p>Usually for inserting text into the inputs or our forms we set the value attribute with the text and then use javascript to check for different scenarios for doing some fancy things. This is different we will use labels to fill the text and move them under the inputs and then just do our magic with JS.</p>
<p>The JavaScript library that we will use to create this effect for our forms is <a href="http://jquery.com" target="_blank">Jquery</a></p>
<p><strong>1. Creating the markup!</strong></p>
<pre>            &lt;div id="login"&gt;
                &lt;div class="sayit"&gt;Log In:&lt;/div&gt;
                &lt;form action="javascript:void(0)" onsubmit="login()" autocomplete="off"&gt;
                    &lt;label for="username"&gt;Username&lt;/label&gt;
                    &lt;input type="text" id="username"/&gt;
                    &lt;label for="password"&gt;Password&lt;/label&gt;
                    &lt;input type="password" id="password"/&gt;
                    &lt;input type="submit" class="medium button green" value="Log me In"/&gt;
                &lt;/form&gt;
            &lt;/div&gt;</pre>
<p>The above code is our markup and as you can see is very simple and it can be changed as you like because the code that we will use for checking for different scenarios in javascript will work without necessary classes or ids. We have 2 inputs and 2 labels, one is password one is text and we can work with these ones, you can add as many as you like.</p>
<p>Now let’s style these bastards! <img class="wp-smiley" src="http://blog.ajaxmasters.com/wp-content/plugins/smilies-themer/pidgin/smile-big.png" alt=":D" /></p>
<p><strong>2. Use CSS to style the form elements!</strong></p>
<pre>input[type=text],input[type=password]{padding: 5px 10px; background-color: transparent;	position: relative; z-index: 2;}
label{position: absolute; z-index: 1;-webkit-transition: opacity 0.15s linear; color: #bababa; background-color: #FFFFFF; }

#login{width: 290px; margin: 0 auto;}
#login input[type=text],#login input[type=password]{width:270px; margin: 5px 0; font-size: 24px; font-weight: bold; border: 1px solid #ccc; -moz-border-radius:5px; -webkit-border-radius:5px; color: #595959;}
#login label{font-size: 24px; margin: 14px 10px;}

#login .sayit{font-size:24px; color: #595959; font-style: italic; padding-bottom: 5px;}</pre>
<p>What we did here is make the label absolute so it will go under the input. This is important you will have to place the label before the input so remember this! The input will have a position relative and a z-index of 2 so we can be sure it will land above the label. Next we define the login div by using his id(<em>#login</em>). We use CSS3 for creating the round borders for the input and style the label by setting a big font-size to fit the input. The rest is pretty obvious, if you have trouble understanding this then let us know in the comments.</p>
<p><strong>3. Make everything move with JS!</strong></p>
<pre>$(document).ready(function(){
    $.string(String.prototype);
    $("input,textarea").each(function (type) {
        $(this).focus(function () {
            if($(this).val().blank())
                $(this).prev("label").fadeTo('fast',0.45);
        });

        $(this).keypress(function () {
            $(this).prev("label").fadeTo('fast',0);
        });

        $(this).blur(function () {
            if($(this).val().blank()){
                $(this).prev("label").fadeTo('fast',1);
            }
        });
    });
});</pre>
<p>We use here jQuery of course that we add using the google api like this:</p>
<pre>        &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"&gt;&lt;/script&gt;</pre>
<p>And one plugin that I use to extend the jQuery string properties and that is <a href="http://stilldesigning.com/dotstring/">$.string plugin</a>. After we do that we create the above code and we assign to input and textarea elements a focus, keypress and blur actions. We use the focus action to lower the labels opacity to 45% then on keypress we just hide it for good. Then on blur we check to see if anything was written in our sexy element and if not then we fade the label back to 100%. This is kind of everything we do here, pretty simple. <img class="wp-smiley" src="http://blog.ajaxmasters.com/wp-content/plugins/smilies-themer/pidgin/smile.png" alt=":)" /></p>
<p><strong>4. Showing of a demo and download source</strong></p>
<p>I’ve set up a demo here: <a href="http://tutorials.ajaxmasters.com/sexy-form/" target="_blank"><strong><em>DEMO</em></strong></a></p>
<p>The source code you can either pick it from the demo page or from here: <a href="http://tutorials.ajaxmasters.com/sexy-form/source.zip"><strong><em>SOURCE</em></strong></a></p>
<p><strong>5. Wrapping up!</strong></p>
<p>So here is our nice form styling that you can use on your website and that can be done very easily. Feel free to leave us comments and suggestions. <strong>Thanks a lot!</strong></p>
<p>Have fun coding!<img src="http://feeds.feedburner.com/~r/AjaxmastersBlogRss/~4/0J4er0tKB4Q" alt="" width="1" height="1" /></p>

	Tags: <a href="http://xguiden.dk/tag/ajax/" title="AJAX" rel="tag">AJAX</a>, <a href="http://xguiden.dk/tag/attribute/" title="attribute" rel="tag">attribute</a>, <a href="http://xguiden.dk/tag/auto-login/" title="auto login" rel="tag">auto login</a>, <a href="http://xguiden.dk/tag/code/" title="code" rel="tag">code</a>, <a href="http://xguiden.dk/tag/content/" title="content" rel="tag">content</a>, <a href="http://xguiden.dk/tag/css/" title="CSS" rel="tag">CSS</a>, <a href="http://xguiden.dk/tag/css3/" title="css3" rel="tag">css3</a>, <a href="http://xguiden.dk/tag/design/" title="design" rel="tag">design</a>, <a href="http://xguiden.dk/tag/element/" title="element" rel="tag">element</a>, <a href="http://xguiden.dk/tag/function/" title="function" rel="tag">function</a>, <a href="http://xguiden.dk/tag/get/" title="GET" rel="tag">GET</a>, <a href="http://xguiden.dk/tag/input-type-text/" title="input type text" rel="tag">input type text</a>, <a href="http://xguiden.dk/tag/java/" title="Java" rel="tag">Java</a>, <a href="http://xguiden.dk/tag/javascript/" title="JavaScript" rel="tag">JavaScript</a>, <a href="http://xguiden.dk/tag/javascript-library/" title="javascript library" rel="tag">javascript library</a>, <a href="http://xguiden.dk/tag/jquery/" title="jquery" rel="tag">jquery</a>, <a href="http://xguiden.dk/tag/js/" title="js" rel="tag">js</a>, <a href="http://xguiden.dk/tag/login/" title="login" rel="tag">login</a>, <a href="http://xguiden.dk/tag/open-source-project/" title="open source project" rel="tag">open source project</a>, <a href="http://xguiden.dk/tag/scenarios/" title="scenarios" rel="tag">scenarios</a>, <a href="http://xguiden.dk/tag/script/" title="script" rel="tag">script</a>, <a href="http://xguiden.dk/tag/transparent/" title="Transparent" rel="tag">Transparent</a>, <a href="http://xguiden.dk/tag/tutorial/" title="tutorial" rel="tag">tutorial</a>, <a href="http://xguiden.dk/tag/webkit/" title="webkit" rel="tag">webkit</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://xguiden.dk/2010/03/10/making-a-mosaic-slideshow-with-jquery-and-css/" title="Making a Mosaic Slideshow With jQuery and CSS (10/03/2010)">Making a Mosaic Slideshow With jQuery and CSS</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/02/15/how-to-code-up-a-web-design-from-psd-to-html/" title="How to Code up a Web Design from PSD to HTML (15/02/2010)">How to Code up a Web Design from PSD to HTML</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/02/13/sweet-ajax-tabs-with-jquery-1-4-and-css3/" title="Sweet AJAX Tabs With jQuery 1.4 and CSS3 (13/02/2010)">Sweet AJAX Tabs With jQuery 1.4 and CSS3</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/02/13/making-a-photoshoot-effect-with-jquery-css/" title="Making a Photoshoot Effect With jQuery and CSS (13/02/2010)">Making a Photoshoot Effect With jQuery and CSS</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/03/03/how-we%e2%80%99ll-be-building-websites-in-5-years-html5-and-css3-layout/" title="How We’ll be Building Websites in 5 years: HTML5 and CSS3 layout (03/03/2010)">How We’ll be Building Websites in 5 years: HTML5 and CSS3 layout</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://xguiden.dk/2010/03/10/awesome-cssjs-form-styling/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making a Mosaic Slideshow With jQuery and CSS</title>
		<link>http://xguiden.dk/2010/03/10/making-a-mosaic-slideshow-with-jquery-and-css/</link>
		<comments>http://xguiden.dk/2010/03/10/making-a-mosaic-slideshow-with-jquery-and-css/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 10:11:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Engelske guides]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[content]]></category>
		<category><![CDATA[css styles]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[element]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[mosaic effect]]></category>
		<category><![CDATA[mosaic gallery]]></category>
		<category><![CDATA[mosaic slideshow]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[slide image]]></category>
		<category><![CDATA[slide style]]></category>
		<category><![CDATA[transition effect]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://xguiden.dk/?p=5559</guid>
		<description><![CDATA[When designing a product page, it is often necessary to present a number of images in a succession, also known as a slideshow. With the raise of the jQuery library and its numerous plugins, there is an abundance of ready-made solutions which address this problem. However, to make a lasting impression to your visitors, you [...]]]></description>
			<content:encoded><![CDATA[<p>When designing a product page, it is often necessary to present a number of images in a succession, also known as a slideshow. With the raise of the jQuery library and its numerous plugins, there is an abundance of ready-made solutions which address this problem. However, to make a lasting impression to your visitors, you need to present them with something they have not seen before.</p>
<p>Today we are making a jQuery &amp; CSS mosaic gallery. Mosaic, because it will feature an interesting tile transition effect when moving from one slide to another.</p>
<h3>Step 1 – XHTML</h3>
<p>The mosaic effect of the slideshow is achieved by dividing the original image into smaller parts. These tiles, which contain parts of the image, are sequentially hidden from view, which causes the effect. The markup of the slideshow is pretty straightforward. It consists of the main slideshow container element (<strong>#mosaic-slideshow</strong>), a left and right arrow for previous and next transition and the mosaic-slide div, which is inserted by jQuery at run-time.</p>
<h4>demo.html</h4>
<pre>&lt;div id="mosaic-slideshow"&gt;
	&lt;div class="arrow left"&gt;&lt;/div&gt;
	&lt;div class="arrow right"&gt;&lt;/div&gt;

	&lt;div class="mosaic-slide" style="z-index: 10;"&gt;

		&lt;!-- The mosaic-slide div and the tiles are generated by jQuery --&gt;
		&lt;div class="tile" style="..."&gt;&lt;/div&gt;
		&lt;div class="tile" style="..."&gt;&lt;/div&gt;
		&lt;div class="tile" style="..."&gt;&lt;/div&gt;
		&lt;div class="tile" style="..."&gt;&lt;/div&gt;

	&lt;/div&gt;
&lt;/div&gt;</pre>
<p>The div with the <strong>mosaic-slide</strong> class name is added to the page by jQuery after the<strong> transition()</strong> JavaScript function is executed (we will come back to this in the third step). Inside it you can see the <strong>tile </strong>divs. There are a total of 56 such divs, each of which has a 60px by 60px portion of the slide image set as its background.</p>
<div><a href="http://tutorialzine.com/wp-content/uploads/2010/03/i1.jpg"><img class="size-full wp-image-766" src="http://tutorialzine.com/wp-content/uploads/2010/03/i1.jpg" alt="Mosaic Slideshow" width="620" height="460" /></a>Mosaic Slideshow</p>
</div>
<h3>Step 2 – CSS</h3>
<p>To make this effect work (and most importantly look good), we have to add a few lines of CSS. Only the code directly used by the gallery is shown here. You can see the code that styles the rest of the demonstration page in <strong>styles.css</strong>.</p>
<h4>styles.css – Part 1</h4>
<pre>#mosaic-slideshow{
	/* The slideshow container div */
	height:500px;
	margin:0 auto;
	position:relative;
	width:670px;
}

.mosaic-slide{
	/* This class is shared between all the slides */
	left:80px;
	position:absolute;
	top:25px;

	border:10px solid #555;

	/* CSS3 rounded corners */
	-moz-border-radius:20px;
	-webkit-border-radius:20px;
	border-radius:20px;
}

.tile{
	/* The individual tiles */
	height:60px;
	width:60px;
	float:left;
	border:1px solid #555;
	border-width:0 1px 1px 0;
	background-color:#555;
}</pre>
<p>The slideshow is contained inside the div with an ID of <strong>mosaic-slideshow</strong> (or #mosaic-slideshow, if we refer to it in a form of a CSS / jQuery selector).  There can be only one such div in the page, hence the use of an ID attribute.</p>
<p>However there can be more than one <strong>mosaic-slide</strong> divs in the page. The effect itself is achieved by stacking two slides on top of each other and hiding the tiles of the first one to reveal the ones of the second. This is why we are using a class name instead of an ID.</p>
<p>Some of the more interesting rules presented here are the three CSS3 rules for rounded corners. As the CSS3 standard is still a work in progress, browsers don’t support the regular <strong>border-radius </strong>property yet (except for the new 10.50 version of Opera), and need vendor-specific prefixes to recognize it. The<strong> -moz-</strong> prefix is used by Firefox, and <strong>-webkit-</strong> is used by Safari and Chrome.</p>
<h4>styles.css – Part 2</h4>
<pre>.arrow{
	/* The prev/next arrows */
	width:35px;
	height:70px;
	background:url("img/arrows.png") no-repeat;
	position:absolute;
	cursor:pointer;
	top:50%;
	margin-top:-35px;
}

.arrow.left{
	left:15px;
	background-position:center top;
}

.arrow.left:hover{
	background-position:center -70px;
}

.arrow.right{
	right:15px;
	background-position:center -140px;
}

.arrow.right:hover{
	background-position:center -210px;
}

.clear{
	/* This class clears the floats */
	clear:both;
}</pre>
<p>The <strong>arrow</strong> class is shared by the previous and next arrows. They do need individual styling in addition to this common rule, so we add it after this. We are also using a CSS sprite as the background for the arrow divs. It contains a regular and hover state for both arrows, which spares us from having to use four individual images.</p>
<blockquote><p>“<strong>CSS spriting</strong>” is a widespread technique used by web designers. It allows the designer to join multiple smaller images into a single larger one, called a sprite, which is downloaded faster and saves the web server from multiple download requests. After this, the designer can use the CSS background property in conjunction with setting the elements to a fixed size, to show only the part of the sprite image that they need.</p></blockquote>
<div><a href="http://tutorialzine.com/wp-content/uploads/2010/03/i2.jpg"><img class="size-full wp-image-767" src="http://tutorialzine.com/wp-content/uploads/2010/03/i2.jpg" alt="Mosaic Slideshow" width="620" height="260" /></a>Mosaic Slideshow</p>
</div>
<h3>Step 3 – jQuery</h3>
<p>After including the jQuery library to the page, we can move on to creating the script that will make the slideshow tick. To achieve the mosaic effect, the script defines 4 functions:</p>
<ul>
<li><strong>transition()</strong> – this function makes an animated transition between the currently shown slide, and a new one specified by the id parameter. It works by positioning the new slide we want to show, below the current one, and then hiding the current one one tile at a time;</li>
<li><strong>generateGrid()</strong> – this function is used by transition() to generate a grid of tiles. Each tile contains a part of the slide image as its background;</li>
<li><strong>next()</strong> – detects which the next slide is and runs the transition() function with its index;</li>
<li><strong>prev()</strong> – analogous to next().</li>
</ul>
<h4>script.js – Part 1</h4>
<pre>/* The slide images are contained in the slides array. */
var slides = new Array('img/slide_1.jpg',
					   'img/slide_2.jpg',
					   'img/slide_3.jpg',
					   'img/slide_4.jpg',
					   'img/slide_5.jpg');

$(document).ready(function(){
	/* This code is executed after the DOM has been completely loaded */

	$('.arrow.left').click(function(){
		prev();

		/* Clearing the autoadvance if we click one of the arrows */
		clearInterval(auto);
	});

	$('.arrow.right').click(function(){
		next();
		clearInterval(auto);
	});

	/* Preloading all the slide images: */

	for(var i=0;i&lt;slides.length;i++)
	{
		(new Image()).src=slides[i];
	}

	/* Showing the first one on page load: */
	transition(1);

	/* Setting auto-advance every 10 seconds */

	var auto;

	auto=setInterval(function(){
		next();
	},10*1000);
});</pre>
<p>The <strong>$(document).ready()</strong> method is executed once the page has finished loading. This will ensure that all the divs and other elements are accessible to the script. Inside it we bind a function for the click event on the previous and next arrows, preload all the images, show the first slide (otherwise the slideshow would be empty) and set up the auto-advance interval.</p>
<h4>script.js – Part 2</h4>
<pre>var current = {};
function transition(id)
{
	/* This function shows the slide specified by the id. */

	if(!slides[id-1]) return false;

	if(current.id)
	{
		/* If the slide we want to show is currently shown: */
		if(current.id == id) return false;

		/* Moving the current slide layer to the top: */
		current.layer.css('z-index',10);

		/* Removing all other slide layers that are positioned below */
		$('.mosaic-slide').not(current.layer).remove();
	}

	/* Creating a new slide and filling it with generateGrid: */
	var newLayer = $('&lt;div class="mosaic-slide"&gt;').html(generateGrid({rows:7,cols:8,image:slides[id-1]}));

	/* Moving it behind the current slide: */
	newLayer.css('z-index',1);

	$('#mosaic-slideshow').append(newLayer);

	if(current.layer)
	{
		/* Hiding each tile of the current slide, exposing the new slide: */
		$('.tile',current.layer).each(function(i){
			var tile = $(this);
			setTimeout(function(){
				tile.css('visibility','hidden');
			},i*10);
		})
	}

	/* Adding the current id and newLayer element to the current object: */
	current.id = id;
	current.layer = newLayer;
}</pre>
<p>The transition function uses the global <strong>current</strong> object to store the id of the currently shown slide, and a reference to the current slide div. This is later used to remove leftover slides and prevent a transition from occurring if the same slide as the currently active one is to be shown.</p>
<p>Notice how we use the each method on line 31 to loop through the tiles of the current slide and schedule them to be hidden in <strong>i*10 milliseconds</strong> in the future. As <strong>i</strong> is incremented for every tile, this mean that they are hidden 10 milliseconds apart from one another.</p>
<div><a href="http://tutorialzine.com/wp-content/uploads/2010/03/i31.png"><img class="size-full wp-image-768" src="http://tutorialzine.com/wp-content/uploads/2010/03/i31.png" alt="Slide Transition" width="620" height="460" /></a>Slide Transition</p>
</div>
<h4>script.js – Part 3</h4>
<pre>function next()
{
	if(current.id)
	{
		transition(current.id%slides.length+1);
	}
}

function prev()
{
	if(current.id)
	{
		transition((current.id+(slides.length-2))%slides.length+1);
	}

}

/* Width and height of the tiles in pixels: */
var tabwidth=60, tabheight=60;

function generateGrid(param)
{
	/* This function generates the tile grid, with each tile containing a part of the slide image */

	/* Creating an empty jQuery object: */
	var elem = $([]),tmp;

	for(var i=0;i&lt;param.rows;i++)
	{
		for(var j=0;j&lt;param.cols;j++)
		{
			tmp = $('&lt;div&gt;', {
					"class":"tile",
					"css":{
						"background":'#555 url('+param.image+') no-repeat '+(-j*tabwidth)+'px '+(-i*tabheight)+'px'
					}
			});

			/* Adding the tile to the jQuery object: */
			elem = elem.add(tmp);
		}

		/* Adding a clearing element at the end of each line. This will clearly divide the divs into rows: */
		elem = elem.add('&lt;div class="clear"&gt;&lt;/div&gt;');
	}

	return elem;
}</pre>
<p>The parameter passed to <strong>generateGrid()</strong> is an object containing the rows and the columns we want to be generated, as well as the image to be set as the background of the tiles. While generating the tiles, the background image is offset according to the current position of the tile in the row and in the column. Finally the tile is added to an empty jQuery object which is returned at the end.</p>
<p><strong>With this the mosaic slideshow is complete!</strong></p>
<h3>Wrapping it up</h3>
<p>Today we created a slideshow with an animated mosaic transition effect. You can modify it to include a different number of rows and columns or change the way slides are changed entirely.</p>
<p><strong>What do you think? How would you use this slideshow?</strong></p>
<p><img src="http://feeds.feedburner.com/~r/Tutorialzine/~4/0GM-mbwkGBs" alt="" width="1" height="1" /></p>

	Tags: <a href="http://xguiden.dk/tag/code/" title="code" rel="tag">code</a>, <a href="http://xguiden.dk/tag/content/" title="content" rel="tag">content</a>, <a href="http://xguiden.dk/tag/css/" title="CSS" rel="tag">CSS</a>, <a href="http://xguiden.dk/tag/css-styles/" title="css styles" rel="tag">css styles</a>, <a href="http://xguiden.dk/tag/css3/" title="css3" rel="tag">css3</a>, <a href="http://xguiden.dk/tag/design/" title="design" rel="tag">design</a>, <a href="http://xguiden.dk/tag/element/" title="element" rel="tag">element</a>, <a href="http://xguiden.dk/tag/function/" title="function" rel="tag">function</a>, <a href="http://xguiden.dk/tag/html/" title="HTML" rel="tag">HTML</a>, <a href="http://xguiden.dk/tag/image/" title="image" rel="tag">image</a>, <a href="http://xguiden.dk/tag/javascript/" title="JavaScript" rel="tag">JavaScript</a>, <a href="http://xguiden.dk/tag/jquery/" title="jquery" rel="tag">jquery</a>, <a href="http://xguiden.dk/tag/mosaic-effect/" title="mosaic effect" rel="tag">mosaic effect</a>, <a href="http://xguiden.dk/tag/mosaic-gallery/" title="mosaic gallery" rel="tag">mosaic gallery</a>, <a href="http://xguiden.dk/tag/mosaic-slideshow/" title="mosaic slideshow" rel="tag">mosaic slideshow</a>, <a href="http://xguiden.dk/tag/script/" title="script" rel="tag">script</a>, <a href="http://xguiden.dk/tag/slide-image/" title="slide image" rel="tag">slide image</a>, <a href="http://xguiden.dk/tag/slide-style/" title="slide style" rel="tag">slide style</a>, <a href="http://xguiden.dk/tag/transition-effect/" title="transition effect" rel="tag">transition effect</a>, <a href="http://xguiden.dk/tag/tutorial/" title="tutorial" rel="tag">tutorial</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://xguiden.dk/2010/03/10/awesome-cssjs-form-styling/" title="Awesome CSS+JS form styling (10/03/2010)">Awesome CSS+JS form styling</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/02/13/sweet-ajax-tabs-with-jquery-1-4-and-css3/" title="Sweet AJAX Tabs With jQuery 1.4 and CSS3 (13/02/2010)">Sweet AJAX Tabs With jQuery 1.4 and CSS3</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/02/13/making-a-photoshoot-effect-with-jquery-css/" title="Making a Photoshoot Effect With jQuery and CSS (13/02/2010)">Making a Photoshoot Effect With jQuery and CSS</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/03/03/how-we%e2%80%99ll-be-building-websites-in-5-years-html5-and-css3-layout/" title="How We’ll be Building Websites in 5 years: HTML5 and CSS3 layout (03/03/2010)">How We’ll be Building Websites in 5 years: HTML5 and CSS3 layout</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/02/15/how-to-code-up-a-web-design-from-psd-to-html/" title="How to Code up a Web Design from PSD to HTML (15/02/2010)">How to Code up a Web Design from PSD to HTML</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://xguiden.dk/2010/03/10/making-a-mosaic-slideshow-with-jquery-and-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Draw a Glowing, Vector Pocket Watch – Front and Back</title>
		<link>http://xguiden.dk/2010/03/08/draw-a-glowing-vector-pocket-watch-%e2%80%93-front-and-back/</link>
		<comments>http://xguiden.dk/2010/03/08/draw-a-glowing-vector-pocket-watch-%e2%80%93-front-and-back/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 14:55:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Engelske guides]]></category>
		<category><![CDATA[Illustrator]]></category>
		<category><![CDATA[brushes]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[ellipse tool]]></category>
		<category><![CDATA[Glow]]></category>
		<category><![CDATA[gradients]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[oval shape]]></category>
		<category><![CDATA[pen tool]]></category>
		<category><![CDATA[pocket watch]]></category>
		<category><![CDATA[reflections]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://xguiden.dk/?p=5529</guid>
		<description><![CDATA[In this tutorial you will learn how to draw the front and the back side of a pocket watch from scratch. This tutorial is detailed and by the end you will know how to draw all kinds of shapes, like cog-wheels and small screws. You’ll learn to create the scatter brushes used for the designs [...]]]></description>
			<content:encoded><![CDATA[<p>In this tutorial you will learn how to draw the front and the back side of a pocket watch from scratch. This tutorial is detailed and by the end you will know how to draw all kinds of shapes, like cog-wheels and small screws. You’ll learn to create the scatter brushes used for the designs on the watch and how to use some of the existing patterns and gradients in Illustrator’s library to your advantage.</p>
<p><span> </span></p>
<h3>Part 1 – Draw the Front Side of the Pocket Watch</h3>
<h3>Step 1</h3>
<p>Open a new web document. Take the Ellipse Tool and draw an oval shape, then go to Object &gt; Path &gt; Offset Path. Make three more ovals like below, all with a 0,5 pt Stroke.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 1.jpg" border="0" alt="" /></div>
<p>Draw two more ovals, select them both, then go to the Pathfinder Panel and click Subtract from the shape area to obtain the empty area on the lid where the glass will be. Now take the Pen Tool and draw the shape below for the bottom of the watch, or draw a large circle and just delete the upper point, then send this shape to back.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 2.jpg" border="0" alt="" /></div>
<h3>Step 2</h3>
<p>Use gold gradients for each of the shapes by just changing the angle to get more reflections. You can use the gold gradients from the Swatches Library or create your own by replacing one of the colors from it with a different yellow tone like the one in the next image.</p>
<p>Now go to Object &gt; Expand and expand the 0,5 pt Stroke (mentioned above) for each of the ovals. Then fill them with a gold gradient as well. The shape drawn as the screen is filled with a radial gradient from this color R=248, G=247, and B=244) to R=240, G=228, and B=203.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 3.jpg" border="0" alt="" /></div>
<h3>Step 3</h3>
<p>Select the bigger oval used to make the lid, then go to Object &gt; Path &gt; Offset Path and make the oval that you see below somewhere in the middle. If you do not have copies of the original ovals used above, select the lid, Copy and Paste in front, go to Object &gt; Compound Path &gt; Release and just delete the fill to obtain the paths. Keep in mind, we will need these ovals later.</p>
<p>Now Copy and Paste in Front the lid shape, select both the copied lid and the oval you just made (that should be on top) and go to Pathfinder Panel &gt; Subtract From Shape Area &gt; Expand to obtain the second shape below. Change the fill to another gold gradient and send it behind the original lid shape.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 4.jpg" border="0" alt="" /></div>
<h3>Step 4</h3>
<p>Draw the shapes from the next image. For the smaller oval you can use again Offset Path then select both ovals and go to Pathfinder/Subtract from shape area/Expand. Fill all the shapes with gold gradients, then Copy and Paste in back the ring shape, move it a bit down and to the left then change the yellow tones from the gradient with a light brown to obtain a bit of depth.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 5.jpg" border="0" alt="" /></div>
<h3>Step 5</h3>
<p>Draw one more oval, then use Offset Path to make the rest of them using values like: -1 px and -2 px. Repeat the same steps, always selecting the last shape to make the next one. For each one drag (using the Direct Selection Tool) the upper and the lower points to fit the first oval as shown. Also change the angle for the gradients as you go to obtain different reflections. When you are done and you can’t make any more shapes, group them and place them behind the ring.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 6.jpg" border="0" alt="" /></div>
<p>Next, rotate the group of shapes and place them behind the watch as shown.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 7.jpg" border="0" alt="" /></div>
<h3>Step 6</h3>
<p>I made some personalized letters to indicate the hours. Choose a font that you like and using the Type Tool, then write the &#8220;I&#8221; letter and Expand it.</p>
<p>Now draw a small square, go to Effect &gt; Stylize &gt; Round Corners, then select both and click Horizontal Align Center, and Vertical Align Center from the Align Panel. Now click Add To Shape Area and Expand from the Pathfinder Panel.</p>
<p>Now we’ll make another white square and apply Round Corners. Select the shapes, align them again and click Subtract From Shape Area, and Expand to create the empty space there in the middle. Now compose the rest of the hours as shown.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 8.jpg" border="0" alt="" /></div>
<h3>Step 7</h3>
<p>Select the screen oval done at the beginning, copy and paste it, delete the fill and just give it a 0,5 pt Stroke. Then go to Object &gt; Path &gt; Offset Path, and set the Offset value to -1px or -2px depending on your oval size to obtain the first bigger oval that you see below. To make the smaller one inside, set the offset value to -3px, which will give us the size of the divisions later.</p>
<p>Next take the Line Segment Tool, select a 0,5 pt stroke and draw a line to follow the 12 o’clock direction, mine is the red line in the image. Select the line, go to Object &gt; Transform &gt; Transform Each and Rotate 6 degrees, then just press Command + D to repeat until you cover the entire oval.</p>
<p>Now select the bigger oval and all the lines (make sure the oval is on top of the lines, if not go to Object &gt; Arrange &gt; Bring To Front), then go to Object &gt; Clipping Mask &gt; Make then Object &gt; Expand. Now click Divide from the Pathfinder Panel and Ungroup to obtain the third shape in the image below. But we will end up with some extra empty shapes (see the red selected one) that must all be deleted before we go on. Next make sure the smaller oval made earlier is on top of the lines, select both and click Exclude Overlapping Shape Areas and Expand from the Pathfinder Panel, then Divide and Ungroup again.</p>
<p>Now start deleting all the extra shapes (see the blue selected one) and you will end up with just the divisions that you need. Also give a 1 pt stroke to the divisions corresponding with the hours to make them more obvious, and let the minutes just be a black fill.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 9.jpg" border="0" alt="" /></div>
<h3>Step 8</h3>
<p>To draw the hour-hands take the Rectangle Tool and draw a long rectangle as below. Next use the Polygon Tool to draw a triangle, flip it vertically and use the Direct Selection Tool to drag the lower point down. Next draw the tip of the hour-hands and place them all as you see below. I personalized them also to make them look like the hours, so follow Step 6 and do the same.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 10.jpg" border="0" alt="" /></div>
<h3>Step 9</h3>
<p>Now place the divisions on top of the screen, then select only the ones that are on top of the lid, group them and send them behind it. Now rotate and place the hours and the hand-hours under a small circle in the middle of the screen. At this step my clock looks like the following image.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 11.jpg" border="0" alt="" /></div>
<h3>Step 10</h3>
<p>Use the original bigger oval from the lid again and make the three ones from below using Offset Path, then do the same with the smaller one. Save some copies of these ovals because we will need them again later.</p>
<p>Expand them all and fill them with a gold gradient then set the Blending mode to Hard Light only for the three smaller ones. The colors I used for the gradient are: (R=195, G=146, and B=46), (R=255, G=251, and B=204), (R=193, G=144, and B=46), (R=236, G=212, and B=134) and (R=255, G=249, and B=202). Copy the lid shape and Paste in front, select both the pasted lid and all the ovals just made, and go to Object &gt; Clipping Mask &gt; Make.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 12.jpg" border="0" alt="" /></div>
<h3>Step 11</h3>
<p>Now select the smaller oval from the lid and the smaller oval from the ones that I mentioned to save above (see the image), then Copy and Paste both of them in front. Now click Exclude Overlapping shape areas and Expand from the Pathfinder Panel. Go to Swatches Library &gt; Patterns &gt; Decorative &gt; Decorative_Geometric 1 and choose Diamond Spirals Color to fill the shape, set the mode to Soft Light, and lower the Opacity to 60%.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 13.jpg" border="0" alt="" /></div>
<h3>Step 12</h3>
<p>Take the Spiral Tool and draw a spiral, then stroke it with the brush from the image below found in the Brush Libraries. Copy and paste once more, flip it vertically, and place it as shown. Now draw the other shapes using the Pen Tool. Group them all and drag them into the Brushes Panel, and select New Scatter Brush. Draw a small black circle and drag it into the Brushes Panel also because we will need it later.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 14.jpg" border="0" alt="" /></div>
<h3>Step 13</h3>
<p>Draw an oval and place it like below, then stroke it using the Scatter Brush we just made, and set the values as in the image. Then go to Object &gt; Expand, fill the group of shapes with a gold gradient, set the mode to Multiply and reduce the Opacity to 30%.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 15.jpg" border="0" alt="" /></div>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 16.jpg" border="0" alt="" /></div>
<p>Do the same, but use the small black circle Scatter Brush from Step 12. The pocket watch looks like this now:</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 17.jpg" border="0" alt="" /></div>
<h3>Step 14</h3>
<p>To make the glass on the lid Copy and Paste In Front the smaller oval used to make the lid at the beginning, fill it with a linear gradient from gray to white, and reduce the Opacity to 40%.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 18.jpg" border="0" alt="" /></div>
<h3>Step 15</h3>
<p>To add more glow, use the Pen Tool to draw the shape from the next image, fill it with a linear gradient from a light yellow to white, add a 1,4 px Gaussian Blur, set the mode to Screen and lower the Opacity to 60%.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 19.jpg" border="0" alt="" /></div>
<h3>Step 16</h3>
<p>Copy and Paste In Front the oval made at the beginning of the tutorial, fill it with the same pattern used earlier, which is Diamond Spirals Color, and set the Blending mode to Soft Light.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 20.jpg" border="0" alt="" /></div>
<h3>Step 17</h3>
<p>Now Copy and Paste In Front the screen shape and the divisions, then use the Scale Tool to make them smaller like below. Also Copy and Paste one of the hour-hands, make it smaller and then place 60, 15, 30 and 45 as seconds instead of the hours. Also Copy and Paste In Back the first two hour-hands, move them a bit down, give them a 1 px Gaussian Blur and reduce the Opacity to 20%.</p>
<p>We are done with the first part of the tutorial. Here is how the front side of the pocket watch should look like at this point:</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 21.jpg" border="0" alt="" /></div>
<h3>Part 2 – Draw the Back Side of the Pocket Watch</h3>
<h3>Step 18</h3>
<p>To make the back side of the watch, draw ovals just like for the front side, and fill them with the same gold gradient, also do the same with the 0,5 pt Stroke like at the beginning. Copy and Paste the ring group and place it behind the ovals as shown. Here is the outline view of what you will draw until the end.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 22.jpg" border="0" alt="" /></div>
<h3>Step 19</h3>
<p>Take the Pen Tool and draw the red shape that you see in the image below. Don’t worry about the edges because you will make a clipping mask later using the circle to fit inside the watch.</p>
<p>Next draw the green shape, then Copy and Paste In Front (we will need the original shape again later). Select both the green shape and the circle, then click Subtract From Shape Area and Expand to obtain the second green shape below.</p>
<p>Draw the black circles, select them both (make sure the smaller circle is on top of the other) and click Subtract From Shape Area and Expand to create the selected shape in the image. Also, always save copies of every shape and circle you make because you will need them again later to create other shapes.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 23.jpg" border="0" alt="" /></div>
<p>Now draw the shape shown, and use the same circle from above, click Subtract From Shape Area and Expand to create the selected shape below.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 24.jpg" border="0" alt="" /></div>
<h3>Step 20</h3>
<p>Fill each of the shapes with gold gradients, just change the angle for some of them to not look the same. Also, now it’s the time to make the mask that I talked about earlier. Copy and Paste In Front the inside circle of the watch made at the beginning, the same used above. Select it and the shape that crosses over it and go to Object &gt; Clipping Mask &gt; Make.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 25.jpg" border="0" alt="" /></div>
<h3>Step 21</h3>
<p>Take the Ellipse Tool and draw the circles below, and then use Offset Path to make the smaller ones inside. To make the selected shape from the image, select both shapes that I placed in the right to see them bette,r and click Intersect Shape Areas and Expand from the Pathfinder Panel. Next, draw the other shapes using the Ellipse Tool and the Rounded Rectangle Tool, select them both, then click Add To Shape Area and Expand.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 26.jpg" border="0" alt="" /></div>
<h3>Step 22</h3>
<p>The gradient I used to fill the shapes is Steel from the Swatches Library, set to Multiply, but you can use any metal gradient that you prefer. Also, the smaller ones on top are filled with a metal gradient, but set to Normal.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 27.jpg" border="0" alt="" /></div>
<h3>Step 23</h3>
<p>Take the Ellipse Tool and draw a circle, then go to Object &gt; Path &gt; Offset Path to create the smaller one inside (save a copy of the smaller one because you will need it later). Select them both and click Subtract From Shape Area and Expand to obtain the first shape below. Now use the Rounded Rectangle Tool to draw a rectangle and place it as shown (the upper one from the selected group), then Copy and Paste In Front once more and move it down.</p>
<p>Group the two rectangles, go to Object &gt; Transform &gt; Transform Each and select rotate -20 degrees, then just press Command + D until the circle is covered all around. Ungroup all the rectangles, select them all (without the circle) and again go to Object &gt; Transform &gt; Transform Each and select rotate -20 degrees (see the third shape below).</p>
<p>Now select all the shapes again, including the circle, and click Add To Shape Area and Expand. Next place the smaller circle that I mentioned to save earlier as you see below (the red one), select both and click Subtract From Shape Area and Expand. This is the first type of small cog-wheel that we will use for the watch.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 28.jpg" border="0" alt="" /></div>
<h3>Step 24</h3>
<p>Take the Pen Tool and draw the shape below or to make it symmetrical by just drawing half of it, reflect it, and then join the points. Now draw a circle, and then do the same as in Step 23 above, and place two of the shapes as below.</p>
<p>Group them and go to Object &gt; Transform &gt; Transform Each and select rotate 6 degrees, then just press Command + D until you cover the circle all around. After you’re done, select all the shapes and the circle, then click Add To Shape Area and Expand, then fill with a gold gradient.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 29.jpg" border="0" alt="" /></div>
<h3>Step 25</h3>
<p>To draw the next type of cog-wheel use the shape made above and draw a smaller circle inside it, then select both and click Exclude Overlapping Shape Areas and Expand.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 30.jpg" border="0" alt="" /></div>
<h3>Step 26</h3>
<p>Copy the shape made above again and fill it with a metal gradient, the one I used is Stainless Steel from the Swatches Library. Copy and Paste In Front again and change the angle of the gradient to 90 degrees, then set the mode to Lighten. Group the two shapes.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 31.jpg" border="0" alt="" /></div>
<h3>Step 27</h3>
<p>Scale all the small cog-wheels if necessary, and place them as shown.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 32.jpg" border="0" alt="" /></div>
<h3>Step 28</h3>
<p>Remember the two circles from Step 19 that I said you will need again? Select them both, and click Subtract From Shape Area and Expand (make sure the smaller circle is on top) to obtain the red shape below.</p>
<p>Now draw a circle, give it a 1,2 pt Stroke and Expand it, then select both shapes and click Intersect Shape Areas and Expand. Fill the shape with a gold gradient and place it like you see in the second row. For the larger gold circle all around the other shapes, draw a circle, give it a 1,3 Stroke, Expand it and then fill it with the same gradient.</p>
<p>Next take the Rounded Rectangle Tool, draw small rectangles and place them like below behind the circle. I wanted to add more texture, so for that take the Ellipse Tool and draw a small circle, go to Swatches Library &gt; Patterns &gt; Basic Graphics &gt; Basic Graphics_Textures, find USGS 8 Sewage Disposal and fill the circle.</p>
<p>Copy and Paste In Front the circle, and from the Transform Panel select rotate 90 degrees to obtain the squares pattern. Group the two circles and lower the Opacity for the group to 20 %.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 33.jpg" border="0" alt="" /></div>
<p>Place all the shapes made above as shown. Next Copy and Paste In Back one of the circles with the pattern from above, and change the fill to a radial gradient that goes from white to yellow.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 34.jpg" border="0" alt="" /></div>
<h3>Step 29</h3>
<p>To draw the next four shapes just follow the image. Draw the shapes that you see and click Add To Shape Area and Expand to make them. To fill them go to Swatches Library &gt; Gradients &gt; Metals and find White Gold.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 35.jpg" border="0" alt="" /></div>
<h3>Step 30</h3>
<p>Now place the shapes shown below, and make another clipping mask using the inside circle of the watch like you did before to hide the edges that pass over it. To add some shadows Copy and Paste In Back each of the shapes, move them a bit to the left, fill with black, add a 1,2 px Gaussian Blur and lower the Opacity to 35%.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 36.jpg" border="0" alt="" /></div>
<h3>Step 31</h3>
<p>To draw the small screws take the Ellipse Tool and draw some circles, then using Offset Path make the smaller ones inside and with the Rectangle Tool draw the rectangle on top of them. For the last type of screws use three circles, fill the second one with the radial gradient using red tones as shown, and fill the third one with a radial gradient using white and light gray tones. Group all the shapes for each screw, and make more copies, also different sizes (see images from Step 33).</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 37.jpg" border="0" alt="" /></div>
<h3>Step 32</h3>
<p>Use the Rounded Rectangle Tool to draw the rectangle below, then take the Direct Selection Tool and move the points as shown. Fill with a gold gradient, make more copies and place them behind some of the small cog-wheels.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 38.jpg" border="0" alt="" /></div>
<h3>Step 33</h3>
<p>Up to this point, the back side of the pocket watch looks like this:</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 39.jpg" border="0" alt="" /></div>
<h3>Step 34</h3>
<p>For more depth you can add more shadows behind some of the shapes. Select one of the shapes below, Copy and Paste In Back, move it a bit to the left or right depending on the position of the shape you selected, and fill it with black, then add some blur and reduce the Opacity.</p>
<p>Do the same with all the shapes selected in the image. The Gaussian Blur values are between 1px -1,8 px and the Opacity between 25-45% depending on each shape. Also, add shadows behind each of the small cog-wheels in the same way for more depth.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 40.jpg" border="0" alt="" /></div>
<p>The work is nearly done. The back side of the pocket watch is finished and looks like this:</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 41.jpg" border="0" alt="" /></div>
<h3>Step 35</h3>
<p>To add more glow, Copy and Paste In Back some parts of the watch. From the front side: the lid, the ring, the bottom and the bigger circle of the body (group them all). From the back side, select the ring and the bigger circle and group them. Then move all these selected shapes into a new layer.</p>
<p>Copy and Paste In Back all these shapes again, change the fill color to black, move them a bit down, then flip the lid vertically and flatten it. Select the entire layer by clicking the circle next to its name and go to Effect &gt; Blur and apply a 3 px Gaussian Blur, then reduce the Opacity to 50% for the entire layer (see the “shadows” layer in the following image).</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/image 42.jpg" border="0" alt="" /></div>
<h3>The Final Image</h3>
<p>The work is done! Here is the final image of the pocket watch. Hope you found this tutorial useful and that you learned some new techniques.</p>
<div><img src="http://vectortuts.s3.cdn.plus.org/tuts/000_2010/274_Pocket_Watch/Pocket-watch_front-and-back_final.jpg" border="0" alt="" /></div>
<p> </p>
<p><img src="http://feeds.feedburner.com/~r/vectortuts/~4/jfDvC_nm29E" alt="" width="1" height="1" /></p>

	Tags: <a href="http://xguiden.dk/tag/brushes/" title="brushes" rel="tag">brushes</a>, <a href="http://xguiden.dk/tag/design/" title="design" rel="tag">design</a>, <a href="http://xguiden.dk/tag/ellipse-tool/" title="ellipse tool" rel="tag">ellipse tool</a>, <a href="http://xguiden.dk/tag/glow/" title="Glow" rel="tag">Glow</a>, <a href="http://xguiden.dk/tag/gradients/" title="gradients" rel="tag">gradients</a>, <a href="http://xguiden.dk/tag/illustrator/" title="Illustrator" rel="tag">Illustrator</a>, <a href="http://xguiden.dk/tag/images/" title="images" rel="tag">images</a>, <a href="http://xguiden.dk/tag/oval-shape/" title="oval shape" rel="tag">oval shape</a>, <a href="http://xguiden.dk/tag/pen-tool/" title="pen tool" rel="tag">pen tool</a>, <a href="http://xguiden.dk/tag/pocket-watch/" title="pocket watch" rel="tag">pocket watch</a>, <a href="http://xguiden.dk/tag/reflections/" title="reflections" rel="tag">reflections</a>, <a href="http://xguiden.dk/tag/tutorial/" title="tutorial" rel="tag">tutorial</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://xguiden.dk/2010/02/13/starcraft-2-wallpaper-design/" title="Starcraft 2 wallpaper design (13/02/2010)">Starcraft 2 wallpaper design</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/02/13/modern-designed-text-effect/" title="Modern Designed Text Effect (13/02/2010)">Modern Designed Text Effect</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/02/25/make-a-freezing-cold-snow-themed-abstract-piece/" title="Make a Freezing Cold Snow-themed Abstract Piece (25/02/2010)">Make a Freezing Cold Snow-themed Abstract Piece</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/03/10/how-to-make-an-attractive-vector-butterfly/" title="How to Make an Attractive Vector Butterfly (10/03/2010)">How to Make an Attractive Vector Butterfly</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/03/08/design-and-code-a-cool-iphone-app-website-in-html5/" title="Design and Code a Cool iPhone App Website in HTML5 (08/03/2010)">Design and Code a Cool iPhone App Website in HTML5</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://xguiden.dk/2010/03/08/draw-a-glowing-vector-pocket-watch-%e2%80%93-front-and-back/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create a web hosting layout</title>
		<link>http://xguiden.dk/2010/03/08/how-to-create-a-web-hosting-layout/</link>
		<comments>http://xguiden.dk/2010/03/08/how-to-create-a-web-hosting-layout/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 11:42:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Engelske guides]]></category>
		<category><![CDATA[Photoshop]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[Over]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Start]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://xguiden.dk/?p=5517</guid>
		<description><![CDATA[


Today will show you how to create another eye catching hosting layout. In this tutorial I will use only 2-3 colors, with small variations, and you can use this layout for any internet business you have. of course you need to make small changes.
 
For start we will need to create a new document. the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://feedads.g.doubleclick.net/~a/EXevJVm3k8k9CXUEmdWsahzBOvc/0/da"><img src="http://feedads.g.doubleclick.net/~a/EXevJVm3k8k9CXUEmdWsahzBOvc/0/di" border="0" alt="" /></a><br />
<a href="http://feedads.g.doubleclick.net/~a/EXevJVm3k8k9CXUEmdWsahzBOvc/1/da"><img src="http://feedads.g.doubleclick.net/~a/EXevJVm3k8k9CXUEmdWsahzBOvc/1/di" border="0" alt="" /></a></p>
<div></div>
<p><a rel="thumbnail" href="http://www.grafpedia.com/wp-content/uploads/2010/03/web-hosting-layout.jpg"><img class="alignleft size-full wp-image-6206" src="http://www.grafpedia.com/wp-content/uploads/2010/03/web-hosting-layout.jpg" alt="" width="200" height="200" /></a>Today will show you how to create another eye catching hosting layout. In this tutorial I will use only 2-3 colors, with small variations, and you can use this layout for any internet business you have. of course you need to make small changes.</p>
<p><span> </span><br />
For start we will need to create a new document. the size is as always 1000×1100 pixels, and I will create this document with a white background.<br />
I will select Rectangle Tool, and I will create two shapes. For the top shape I will use the following color: #393e43, and for the bottom one I will use another color: #373a3e</p>
<p><a rel="thumbnail" href="http://www.grafpedia.com/wp-content/uploads/2010/03/110.jpg"><img class="alignnone size-medium wp-image-6207" src="http://www.grafpedia.com/wp-content/uploads/2010/03/110-600x660.jpg" alt="" width="600" height="660" /></a></p>
<p>Then I will create another shapes like in the following image. Please click to see the full size image.</p>
<p><a rel="thumbnail" href="http://www.grafpedia.com/wp-content/uploads/2010/03/26.jpg"><img class="alignnone size-medium wp-image-6208" src="http://www.grafpedia.com/wp-content/uploads/2010/03/26-600x660.jpg" alt="" width="600" height="660" /></a></p>
<p>As you can see I have some layer styles applied to the layers:</p>
<p><a rel="thumbnail" href="http://www.grafpedia.com/wp-content/uploads/2010/03/31.jpg"><img class="alignnone size-full wp-image-6209" src="http://www.grafpedia.com/wp-content/uploads/2010/03/31.jpg" alt="" width="600" height="444" /></a></p>
<p><a rel="thumbnail" href="http://www.grafpedia.com/wp-content/uploads/2010/03/41.jpg"><img class="alignnone size-full wp-image-6210" src="http://www.grafpedia.com/wp-content/uploads/2010/03/41.jpg" alt="" width="600" height="444" /></a></p>
<p><a rel="thumbnail" href="http://www.grafpedia.com/wp-content/uploads/2010/03/51.jpg"><img class="alignnone size-full wp-image-6211" src="http://www.grafpedia.com/wp-content/uploads/2010/03/51.jpg" alt="" width="600" height="444" /></a></p>
<p><a rel="thumbnail" href="http://www.grafpedia.com/wp-content/uploads/2010/03/61.jpg"><img class="alignnone size-full wp-image-6212" src="http://www.grafpedia.com/wp-content/uploads/2010/03/61.jpg" alt="" width="600" height="444" /></a></p>
<p>With custom shape tool, I will add some arrows. And I will add the same layer style as above.</p>
<p><a rel="thumbnail" href="http://www.grafpedia.com/wp-content/uploads/2010/03/71.jpg"><img class="alignnone size-medium wp-image-6213" src="http://www.grafpedia.com/wp-content/uploads/2010/03/71-600x660.jpg" alt="" width="600" height="660" /></a></p>
<p>Now I will create a button, with <a rel="http://www.grafpedia.com/images/Rounded-Rectangle-Tool.jpg" href="http://www.grafpedia.com">Rounded Rectangle Tool</a>.</p>
<p><a rel="thumbnail" href="http://www.grafpedia.com/wp-content/uploads/2010/03/81.jpg"><img class="alignnone size-full wp-image-6214" src="http://www.grafpedia.com/wp-content/uploads/2010/03/81.jpg" alt="" width="600" height="346" /></a></p>
<p>For this button I will add the following layer styles.</p>
<p><a rel="thumbnail" href="http://www.grafpedia.com/wp-content/uploads/2010/03/91.jpg"><img class="alignnone size-full wp-image-6215" src="http://www.grafpedia.com/wp-content/uploads/2010/03/91.jpg" alt="" width="600" height="444" /></a></p>
<p><a rel="thumbnail" href="http://www.grafpedia.com/wp-content/uploads/2010/03/101.jpg"><img class="alignnone size-full wp-image-6216" src="http://www.grafpedia.com/wp-content/uploads/2010/03/101.jpg" alt="" width="600" height="444" /></a></p>
<p><a rel="thumbnail" href="http://www.grafpedia.com/wp-content/uploads/2010/03/111.jpg"><img class="alignnone size-full wp-image-6217" src="http://www.grafpedia.com/wp-content/uploads/2010/03/111.jpg" alt="" width="600" height="444" /></a></p>
<p><a rel="thumbnail" href="http://www.grafpedia.com/wp-content/uploads/2010/03/121.jpg"><img class="alignnone size-full wp-image-6218" src="http://www.grafpedia.com/wp-content/uploads/2010/03/121.jpg" alt="" width="600" height="444" /></a></p>
<p>This is how my button will look like.</p>
<p><a rel="thumbnail" href="http://www.grafpedia.com/wp-content/uploads/2010/03/131.jpg"><img class="alignnone size-full wp-image-6219" src="http://www.grafpedia.com/wp-content/uploads/2010/03/131.jpg" alt="" width="600" height="351" /></a></p>
<p>I will set my foreground color to #25272a, and I will create two shapes with Rounded Rectangle Tool. please click on the following image to see the full size.</p>
<p><a rel="thumbnail" href="http://www.grafpedia.com/wp-content/uploads/2010/03/141.jpg"><img class="alignnone size-medium wp-image-6220" src="http://www.grafpedia.com/wp-content/uploads/2010/03/141-600x660.jpg" alt="" width="600" height="660" /></a></p>
<p>For both shapes I will add the following layer styles.</p>
<p><a rel="thumbnail" href="http://www.grafpedia.com/wp-content/uploads/2010/03/151.jpg"><img class="alignnone size-full wp-image-6221" src="http://www.grafpedia.com/wp-content/uploads/2010/03/151.jpg" alt="" width="600" height="444" /></a></p>
<p><a rel="thumbnail" href="http://www.grafpedia.com/wp-content/uploads/2010/03/162.jpg"><img class="alignnone size-full wp-image-6222" src="http://www.grafpedia.com/wp-content/uploads/2010/03/162.jpg" alt="" width="600" height="444" /></a></p>
<p><a rel="thumbnail" href="http://www.grafpedia.com/wp-content/uploads/2010/03/171.jpg"><img class="alignnone size-full wp-image-6223" src="http://www.grafpedia.com/wp-content/uploads/2010/03/171.jpg" alt="" width="600" height="444" /></a></p>
<p><a rel="thumbnail" href="http://www.grafpedia.com/wp-content/uploads/2010/03/181.jpg"><img class="alignnone size-full wp-image-6224" src="http://www.grafpedia.com/wp-content/uploads/2010/03/181.jpg" alt="" width="600" height="444" /></a></p>
<p>This is my result</p>
<p><a rel="thumbnail" href="http://www.grafpedia.com/wp-content/uploads/2010/03/191.jpg"><img class="alignnone size-full wp-image-6225" src="http://www.grafpedia.com/wp-content/uploads/2010/03/191.jpg" alt="" width="600" height="363" /></a></p>
<p>Over the top shape I will add another shapes, and I will use the same layer styles. here I will create the hosting plans. If you have more than three plans you can create more shapes.</p>
<p><a rel="thumbnail" href="http://www.grafpedia.com/wp-content/uploads/2010/03/201.jpg"><img class="alignnone size-medium wp-image-6226" src="http://www.grafpedia.com/wp-content/uploads/2010/03/201-600x660.jpg" alt="" width="600" height="660" /></a></p>
<p>With <a rel="http://www.grafpedia.com/images/Horizontal-Type-Tool.jpg" href="http://www.grafpedia.com">Horizontal Type Tool</a>, I will add some text, and in the same time I will add some images with some servers. please click on the following image to see the full size image.</p>
<p><a rel="thumbnail" href="http://www.grafpedia.com/wp-content/uploads/2010/03/211.jpg"><img class="alignnone size-medium wp-image-6227" src="http://www.grafpedia.com/wp-content/uploads/2010/03/211-600x660.jpg" alt="" width="600" height="660" /></a></p>
<p>I have used the following font: Myriad Pro ( italic )<br />
In the middle of the layout I will add a nice image and another text.</p>
<p><a rel="thumbnail" href="http://www.grafpedia.com/wp-content/uploads/2010/03/221.jpg"><img class="alignnone size-medium wp-image-6228" src="http://www.grafpedia.com/wp-content/uploads/2010/03/221-600x660.jpg" alt="" width="600" height="660" /></a></p>
<p>My last step is to create a search box, where your customers will be able to search available domain names. I will use the same layer style I have used for the button.</p>
<p><a rel="thumbnail" href="http://www.grafpedia.com/wp-content/uploads/2010/03/231.jpg"><img class="alignnone size-full wp-image-6229" src="http://www.grafpedia.com/wp-content/uploads/2010/03/231.jpg" alt="" width="600" height="305" /></a></p>
<p>In the footer of the layout, I will add there another shape ( use the same layer styles as above ), and some text. This is my final result. I hope you like it.</p>
<p><a rel="thumbnail" href="http://www.grafpedia.com/wp-content/uploads/2010/03/241.jpg"><img class="alignnone size-medium wp-image-6230" src="http://www.grafpedia.com/wp-content/uploads/2010/03/241-600x660.jpg" alt="" width="600" height="660" /></a></p>
<p><img src="http://feeds.feedburner.com/~r/Grafpedia/~4/AoiynxxxeJk" alt="" width="1" height="1" /></p>

	Tags: <a href="http://xguiden.dk/tag/image/" title="image" rel="tag">image</a>, <a href="http://xguiden.dk/tag/images/" title="images" rel="tag">images</a>, <a href="http://xguiden.dk/tag/internet/" title="internet" rel="tag">internet</a>, <a href="http://xguiden.dk/tag/over/" title="Over" rel="tag">Over</a>, <a href="http://xguiden.dk/tag/server/" title="Server" rel="tag">Server</a>, <a href="http://xguiden.dk/tag/start/" title="Start" rel="tag">Start</a>, <a href="http://xguiden.dk/tag/text/" title="text" rel="tag">text</a>, <a href="http://xguiden.dk/tag/tutorial/" title="tutorial" rel="tag">tutorial</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://xguiden.dk/2010/02/13/big-html-tutorial-reference/" title="Big HTML Tutorial &amp; Reference (13/02/2010)">Big HTML Tutorial &amp; Reference</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/02/13/personal-vcard-pt-2/" title="Personal vCard Pt.2 (13/02/2010)">Personal vCard Pt.2</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/02/13/how-to-make-a-css-sprite-powered-menu/" title="How to Make a CSS Sprite Powered Menu (13/02/2010)">How to Make a CSS Sprite Powered Menu</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/02/15/how-to-code-up-a-web-design-from-psd-to-html/" title="How to Code up a Web Design from PSD to HTML (15/02/2010)">How to Code up a Web Design from PSD to HTML</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/03/08/design-and-code-a-cool-iphone-app-website-in-html5/" title="Design and Code a Cool iPhone App Website in HTML5 (08/03/2010)">Design and Code a Cool iPhone App Website in HTML5</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://xguiden.dk/2010/03/08/how-to-create-a-web-hosting-layout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Design and Code a Cool iPhone App Website in HTML5</title>
		<link>http://xguiden.dk/2010/03/08/design-and-code-a-cool-iphone-app-website-in-html5/</link>
		<comments>http://xguiden.dk/2010/03/08/design-and-code-a-cool-iphone-app-website-in-html5/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 11:41:59 +0000</pubDate>
		<dc:creator>DiscoTK</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Engelske guides]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[avi]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Cool]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[DOCTYPE]]></category>
		<category><![CDATA[fil]]></category>
		<category><![CDATA[FireFox]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[GET]]></category>
		<category><![CDATA[Glow]]></category>
		<category><![CDATA[Header]]></category>
		<category><![CDATA[help]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[IP]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[LP]]></category>
		<category><![CDATA[Mod]]></category>
		<category><![CDATA[Mount]]></category>
		<category><![CDATA[Outline]]></category>
		<category><![CDATA[Over]]></category>
		<category><![CDATA[Photoshop]]></category>
		<category><![CDATA[png]]></category>
		<category><![CDATA[porte]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[Source]]></category>
		<category><![CDATA[Start]]></category>
		<category><![CDATA[tag]]></category>
		<category><![CDATA[tags]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[textur]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[URL]]></category>

		<guid isPermaLink="false">http://xguiden.dk/?p=5520</guid>
		<description><![CDATA[HTML5 is definitely the flavor of the month, with everyone in the design community getting excited about its release. In this tutorial we’ll get a taste of what’s to come by building a cool iPhone app website using a HTML5 structure, and visual styling with some CSS3 effects.

HTML5 isn’t here just yet, but the Working [...]]]></description>
			<content:encoded><![CDATA[<p>HTML5 is definitely the flavor of the month, with everyone in the design community getting excited about its release. In this tutorial we’ll get a taste of what’s to come by building a cool iPhone app website using a HTML5 structure, and visual styling with some CSS3 effects.</p>
<p><a href="http://line25.com/wp-content/uploads/2010/html5/demo/index.html"><img src="http://line25.com/wp-content/uploads/2010/html5/12.png" alt="iPhone app website for PKE Meter" /></a></p>
<p>HTML5 isn’t here just yet, but the Working Draft is complete enough for us to play around and get to grips with the exciting new elements we can use in our code. To learn how a few of these elements can be used, let’s put together a simple website for say, a fictional iPhone app.  This tutorial covered the process of building an interface just like the awesome apps from <a href="http://tapbots.com/">Tapbots</a>, so head over and check it out, then we’ll be ready to build an accompanying website for our PKE Meter application.</p>
<p><a href="http://line25.com/wp-content/uploads/2010/html5/demo/index.html">View the demo</a></p>
<h3>The PSD concept</h3>
<p><img src="http://line25.com/wp-content/uploads/2010/html5/01.png" alt="" /></p>
<p>First, we’ll need to put together a concept for our app website. Create a new document in Photoshop. I use the dimensions of 1680×1050 to give a typical widescreen monitor resolution to work with.</p>
<p><img src="http://line25.com/wp-content/uploads/2010/html5/02.png" alt="" /></p>
<p>Fill the background with grey (#252525), then add some subtle texture by heading to Filter &gt; Noise &gt; Add Noise. Select the Gaussian and Monochromatic options and set the amount to 1.3%.</p>
<p><img src="http://line25.com/wp-content/uploads/2010/html5/03.png" alt="" /></p>
<p>Draw a simple app icon with the rounded rectangle, and type out the name of our app in Helvetica Bold.</p>
<p><img src="http://line25.com/wp-content/uploads/2010/html5/04.png" alt="" /></p>
<p>Double click the layer of each object to add some layer styling. Give each one a Color Overlay of #00ffcc and a soft Outer Glow to create an illuminated appearance.</p>
<p><img src="http://line25.com/wp-content/uploads/2010/html5/05.png" alt="" /></p>
<p>CMD-Click the layer thumbnail of each object to load the selection, then fill a new layer with a horizontal scan-lines pattern.</p>
<p><img src="http://line25.com/wp-content/uploads/2010/html5/06.png" alt="" /></p>
<p>Change the blending mode of the scan-lines to Multiply and drop the opacity to around 35%. Add a little logo and the usual highlight to the iPhone icon graphic.</p>
<p><img src="http://line25.com/wp-content/uploads/2010/html5/07.png" alt="" /></p>
<p>Type out an enticing introduction for the app with the type tool and add the same illuminated layer style. If you haven’t guessed already, the PKE Meter is the tool Egon Spengler uses in Ghostbusters. If Egon was busting ghosts in 2010, there’s no doubt he’d be using his iPhone to track psycho-kinetic energy.</p>
<p><img src="http://line25.com/wp-content/uploads/2010/html5/08.png" alt="" /></p>
<p>Fill out the design with a description of the app. To give the text a little extra pop, add a black drop shadow.</p>
<p><img src="http://line25.com/wp-content/uploads/2010/html5/09.png" alt="" /></p>
<p>Take the time to line-up the elements of your design and finish off the description of the app with a list of features.</p>
<p><img src="http://line25.com/wp-content/uploads/2010/html5/10.png" alt="" /></p>
<p>Download the handy <a href="http://www.teehanlax.com/blog/2009/06/18/iphone-gui-psd-30/">iPhone UI kit</a> from <a href="http://www.teehanlax.com/blog/2009/06/18/iphone-gui-psd-30/">Teehan+Lax</a> and paste in the custom app screenshot in place. Position the iPhone over to the right. Keeping the scale pretty large will help it act as a main focal point for the design and maintain the small details of the app interface.</p>
<p><img src="http://line25.com/wp-content/uploads/2010/html5/11.png" alt="" /></p>
<p>No iPhone app website would be complete without the ‘Available on the App Store’ badge. Paste in a copy of the badge and add some general styling with a subtle Inner Shadow.</p>
<p><img src="http://line25.com/wp-content/uploads/2010/html5/12.png" alt="" /></p>
<p>With just some copyright and disclaimer information added to the footer area, the concept is ready to be sliced and exported. Save the logo, the large iPhone graphic, the app store badge and a clipping of the textured background as PNG graphics.</p>
<h3>The HTML5 structure</h3>
<div>
<pre>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
	&lt;title&gt;PKE METER app for iPhone&lt;/title&gt;
	&lt;link href="style.css" rel="stylesheet" type="text/css" media="screen" /&gt;
&lt;/head&gt;
&lt;body&gt;
	&lt;div id="container"&gt;

	&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
</div>
<p>Next we’ll put together the basics for the HTML index page. The HTML5 doctype is pretty simple indeed. Just add <code>&lt;!DOCTYPE html&gt;</code>. This is followed by some familiar HTML that outlines the <code>&lt;head&gt;</code> and <code>&lt;body&gt;</code>. We’ll add a div with an id of container to enclose all the content in a fixed width.</p>
<div>
<pre>&lt;header&gt;
	&lt;img src="images/logo.png" alt="PKE Meter" id="logo" /&gt;
	&lt;h1&gt;Track ghosts,&lt;br&gt; on your iPhone&lt;/h1&gt;
&lt;/header&gt;
</pre>
</div>
<p>Now the new HTML5 elements will come into play. The <code>&lt;header&gt;</code> element is used to enclose a group of introductory or navigational aids. The logo and intro title of our design would fit perfectly here. The logo itself is added as an image, and the intro, being the most descriptive element is coded in a <code>&lt;h1&gt;</code>.</p>
<div>
<pre>&lt;section&gt;
	&lt;p&gt;Follow in the footsteps of Ghostbuster legend Egon Spengler and become a doctor of parapsychology with the PKE METER app for iPhone.&lt;/p&gt;

	&lt;h2&gt;Features:&lt;/h2&gt;
	&lt;ul&gt;
		&lt;li&gt;Study paranormal activity.&lt;/li&gt;
		&lt;li&gt;Track sources of psycho-kinetic energy.&lt;/li&gt;
		&lt;li&gt;Measure supernatural energy readings.&lt;/li&gt;
	&lt;/ul&gt;
&lt;/section&gt;
</pre>
</div>
<p>A <code>&lt;section&gt;</code> in HTML5 refers to a grouping of content, so all the information about the app in our design can be enclosed in the section element.</p>
<div>
<pre>&lt;aside&gt;
	&lt;a href="#"&gt;&lt;img src="images/iphone.png" alt="iPhone showcasing a screenshot of the PKE METER app." /&gt;&lt;/a&gt;
&lt;/aside&gt;
</pre>
</div>
<p>An <code>&lt;aside&gt;</code> in HTML5 is pretty similar to a <code>&lt;section&gt;</code> as it also basically a grouping of content, but an aside is used specifically for separate content that has a connection to a nearby section. The large graphic of the iPhone and app screenshot is related to the information that’s within the adjacent <code>&lt;section&gt;</code> element in our design, so it would work well as an aside.</p>
<div>
<pre>&lt;footer&gt;
	&lt;a href="#" id="app-store"&gt;Available on the iPhone app store&lt;/a&gt;

	&lt;p&gt;&lt;small&gt;&amp;copy; Paranormal Lab of Columbia University.&lt;/small&gt;&lt;/p&gt;
	&lt;p&gt;&lt;small&gt;Use of PKE METER for long periods may result in brain cell mutation.&lt;/small&gt;&lt;/p&gt;
&lt;/footer&gt;
</pre>
</div>
<p>The <code>&lt;footer&gt;</code> element is another handy structural HTML tag that replaces the old <code>&lt;div id="footer"&gt;</code> method with something more descriptive. Within the footer I’ve used <code>&lt;small&gt;</code> tags to surround the copyright and disclaimer. The <code>&lt;small&gt;</code> element is used to represent small print, and can be used for disclaimers, caveats, legal restrictions and copyrights (not small as in size, as the name suggests.)</p>
<div>
<pre>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
	&lt;title&gt;PKE METER app for iPhone&lt;/title&gt;
	&lt;link href="style.css" rel="stylesheet" type="text/css" media="screen" /&gt;
&lt;/head&gt;

&lt;body&gt;
	&lt;div id="container"&gt;
		&lt;header&gt;
			&lt;img src="images/logo.png" alt="PKE Meter" id="logo" /&gt;
			&lt;h1&gt;Track ghosts,&lt;br&gt; on your iPhone&lt;/h1&gt;
		&lt;/header&gt;

		&lt;section&gt;
			&lt;p&gt;Follow in the footsteps of Ghostbuster legend Egon Spengler and become a doctor of parapsychology with the PKE METER app for iPhone.&lt;/p&gt;

			&lt;h2&gt;Features:&lt;/h2&gt;
			&lt;ul&gt;
				&lt;li&gt;Study paranormal activity.&lt;/li&gt;
				&lt;li&gt;Track sources of psycho-kinetic energy.&lt;/li&gt;
				&lt;li&gt;Measure supernatural energy readings.&lt;/li&gt;
			&lt;/ul&gt;
		&lt;/section&gt;

		&lt;aside&gt;
			&lt;a href="#"&gt;&lt;img src="images/iphone.png" alt="iPhone showcasing a screenshot of the PKE METER app." /&gt;&lt;/a&gt;
		&lt;/aside&gt;

		&lt;footer&gt;
			&lt;a href="#" id="app-store"&gt;Available on the iPhone app store&lt;/a&gt;

			&lt;p&gt;&lt;small&gt;&amp;copy; Paranormal Lab of Columbia University.&lt;/small&gt;&lt;/p&gt;
			&lt;p&gt;&lt;small&gt;Use of PKE METER for long periods may result in brain cell mutation.&lt;/small&gt;&lt;/p&gt;
		&lt;/footer&gt;
	&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
</div>
<p>So here’s our simple HTML5 page altogether. We’ve only used a couple of the new elements, but that’s all we needed for this particular design. It has however, enabled us to create a really clean markup and has seriously cut down on the number of <code>&lt;div&gt;</code> tags scattered around the HTML, making it much more easy to see where specific sections start and end.</p>
<h3>The CSS styling</h3>
<div>
<pre>body, div, h1, h2, h3, h4, h5, h6, p, ul, li, img, header, section, aside, footer, button {
	margin: 0; padding: 0; border: 0;
}

body {
	font-family: Helvetica, Arial, Sans-Serif;
	background: #2b2b2b url(images/bg.png);
}

#container {
	width: 960px;
	margin: 0 auto;
	padding: 90px 0 100px 0;
	position: relative;
	overflow: hidden;
}
</pre>
</div>
<p>Now it’s time to get everything styled up according to the visual concept. To begin, the stylesheet is given a quick reset to strip out the browser default styling, the body is given the dark textured background and the containing div is positioned centrally.</p>
<div>
<pre>header {}
	header img#logo {
		margin: 0 0 50px 0;
	}
	header h1 {
		margin: 0 0 30px 90px;
		font-size: 60px;
		font-weight: normal;
		line-height: 74px;
		color: #00ffcc;
		text-shadow: 0px 0px 10px #00ffcc;
	}
</pre>
</div>
<p><img src="http://line25.com/wp-content/uploads/2010/html5/13.png" alt="" /></p>
<p>The logo and title can be moved into position by editing their margins, and the text for the intro title can be styled up the match the visual concept by adding the bright green color, and the illuminated effect with the CSS3 <code>text-shadow</code> property.</p>
<div>
<pre>section {
	margin: 0 15px 30px 0;
	width: 530px;
	float: left;
}
	section p {
		margin: 0 0 30px 90px;
		font-size: 22px;
		line-height: 35px;
		color: #d9d9d9;
		text-shadow: 0px 1px 5px #000;
	}
	section h2 {
		margin: 0 0 10px 90px;
		font-size: 40px;
		font-weight: normal;
		color: #00ffcc;
		text-shadow: 0px 0px 10px #00ffcc;
	}
	section ul {
		margin: 0 0 30px 90px;
		font-size: 22px;
		line-height: 45px;
		color: #d9d9d9;
		text-shadow: 0px 1px 5px #000;
	}
</pre>
</div>
<p><img src="http://line25.com/wp-content/uploads/2010/html5/14.png" alt="" /></p>
<p>The <code>&lt;section&gt;</code> that contains all the textual information is given a specific width and floated to the left, and all the subsequent content elements such as the header two, paragraphs and unordered list are all given the appropriate font-sizing, margin and coloring to match the PSD concept.</p>
<div>
<pre>aside {
	position: absolute;
	top: 20px;
	right: 0;
}
</pre>
</div>
<p><img src="http://line25.com/wp-content/uploads/2010/html5/15.png" alt="" /></p>
<p>The <code>&lt;aside&gt;</code> can then be moved into place with some absolute positioning. This ensures the iPhone graphic appears 20px from the top of the page, relative to the containing div.</p>
<div>
<pre>footer {
	width: 960px;
	float: left;
	clear: both;
	overflow: hidden;
}
	footer a#app-store {
		display: block;
		width: 198px;
		height: 72px;
		background: url(images/app-store.png);
		text-indent: -9999px;
		margin: 0 0 0 84px;
		float: left;
	}
	footer p {
		float: right;
		clear: right;
		font-size: 16px;
		color: #5a5a5a;
		margin: 10px 0 0 0;
	}
</pre>
</div>
<p><img src="http://line25.com/wp-content/uploads/2010/html5/16.png" alt="" /></p>
<p>The footer can then be cleared so that it sits underneath the previous content and given an <code>overflow:hidden</code> declaration to clear itself after the floats used on the anchor and paragraphs. Speaking of anchors and paragraphs, these elements are each given moved into place with floats to finish off the CSS.</p>
<p><img src="http://line25.com/wp-content/uploads/2010/html5/17.png" alt="" /></p>
<p>Previewing the site in Firefox, Chrome and Safari will show the site in all its coded glory. Unfortunately, Internet Explorer doesn’t share support for HTML5, so it needs a little extra work.</p>
<div>
<pre>&lt;script&gt;
  document.createElement('header');
  document.createElement('footer');
  document.createElement('section');
  document.createElement('aside');
&lt;/script&gt;
</pre>
</div>
<p><img src="http://line25.com/wp-content/uploads/2010/html5/18.png" alt="" /></p>
<p>Because IE doesn’t support HTML5, it just doesn’t recognise those new fancy elements. The good news is it’s easy to tell IE to create them anyway by adding the above Javascript to your <code>&lt;head&gt;</code>. As soon as this code is added, everything looks perfect in IE, albeit with the cool illumination effects being gracefully degraded. It’s worth noting that if Javascript is turned off, IE will show the broken version of the site. Chances are with an iPhone app website like this, the majority of the visitors are going to be clued up on their browsers, so it’s a risk that we could take for this particular design.</p>
<p><a href="http://line25.com/wp-content/uploads/2010/html5/demo/index.html">View the demo</a></p>

	Tags: <a href="http://xguiden.dk/tag/avi/" title="avi" rel="tag">avi</a>, <a href="http://xguiden.dk/tag/chrome/" title="Chrome" rel="tag">Chrome</a>, <a href="http://xguiden.dk/tag/community/" title="Community" rel="tag">Community</a>, <a href="http://xguiden.dk/tag/cool/" title="Cool" rel="tag">Cool</a>, <a href="http://xguiden.dk/tag/css/" title="CSS" rel="tag">CSS</a>, <a href="http://xguiden.dk/tag/css3/" title="css3" rel="tag">css3</a>, <a href="http://xguiden.dk/tag/design/" title="design" rel="tag">design</a>, <a href="http://xguiden.dk/tag/doctype/" title="DOCTYPE" rel="tag">DOCTYPE</a>, <a href="http://xguiden.dk/tag/fil/" title="fil" rel="tag">fil</a>, <a href="http://xguiden.dk/tag/firefox/" title="FireFox" rel="tag">FireFox</a>, <a href="http://xguiden.dk/tag/fix/" title="fix" rel="tag">fix</a>, <a href="http://xguiden.dk/tag/get/" title="GET" rel="tag">GET</a>, <a href="http://xguiden.dk/tag/glow/" title="Glow" rel="tag">Glow</a>, <a href="http://xguiden.dk/tag/header/" title="Header" rel="tag">Header</a>, <a href="http://xguiden.dk/tag/help/" title="help" rel="tag">help</a>, <a href="http://xguiden.dk/tag/html/" title="HTML" rel="tag">HTML</a>, <a href="http://xguiden.dk/tag/html5/" title="html5" rel="tag">html5</a>, <a href="http://xguiden.dk/tag/image/" title="image" rel="tag">image</a>, <a href="http://xguiden.dk/tag/images/" title="images" rel="tag">images</a>, <a href="http://xguiden.dk/tag/internet/" title="internet" rel="tag">internet</a>, <a href="http://xguiden.dk/tag/internet-explorer/" title="Internet Explorer" rel="tag">Internet Explorer</a>, <a href="http://xguiden.dk/tag/ip/" title="IP" rel="tag">IP</a>, <a href="http://xguiden.dk/tag/java/" title="Java" rel="tag">Java</a>, <a href="http://xguiden.dk/tag/javascript/" title="JavaScript" rel="tag">JavaScript</a>, <a href="http://xguiden.dk/tag/lp/" title="LP" rel="tag">LP</a>, <a href="http://xguiden.dk/tag/mod/" title="Mod" rel="tag">Mod</a>, <a href="http://xguiden.dk/tag/mount/" title="Mount" rel="tag">Mount</a>, <a href="http://xguiden.dk/tag/outline/" title="Outline" rel="tag">Outline</a>, <a href="http://xguiden.dk/tag/over/" title="Over" rel="tag">Over</a>, <a href="http://xguiden.dk/tag/photoshop/" title="Photoshop" rel="tag">Photoshop</a>, <a href="http://xguiden.dk/tag/png/" title="png" rel="tag">png</a>, <a href="http://xguiden.dk/tag/porte/" title="porte" rel="tag">porte</a>, <a href="http://xguiden.dk/tag/script/" title="script" rel="tag">script</a>, <a href="http://xguiden.dk/tag/source/" title="Source" rel="tag">Source</a>, <a href="http://xguiden.dk/tag/start/" title="Start" rel="tag">Start</a>, <a href="http://xguiden.dk/tag/tag/" title="tag" rel="tag">tag</a>, <a href="http://xguiden.dk/tag/tags/" title="tags" rel="tag">tags</a>, <a href="http://xguiden.dk/tag/text/" title="text" rel="tag">text</a>, <a href="http://xguiden.dk/tag/textur/" title="textur" rel="tag">textur</a>, <a href="http://xguiden.dk/tag/tutorial/" title="tutorial" rel="tag">tutorial</a>, <a href="http://xguiden.dk/tag/url/" title="URL" rel="tag">URL</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://xguiden.dk/2010/02/15/how-to-code-up-a-web-design-from-psd-to-html/" title="How to Code up a Web Design from PSD to HTML (15/02/2010)">How to Code up a Web Design from PSD to HTML</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/03/03/how-we%e2%80%99ll-be-building-websites-in-5-years-html5-and-css3-layout/" title="How We’ll be Building Websites in 5 years: HTML5 and CSS3 layout (03/03/2010)">How We’ll be Building Websites in 5 years: HTML5 and CSS3 layout</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/02/18/coding-a-css3-html5-one-page-website-template/" title="Coding a CSS3 &amp; HTML5 One-Page Website Template (18/02/2010)">Coding a CSS3 &amp; HTML5 One-Page Website Template</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/03/03/design-a-prettier-web-form-with-css-3/" title="Design a Prettier Web Form with CSS 3 (03/03/2010)">Design a Prettier Web Form with CSS 3</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/02/13/how-to-make-a-css-sprite-powered-menu/" title="How to Make a CSS Sprite Powered Menu (13/02/2010)">How to Make a CSS Sprite Powered Menu</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://xguiden.dk/2010/03/08/design-and-code-a-cool-iphone-app-website-in-html5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a simple Blog System – Part 1</title>
		<link>http://xguiden.dk/2010/03/04/creating-a-simple-blog-system-%e2%80%93-part-1/</link>
		<comments>http://xguiden.dk/2010/03/04/creating-a-simple-blog-system-%e2%80%93-part-1/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 11:48:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Engelske guides]]></category>
		<category><![CDATA[PHP/Mysql]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[fil]]></category>
		<category><![CDATA[Header]]></category>
		<category><![CDATA[IP]]></category>
		<category><![CDATA[max]]></category>
		<category><![CDATA[MYSQL]]></category>
		<category><![CDATA[Over]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[POST]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[Start]]></category>
		<category><![CDATA[system]]></category>
		<category><![CDATA[table]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[URL]]></category>

		<guid isPermaLink="false">http://xguiden.dk/?p=5448</guid>
		<description><![CDATA[

Part 1 – Overview of Functions, Database &#38; Files
Overview
In this tutorial we’ll be creating a very simple blog system. We won’t be using OOP yet in this tutorial. For creating a Blog using OOP in PHP, another more advanced tutorial will be written and posted as well. The same goes for creating a more advance [...]]]></description>
			<content:encoded><![CDATA[<div><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.webcodez.net%2Fphp-mysql%2Fcreating-a-simple-blog-system-part-1%2F"></p>
<p></a></div>
<h2>Part 1 – Overview of Functions, Database &amp; Files</h2>
<h3>Overview</h3>
<p>In this tutorial we’ll be creating a very simple blog system. We won’t be using OOP yet in this tutorial. For creating a Blog using OOP in PHP, another more advanced tutorial will be written and posted as well. The same goes for creating a more advance CMS. However in this tutorial will just be creating a simple Blog system with php functions. Functions will be created for:</p>
<ul>
<li>Connecting to Host &amp; DB</li>
<li>Adding posts</li>
<li>Deleting posts</li>
<li>Adding replies</li>
<li>Deleting replies</li>
<li>Creating categories</li>
<li>Retrieving &amp; Displaying Posts</li>
<li>Add user</li>
<li>Edit user profile</li>
<li>Display user profile</li>
<li>Search</li>
</ul>
<p>Also a simple 2 rows div layout will be created with a side-menu and main content div.</p>
<h3>Database</h3>
<p>Let’s start with creating the database for our simple blog. We’ll call it ‘simple_blog’. However you can call it anything you like as long as you set it correctly in the script later on. Now let’s create the tables inside this database.</p>
<p><strong>Table: posts</strong></p>
<p>The fields that need to be created:</p>
<h2>Posts</h2>
<table cellspacing="1">
<thead>
<tr>
<th align="center">field name</th>
<th align="center">type</th>
<th align="center">max.length</th>
<th align="center">action</th>
<th align="center">extra</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center">id</td>
<td align="center">INT</td>
<td align="center">250</td>
<td align="center">auto_increment</td>
<td align="center">Primary Key</td>
</tr>
<tr>
<td align="center">title</td>
<td align="center">VARCHAR</td>
<td align="center">50</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td align="center">author</td>
<td align="center">INT</td>
<td align="center">250</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td align="center">message</td>
<td align="center">LONGTEXT</td>
<td align="center">10000</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td align="center">timestamp</td>
<td align="center">INT</td>
<td align="center">250</td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
<p><strong>SQL:</strong></p>
<pre>CREATE TABLE IF NOT EXISTS `posts` (
  `id` int(250) NOT NULL AUTO_INCREMENT,
  `title` varchar(50) NOT NULL,
  `author` int(250) NOT NULL,
  `message` longtext NOT NULL,
  `timestamp` int(250) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;</pre>
<p><strong>Table: replies</strong></p>
<h2>Replies</h2>
<table cellspacing="1">
<thead>
<tr>
<th align="center">field name</th>
<th align="center">type</th>
<th align="center">max.length</th>
<th align="center">action</th>
<th align="center">extra</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center">id</td>
<td align="center">INT</td>
<td align="center">250</td>
<td align="center">auto_increment</td>
<td align="center">Primary Key</td>
</tr>
<tr>
<td align="center">postid</td>
<td align="center">INT</td>
<td align="center">250</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td align="center">author</td>
<td align="center">INT</td>
<td align="center">250</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td align="center">message</td>
<td align="center">LONGTEXT</td>
<td align="center">10000</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td align="center">timestamp</td>
<td align="center">INT</td>
<td align="center">250</td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
<pre>CREATE TABLE IF NOT EXISTS `replies` (
  `id` int(250) NOT NULL AUTO_INCREMENT,
  `postid` int(250) NOT NULL,
  `author` int(250) NOT NULL,
  `message` mediumtext NOT NULL,
  `timestamp` int(250) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;</pre>
<p><strong>Table: categories</strong></p>
<h2>Categories</h2>
<table cellspacing="1">
<thead>
<tr>
<th align="center">field name</th>
<th align="center">type</th>
<th align="center">max.length</th>
<th align="center">action</th>
<th align="center">extra</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center">id</td>
<td align="center">INT</td>
<td align="center">250</td>
<td align="center">auto_increment</td>
<td align="center">Primary Key</td>
</tr>
<tr>
<td align="center">name</td>
<td align="center">INT</td>
<td align="center">50</td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
<pre>CREATE TABLE IF NOT EXISTS `categories` (
  `id` int(250) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;</pre>
<p><strong>Table: members</strong></p>
<h2>Members</h2>
<table cellspacing="1">
<thead>
<tr>
<th align="center">field name</th>
<th align="center">type</th>
<th align="center">max.length</th>
<th align="center">action</th>
<th align="center">extra</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center">id</td>
<td align="center">INT</td>
<td align="center">250</td>
<td align="center">auto_increment</td>
<td align="center">Primary Key</td>
</tr>
<tr>
<td align="center">username</td>
<td align="center">VARCHAR</td>
<td align="center">50</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td align="center">password</td>
<td align="center">VARCHAR</td>
<td align="center">50</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td align="center">email</td>
<td align="center">250</td>
<td align="center">10000</td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
<pre>CREATE TABLE IF NOT EXISTS `members` (
  `id` int(250) NOT NULL AUTO_INCREMENT,
  `username` varchar(50) NOT NULL,
  `password` varchar(50) NOT NULL,
  `email` varchar(250) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;</pre>
<h3>Files</h3>
<p>Now we’ve created our database, so let’s start with an overview of the files we’ll be creating now.</p>
<ul>
<li>functions.php</li>
<li>config.php</li>
<li>profile.php</li>
<li>index.php</li>
<li>post.php</li>
<li>includes/header.php</li>
<li>includes/footer.php</li>
<li>includes/sidebar.php</li>
<li>admin/index.php</li>
<li>admin/functions.php</li>
</ul>
<p> </p>
<p>Let’s start with creating our function to connect  to the database we just made.</p>
<p><strong>File: functions.php</strong></p>
<pre>&lt;?php

function connect($connection) {

  $host = $connection[‘host’];
  $user = $connection[‘user’];
  $pass = $connection[‘pass’];
  $db    = $connection[‘db’];
  $conn =  mysql_connect($host, $user, $pass);

  If(!$conn)
    die(“Couldn’t connect to host.”);

  $db = mysql_select_db($db);

  If(!$db)
     die(“Couldn’t connect to database.”);

}

?&gt;</pre>
<p>Allright so first you see we set an argrument variable ‘$connection’ for the function. This variable should be given when calling the function and should contain all host &amp; database info required to connect to the host &amp; database. As you can see inside the function it seperates the sub-variables of the $connection variable into 4 new variables. These are for the host, user, password and database (db). As these are the data required to connect to the host &amp; database and should be set in an array $connection and given to this function with sub-variable ‘host’, ‘user’, ‘pass’ and ‘db’.</p>
<p>We’ll be offering the $connection variable to the function as an array. It will use the sub-variable named ‘host’,  ‘user’, ‘pass’ and ‘db’ to try to establish a connection to the host and database. So these we’ll need to set in our config.php file. We’ll shorten the name of the variable $connection to $conn. As the name of it doesn’t really matter as long as we give it to the function ‘connect’ when calling it.</p>
<p><strong>File: config.php</strong></p>
<pre>&lt;?php

####CONNECTION CONFIGURATION###
$conn[‘host’] = “localhost”;        // database host (name/IP)
$conn[‘user’] = “root”;                // database host username
$conn[‘pass’] = “password”;      // database host password
$conn[‘db’]    = “simple_blog”; //database name

?&gt;</pre>
<p>With this info our function ‘connect’ should be able to establish a connection to the host &amp; database.</p>
<p>We set each sub-variable for the $conn array. So we’ve got one variable ( array ) that contains all sub-variables, all info required for establishing a connection to the database. Which our function <strong>connect</strong> will accomplish.</p>
<p>Let’s include these files to the index file already.</p>
<p><strong>File: index.php</strong></p>
<pre>&lt;?php

include(“functions.php”);

include(“config.php”);

?&gt;</pre>
<p>We can already use our function to connect to the host &amp; database:</p>
<p><strong>File: index.php</strong></p>
<pre>&lt;?php

include(“functions.php”);

include(“config.php”);

connect($conn);

?&gt;</pre>
<p>We provide the array variable $conn to the function which contains all the sub-variables data of host &amp; database ( as we set it in config.php ) required for establishing a connection.</p>
<h3>End of part 1</h3>
<p>That’s it so far! In this part we’ve createn the structure of the script for both files, functions &amp; database purpose. And also we’ve made our first function to establish a connection to the database &amp; host using the configurations for the  connection set in our config.php file we created. In the second part we’ll be creating a basic CSS, Div based 2 columns layout. With a side-bar menu and a main content area where all posts will be appearing. Hope to see you in the next part!</p>

	Tags: <a href="http://xguiden.dk/tag/cms/" title="cms" rel="tag">cms</a>, <a href="http://xguiden.dk/tag/css/" title="CSS" rel="tag">CSS</a>, <a href="http://xguiden.dk/tag/database/" title="database" rel="tag">database</a>, <a href="http://xguiden.dk/tag/fil/" title="fil" rel="tag">fil</a>, <a href="http://xguiden.dk/tag/header/" title="Header" rel="tag">Header</a>, <a href="http://xguiden.dk/tag/ip/" title="IP" rel="tag">IP</a>, <a href="http://xguiden.dk/tag/max/" title="max" rel="tag">max</a>, <a href="http://xguiden.dk/tag/mysql/" title="MYSQL" rel="tag">MYSQL</a>, <a href="http://xguiden.dk/tag/over/" title="Over" rel="tag">Over</a>, <a href="http://xguiden.dk/tag/php/" title="php" rel="tag">php</a>, <a href="http://xguiden.dk/tag/post/" title="POST" rel="tag">POST</a>, <a href="http://xguiden.dk/tag/script/" title="script" rel="tag">script</a>, <a href="http://xguiden.dk/tag/start/" title="Start" rel="tag">Start</a>, <a href="http://xguiden.dk/tag/system/" title="system" rel="tag">system</a>, <a href="http://xguiden.dk/tag/table/" title="table" rel="tag">table</a>, <a href="http://xguiden.dk/tag/text/" title="text" rel="tag">text</a>, <a href="http://xguiden.dk/tag/tutorial/" title="tutorial" rel="tag">tutorial</a>, <a href="http://xguiden.dk/tag/url/" title="URL" rel="tag">URL</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://xguiden.dk/2010/02/13/ajax-enabled-sticky-notes-with-php-and-jquery/" title="AJAX-enabled Sticky Notes With PHP and jQuery (13/02/2010)">AJAX-enabled Sticky Notes With PHP and jQuery</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/02/25/php-and-mysql-file-download-counter/" title="PHP and MySQL File Download Counter (25/02/2010)">PHP and MySQL File Download Counter</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/02/13/file-upload/" title="File Upload (13/02/2010)">File Upload</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/02/13/advanced-event-timeline-with-php-css-and-jquery/" title="Advanced Event Timeline With PHP, CSS and jQuery (13/02/2010)">Advanced Event Timeline With PHP, CSS and jQuery</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/02/18/make-your-mootools-code-shorter-faster-and-stronger/" title="Make your MooTools Code Shorter, Faster, and Stronger (18/02/2010)">Make your MooTools Code Shorter, Faster, and Stronger</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://xguiden.dk/2010/03/04/creating-a-simple-blog-system-%e2%80%93-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creative Button Animations with Sprites and JQuery (Part 1: Photoshop)</title>
		<link>http://xguiden.dk/2010/03/03/creative-button-animations-with-sprites-and-jquery-part-1-photoshop/</link>
		<comments>http://xguiden.dk/2010/03/03/creative-button-animations-with-sprites-and-jquery-part-1-photoshop/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 22:07:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Engelske guides]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Photoshop]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[avi]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[fil]]></category>
		<category><![CDATA[Gradient]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[IP]]></category>
		<category><![CDATA[Over]]></category>
		<category><![CDATA[png]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://xguiden.dk/?p=5322</guid>
		<description><![CDATA[This tutorial will show you how to build creative hover animations for buttons using sprites. The particular effect illustrated in this tutorial is inspired by the “Download” buttons on Tutorial9.net. Part 1 of this tutorial explains the design process in Photoshop. In Part 2 we will convert it to XHTML + CSS and as a [...]]]></description>
			<content:encoded><![CDATA[<p>This tutorial will show you how to build creative hover animations for buttons using sprites. The particular effect illustrated in this tutorial is inspired by the “Download” buttons on Tutorial9.net. Part 1 of this tutorial explains the design process in Photoshop. In Part 2 we will convert it to XHTML + CSS and as a bonus we will also use jQuery for a fading hover effect.</p>
<p><a href="http://tutorial9.net/demos/button-sprites/demo.html"></a></p>
<p><strong>Skip to Part 2:</strong> (<em>Demo files available for download</em>)</p>
<h3>Step 1 – Create the shape</h3>
<p>Create a new document in photoshop fit to your needs. In this instance, I’ll be creating a 570px wide button. The height of the new canvas should be <strong>twice</strong> the height of the button needed (<em>explained later, but for now just use the top half of the canvas</em>).</p>
<div><img src="http://tutorial9.s3.amazonaws.com/wp-content/uploads/2010/02/design_1.png" alt="shape of the button" width="600" height="180" /></div>
<p>We’re going to make a rounded button. Use the <strong>Rounded Rectangle Tool</strong> with a <strong>radius of 5px</strong>. Keep in mind that we will add a border and shadow, so leave some white space around the button.</p>
<h3>Step 2 – Add layer styles</h3>
<p>We will use a pretty basic color scheme for the initial state of the button. The surprise (<em>I call it the wow-effect because of the contrast</em>) will be added in the color scheme of the hover state<em> </em> button.</p>
<div>
<h4>Note from Editor</h4>
<p>The diagrams shown are not in English, but the diagrams will apply to English versions of Photoshop as well. We apologize for any inconvenience.</p>
</div>
<p><strong>Drop shadow</strong></p>
<div><img src="http://tutorial9.s3.amazonaws.com/wp-content/uploads/2010/02/design_2.png" alt="Drop shadow" width="571" height="348" /></div>
<p><strong>Gradient overlay</strong></p>
<div><img src="http://tutorial9.s3.amazonaws.com/wp-content/uploads/2010/02/design_3.png" alt="Gradient overlay" width="571" height="348" /></div>
<p><strong>Stroke</strong></p>
<div><img src="http://tutorial9.s3.amazonaws.com/wp-content/uploads/2010/02/design_4.png" alt="Stroke" width="571" height="453" /></div>
<h3>Step 3 – Highlights</h3>
<div><img src="http://tutorial9.s3.amazonaws.com/wp-content/uploads/2010/02/design_5.png" alt="highlight, gloss" width="300" height="241" /></div>
<p>Select the the shape of the button: <strong>Ctrl</strong> (Cmd for Mac users) +<strong> Click the Layer Thumbnail</strong> in the Layers Palette. Now add a new layer and fill the selection with the color <strong>#fafafa</strong> (use the <strong>Bucket tool</strong>). Select the <strong>selection tool</strong> and move the selection 1px to the right. Now click <strong>backspace</strong> and the selection will be deleted. Now you need to move the selection 1px up and delete the selection. The last step is to move the selection 2px down and delete the selection. What remains is a sleek highlight effect on the left side of the button.</p>
<p>Apply the same trick on the right side of the button.</p>
<h3>Step 4 – Button text</h3>
<p>Type the text &#8220;Send&#8221; or &#8220;Submit&#8221;, or whatever you wish:</p>
<ul>
<li>font: Helvetica Neue Bold</li>
<li>font-size: 35px</li>
<li>color: #343434</li>
</ul>
<p>Add also the following layer style:</p>
<div><img src="http://tutorial9.s3.amazonaws.com/wp-content/uploads/2010/02/design_6.png" alt="Text with layer styles" width="571" height="215" /></div>
<p><strong>Final image</strong></p>
<div><img src="http://tutorial9.s3.amazonaws.com/wp-content/uploads/2010/02/design_7.png" alt="Text with layer styles" width="570" height="64" /></div>
<p> </p>
<h3>Step 5 – Prepare the canvas for a sprite</h3>
<p>We’re going to make a sprite of the buttons. Why sprites and not single images? Why combine all those images? Isn’t it quicker to have smaller images?</p>
<blockquote><p><a href="http://www.tutorial9.net/web-tutorials/building-faster-websites-with-css-sprites/">Using CSS sprites</a> allows you to greatly increase your websites speed by using single image files that contain multiple graphics. In other words, when you have many images to be used, instead of having them as different individual files, we combine them into one. Therefore, the client computer only downloads one image for all the different graphics to be displayed.</p></blockquote>
<p>Measure the height of the button. My example has a height of 64px. The <em>link hover</em> button will have the same size as the <em>link</em> button so my Photoshop canvas needs to have a height of 128px (= 2 x 64px). Use Ctrl/Cmd + Alt + C to change the height of the canvas.</p>
<h3>Step 6 – The link hover button</h3>
<p>Select all layers in the layers palette and place them in one group. Duplicate this group and move it down to the empty space. Now you have the same two buttons in the sprite.</p>
<div><img src="http://tutorial9.s3.amazonaws.com/wp-content/uploads/2010/02/design_8.png" alt="Sprite image" width="570" height="128" /></div>
<p>Change the color of the copied text to <strong>#fffff</strong> and change the drop shadow:</p>
<div><img src="http://tutorial9.s3.amazonaws.com/wp-content/uploads/2010/02/design_9.png" alt="Drop shadow text hover button" width="571" height="215" /></div>
<p>Add the following layer styles on the copied button shape:</p>
<p><strong>Drop shadow</strong>: don’t change it.</p>
<p><strong>Gradient overlay</strong></p>
<div><img src="http://tutorial9.s3.amazonaws.com/wp-content/uploads/2010/02/design_10.png" alt="Gradient overlayhover button" width="571" height="348" /></div>
<p><strong>Stroke</strong></p>
<div><img src="http://tutorial9.s3.amazonaws.com/wp-content/uploads/2010/02/design_11.png" alt="Stroke hover button" width="571" height="453" /></div>
<p><strong>Final touches</strong></p>
<p>We’re going to add some gloss to the <em>link hover</em> button. Select the the shape of the button: <strong>Ctrl/Cmd + Click the Layer Thumbnail</strong> in the Layers Palette. And fill a new layer with the color<strong> #ffffff </strong>using the <strong>Bucket</strong> tool. Cut Away the bottom part with the Selection tool and change the <strong>opacity to 7%</strong>.</p>
<div><img src="http://tutorial9.s3.amazonaws.com/wp-content/uploads/2010/02/design_12.png" alt="Gloss effects" width="570" height="192" /></div>
<p>The final touch is changing the opacity of the highlights to 30% (which is already applied in the image above), because the original ones are too strong for the green button.</p>
<p><strong>Final image</strong></p>
<div><img src="http://tutorial9.s3.amazonaws.com/wp-content/uploads/2010/02/design_13.png" alt="Final sprite" width="570" height="128" /></div>
<p><a href="http://www.tutorial9.net/web-tutorials/creative-button-animations-with-sprites-and-jquery-part-2/"></a></p>
<div>
<h4>Ending Design Note: Create your own buttons</h4>
<p>Use colors that fit into your design. To create a simple 3D effect for the <em>link hover</em> button, you can also flip (the background of) the link button vertically. This works fine if you’re using a simple gradient.</p>
<p>Don’t use too many buttons like these on your website. If you wan’t to use several buttons on one page it’s better to create small buttons</p>
</div>

	Tags: <a href="http://xguiden.dk/tag/3d/" title="3D" rel="tag">3D</a>, <a href="http://xguiden.dk/tag/animation/" title="animation" rel="tag">animation</a>, <a href="http://xguiden.dk/tag/avi/" title="avi" rel="tag">avi</a>, <a href="http://xguiden.dk/tag/css/" title="CSS" rel="tag">CSS</a>, <a href="http://xguiden.dk/tag/design/" title="design" rel="tag">design</a>, <a href="http://xguiden.dk/tag/fil/" title="fil" rel="tag">fil</a>, <a href="http://xguiden.dk/tag/gradient/" title="Gradient" rel="tag">Gradient</a>, <a href="http://xguiden.dk/tag/html/" title="HTML" rel="tag">HTML</a>, <a href="http://xguiden.dk/tag/image/" title="image" rel="tag">image</a>, <a href="http://xguiden.dk/tag/images/" title="images" rel="tag">images</a>, <a href="http://xguiden.dk/tag/ip/" title="IP" rel="tag">IP</a>, <a href="http://xguiden.dk/tag/over/" title="Over" rel="tag">Over</a>, <a href="http://xguiden.dk/tag/photoshop/" title="Photoshop" rel="tag">Photoshop</a>, <a href="http://xguiden.dk/tag/png/" title="png" rel="tag">png</a>, <a href="http://xguiden.dk/tag/text/" title="text" rel="tag">text</a>, <a href="http://xguiden.dk/tag/tutorial/" title="tutorial" rel="tag">tutorial</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://xguiden.dk/2010/03/03/design-a-prettier-web-form-with-css-3/" title="Design a Prettier Web Form with CSS 3 (03/03/2010)">Design a Prettier Web Form with CSS 3</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/02/13/personal-vcard-pt-2/" title="Personal vCard Pt.2 (13/02/2010)">Personal vCard Pt.2</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/02/15/how-to-code-up-a-web-design-from-psd-to-html/" title="How to Code up a Web Design from PSD to HTML (15/02/2010)">How to Code up a Web Design from PSD to HTML</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/02/18/coding-a-css3-html5-one-page-website-template/" title="Coding a CSS3 &amp; HTML5 One-Page Website Template (18/02/2010)">Coding a CSS3 &amp; HTML5 One-Page Website Template</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/03/08/design-and-code-a-cool-iphone-app-website-in-html5/" title="Design and Code a Cool iPhone App Website in HTML5 (08/03/2010)">Design and Code a Cool iPhone App Website in HTML5</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://xguiden.dk/2010/03/03/creative-button-animations-with-sprites-and-jquery-part-1-photoshop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creative Button Animations with Sprites and JQuery (Part 2: CSS, XHTML, JQuery)</title>
		<link>http://xguiden.dk/2010/03/03/creative-button-animations-with-sprites-and-jquery-part-2-css-xhtml-jquery/</link>
		<comments>http://xguiden.dk/2010/03/03/creative-button-animations-with-sprites-and-jquery-part-2-css-xhtml-jquery/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 22:06:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Engelske guides]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[fil]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[IP]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Over]]></category>
		<category><![CDATA[png]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[Source]]></category>
		<category><![CDATA[tag]]></category>
		<category><![CDATA[tags]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[URL]]></category>

		<guid isPermaLink="false">http://xguiden.dk/?p=5323</guid>
		<description><![CDATA[In Part 1 of this tutorial, you designed a button sprite that will be coded with HTML, CSS, and JQuery in this part of the tutorial.
If you do not want to complete part one of this tutorial, you can download the source files created in that lesson here.
Step 1 – HTML
Different people will require a [...]]]></description>
			<content:encoded><![CDATA[<p>In Part 1 of this tutorial, you designed a button sprite that will be coded with HTML, CSS, and JQuery in this part of the tutorial.</p>
<p>If you do not want to complete part one of this tutorial, you can <strong>download the source files</strong> created in that lesson <a href="http://tutorial9.s3.amazonaws.com/wp-content/uploads/2010/02/Button-Source-Files-and-Demo.zip">here</a>.</p>
<h3>Step 1 – HTML</h3>
<p>Different people will require a button for different purposes. The remainder of this tutorial will explain a simple scenario where the button functions as a simple download link. Create a link to an imaginary (<em>or real</em>) file for download:</p>
<pre>&lt;a href="path/to/download.zip" class="button"&gt;&lt;/a&gt;</pre>
<h3>Step 2 – CSS</h3>
<p>Add the following CSS to your HTML document:</p>
<pre>.button {
	width:570px;
	height:64px; /* Notice that the height is not the height of the whole sprite, but the height of one single button */
	display:block;
	background-image:url(images/downloadbutton.png); /*path to the sprite*/
	background-position: top; /* the background position (in combination with the height!) makes it possible that only the top of the whole sprite will be visible */
}</pre>
<p>When you apply the CSS code above, you will only see the <strong>grey</strong> button, because it’s <em>positioned on top</em> and the <em>height is 64px</em></p>
<p><strong>Link hover button</strong></p>
<pre>.button:hover{
	width:570px;
	background-position: bottom;
	height:64px;
	background-image:url(images/downloadbutton.png) no repeat;
}</pre>
<p>When you apply the CSS code above, you will only see the <strong>green</strong> button when you hover the download button, because it’s <em>positioned at the bottom</em> and the <em>height is 64px</em></p>
<p><strong>Demo:</strong> <a rel="external" href="http://tutorial9.net/demos/button-sprites/demo.html">View Live Demo</a></p>
<h3>Step 3 – Fading hover effect</h3>
<p>This step is not necessary, but it’s an optional step. The transition will be smoothed with JavaScript. We’re going to use the popular jQuery library.</p>
<p>The original tutorial comes from <a rel="external" href="http://greg-j.com/static-content/hover-fade-redux.html">this website</a>. I’ll do my best to explain.</p>
<h3>Step 4 – Add code between the head tags</h3>
<p><a rel="external" href="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js">Download jQuery</a>. First we need to refer in the head to the .js file that we’ve just downloaded.</p>
<pre>&lt;script type="text/javascript" src="path/to/jquery-1.3.2.min.js"&gt;&lt;/script&gt;</pre>
<p>After that we can add the following code between the head tags.</p>
<pre>&lt;script type="text/javascript"&amp;gt
	$(document).ready(function() {
		// Add the class 'button' just like in CSS with a dot in front of it
		$('.button').append('&lt;span class="hover"&amp;gt&lt;/span&amp;gt').each(function () {
	  		var $span = $('&amp;gt span.hover', this).css('opacity', 0);
	  		$(this).hover(function () {
	    		$span.stop().fadeTo(500, 1); //Change the number 500 to change the speed of the Fade In
	 		}, function () {
	   	$span.stop().fadeTo(500, 0); //Change the number 500 to change the speed of the Fade Out
	  		});
		});
	});
&lt;/script&gt;</pre>
<div>
<h4>How to deal with several buttons on one page</h4>
<p>If you have several buttons on one page and you’d like to add the fading hover effect, you can give it a different class in the HTML and add this in the JavaScript above after the word .button and you need also to separate the words with a comma. (Example: ‘.button,.buttonTwo’)</p>
</div>
<h3>Step 5 – Edit the CSS</h3>
<pre>.button {
	position:relative;
	display:block;
	height: 64px;
	width: 570px;
	background:url(images/downloadbutton.png) no-repeat;
	background-position: top;
}</pre>
<pre>.button span.hover { /*notice the different class: span.hover*/
	position: absolute;
	display: block;
	height: 64px;
	width: 570px;
	background: url(images/downloadbutton.png) no-repeat;
	background-position: bottom;
}</pre>
<p><a rel="external" href="http://tutorial9.net/demos/button-sprites/demo.html">View Live Demo</a> to check the result.</p>
<h3>Download the source files (PSD included)</h3>
<div><a rel="external" href="http://www.tutorial9.net/wp-content/uploads/2010/02/Button-Source-Files-and-Demo.zip">Download</a></div>
<p><a href="http://feedads.g.doubleclick.net/~a/wmKScpUgbZJn0S3ZMx4Pr4Cgi7I/0/da"><img src="http://feedads.g.doubleclick.net/~a/wmKScpUgbZJn0S3ZMx4Pr4Cgi7I/0/di" border="0" alt="" /></a><br />
<a href="http://feedads.g.doubleclick.net/~a/wmKScpUgbZJn0S3ZMx4Pr4Cgi7I/1/da"><img src="http://feedads.g.doubleclick.net/~a/wmKScpUgbZJn0S3ZMx4Pr4Cgi7I/1/di" border="0" alt="" /></a></p>
<div><a href="http://feeds.feedburner.com/~ff/tutorial9?a=ah9hL4UWD4Q:F8fjrMYYvMY:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/tutorial9?i=ah9hL4UWD4Q:F8fjrMYYvMY:D7DqB2pKExk" border="0" alt="" /></a> <a href="http://feeds.feedburner.com/~ff/tutorial9?a=ah9hL4UWD4Q:F8fjrMYYvMY:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/tutorial9?i=ah9hL4UWD4Q:F8fjrMYYvMY:gIN9vFwOqvQ" border="0" alt="" /></a> <a href="http://feeds.feedburner.com/~ff/tutorial9?a=ah9hL4UWD4Q:F8fjrMYYvMY:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/tutorial9?i=ah9hL4UWD4Q:F8fjrMYYvMY:F7zBnMyn0Lo" border="0" alt="" /></a> <a href="http://feeds.feedburner.com/~ff/tutorial9?a=ah9hL4UWD4Q:F8fjrMYYvMY:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/tutorial9?d=7Q72WNTAKBA" border="0" alt="" /></a> <a href="http://feeds.feedburner.com/~ff/tutorial9?a=ah9hL4UWD4Q:F8fjrMYYvMY:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/tutorial9?d=qj6IDK7rITs" border="0" alt="" /></a></div>
<p><img src="http://feeds.feedburner.com/~r/tutorial9/~4/ah9hL4UWD4Q" alt="" width="1" height="1" /></p>

	Tags: <a href="http://xguiden.dk/tag/animation/" title="animation" rel="tag">animation</a>, <a href="http://xguiden.dk/tag/css/" title="CSS" rel="tag">CSS</a>, <a href="http://xguiden.dk/tag/design/" title="design" rel="tag">design</a>, <a href="http://xguiden.dk/tag/fil/" title="fil" rel="tag">fil</a>, <a href="http://xguiden.dk/tag/html/" title="HTML" rel="tag">HTML</a>, <a href="http://xguiden.dk/tag/image/" title="image" rel="tag">image</a>, <a href="http://xguiden.dk/tag/images/" title="images" rel="tag">images</a>, <a href="http://xguiden.dk/tag/ip/" title="IP" rel="tag">IP</a>, <a href="http://xguiden.dk/tag/java/" title="Java" rel="tag">Java</a>, <a href="http://xguiden.dk/tag/javascript/" title="JavaScript" rel="tag">JavaScript</a>, <a href="http://xguiden.dk/tag/over/" title="Over" rel="tag">Over</a>, <a href="http://xguiden.dk/tag/png/" title="png" rel="tag">png</a>, <a href="http://xguiden.dk/tag/script/" title="script" rel="tag">script</a>, <a href="http://xguiden.dk/tag/source/" title="Source" rel="tag">Source</a>, <a href="http://xguiden.dk/tag/tag/" title="tag" rel="tag">tag</a>, <a href="http://xguiden.dk/tag/tags/" title="tags" rel="tag">tags</a>, <a href="http://xguiden.dk/tag/text/" title="text" rel="tag">text</a>, <a href="http://xguiden.dk/tag/tutorial/" title="tutorial" rel="tag">tutorial</a>, <a href="http://xguiden.dk/tag/url/" title="URL" rel="tag">URL</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://xguiden.dk/2010/03/08/design-and-code-a-cool-iphone-app-website-in-html5/" title="Design and Code a Cool iPhone App Website in HTML5 (08/03/2010)">Design and Code a Cool iPhone App Website in HTML5</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/02/13/jquery-ajax-validation-contact-form-with-modal-slide-in-transition/" title="jQuery AJAX Validation Contact Form with Modal + Slide-in Transition (13/02/2010)">jQuery AJAX Validation Contact Form with Modal + Slide-in Transition</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/03/03/how-we%e2%80%99ll-be-building-websites-in-5-years-html5-and-css3-layout/" title="How We’ll be Building Websites in 5 years: HTML5 and CSS3 layout (03/03/2010)">How We’ll be Building Websites in 5 years: HTML5 and CSS3 layout</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/02/15/how-to-code-up-a-web-design-from-psd-to-html/" title="How to Code up a Web Design from PSD to HTML (15/02/2010)">How to Code up a Web Design from PSD to HTML</a> (0)</li>
	<li><a href="http://xguiden.dk/2010/02/18/coding-a-css3-html5-one-page-website-template/" title="Coding a CSS3 &amp; HTML5 One-Page Website Template (18/02/2010)">Coding a CSS3 &amp; HTML5 One-Page Website Template</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://xguiden.dk/2010/03/03/creative-button-animations-with-sprites-and-jquery-part-2-css-xhtml-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
