<?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>Design Shack &#187; tutorial</title>
	<atom:link href="http://designshack.net/tag/tutorial/feed" rel="self" type="application/rss+xml" />
	<link>http://designshack.net</link>
	<description>Inspiration, CSS Gallery &#38; Community News</description>
	<lastBuildDate>Thu, 09 Feb 2012 06:00:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Tips for Designing Sleek iPhone App UI Layouts in Photoshop</title>
		<link>http://designshack.net/articles/graphics/tips-for-designing-sleek-iphone-app-ui-layouts-in-photoshop/</link>
		<comments>http://designshack.net/articles/graphics/tips-for-designing-sleek-iphone-app-ui-layouts-in-photoshop/#comments</comments>
		<pubDate>Thu, 20 Oct 2011 14:00:27 +0000</pubDate>
		<dc:creator>Jake Rocheleau</dc:creator>
				<category><![CDATA[Graphics]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[mockup]]></category>
		<category><![CDATA[photoshop]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://designshack.net/?p=25817</guid>
		<description><![CDATA[Graphic design for the web has been a popular trend for ages. And with the invent of Apple&#8217;s iPhone back in 2007 the app store has grown a tremendous amount. Now we have iOS app designers and developers coming together to build some really fantastic conceptions into reality. But if you&#8217;re not fond of learning [...]]]></description>
			<content:encoded><![CDATA[<p>Graphic design for the web has been a popular trend for ages. And with the invent of Apple&#8217;s iPhone back in 2007 the app store has grown a tremendous amount. Now we have iOS app designers and developers coming together to build some really fantastic conceptions into reality.</p>
<div class="tutorialimage"><a href="http://www.flickr.com/photos/jorgeq82/4732700819/"><img class="alignNone size-full" src="http://designshack.net/wp-content/uploads/iphone4-black-apps-display.jpg" alt="iPhone 4 Home Screen - App Display" width="510" /></a></div>
<p>But if you&#8217;re not fond of learning Xcode and programming Objective-C, Photoshop may hold more interest. Below I&#8217;ll offer some of the tips I&#8217;ve picked up for designing killer iOS app mockups. And since there are always new trends emerging the design community is constantly redefining how to create apps. Think of this as more of a beginner&#8217;s resource guide to designing for Apple devices.</p>
<p><span id="more-25817"></span></p>
<p><em>Like the article? Be sure to subscribe to our <a href="feed://feeds.feedburner.com/designshack">RSS feed</a> and follow us on <a href="http://twitter.com/designshack">Twitter</a> to stay up on recent content.</em></p>
<h2>Proper Document Settings</h2>
<p>Before even considering elements on the page, you should understand how the iPhone graphics are created. In the newer retina display on iPhone 4/4S models the screen is still physically measured in the same size. However the display in pixels is actually doubled from the original &#8211; meaning we use 640&#215;960 at 326ppi resolution.</p>
<p>Additionally the iPhone 3/3GS icons were generally 57&#215;57 pixels. iPhone 4 and 4S screens use 114&#215;114 by default (but will scale up for older resolutions). Thankfully the icon design process is fairly detached from creating a UI layout. But as a designer it never hurts to build both skills.</p>
<div class="tutorialimage"><img class="alignNone size-full" src="http://designshack.net/wp-content/uploads/photoshop-iphone4-retina-preset.jpg" alt="iPhone 4 Retina Display PS Preset" width="510" /></div>
<p>If you&#8217;ll be using these settings a lot I recommend saving them as preset document size. In the new document window for Photoshop you&#8217;ll see a button labeled &#8220;Save Preset&#8230;&#8221;. Just give it a name and you can select this from the dropdown list every time you create a new doc.</p>
<p>Instead of creating the iPhone UI elements manually a blog Teehan+Lax offers a <a href="http://www.teehanlax.com/downloads/iphone-4-guid-psd-retina-display/">free UI kit download</a> specifically for Photoshop. This includes an iPhone 4 render, top bars, buttons, keyboards, and tons of other useful stuff. Definitely grab this first and save it to a local directory where you have easy access to these elements.</p>
<h2>Customize the Bars &amp; Buttons</h2>
<p>Both the top and bottom area of your app will likely contain menu bars. The top is used for labeling the current view, along with back and edit buttons. The bottom is generally navigation and most commonly uses tabs to accomplish this.</p>
<p>Teehan+Lax uses some really generic examples for these. But they are much easier to customize with your own colors, textures, and whatever other eye-candy you&#8217;ve got. So as an example let&#8217;s take the Group layer <strong>Bar (Grey-Blue)</strong> and drag it into a new iPhone-sized document window. Then click the small triangle to the left and open open another sub-group labeled <strong>Bar Top</strong>. At the very bottom is a background layer with an overlay effect for the gradient.</p>
<div class="tutorialimage"><img class="alignNone size-full" src="http://designshack.net/wp-content/uploads/gradient-example-topbar.jpg" alt="Example Top Bar gradient style" width="510" /></div>
<p>Open FX on this background layer and double-click on gradient overlay. I removed the default colors from Apple and have set (from left to right) #3478a7 to #5eb0e7. Also the two buttons will have to lose their gradients &#8211; for these I used the values #052b50 to #044a8e for a rich dark effect.</p>
<h2>Fun with Textures</h2>
<p>You can tell just by these small gradient changes that customizing your app is a fairly simple task. For just a bit of detail we can add a texture or pattern over the bar gradient area. We&#8217;ll go with some slanted stripes for this demo example.</p>
<p>Start by creating a new document 7&#215;7 pixels with a transparent background. Then set your pencil tool at the smallest scale (1px by 1px) and connect from the top-right corner into the bottom left corner. I&#8217;ve used black HEX#000000 but it shouldn&#8217;t matter since you can always change the color later. Check out the screenshot below if you don&#8217;t follow:</p>
<div class="tutorialimage"><img class="alignNone size-full" src="http://designshack.net/wp-content/uploads/pattern-define-photoshop-stripe.jpg" alt="basic pattern definition within Adobe Photoshop" width="510" /></div>
<p>Now hit <em>Edit -&gt; Define Pattern&#8230;</em> and give it a name, then hit save. Feel free to close the window now (without saving) since all we needed was the pattern. Now back into the <strong>bar top</strong> group create a new layer above background. CMD+click or CTRL+click on the vector mask which will select all of the background gradient bar.</p>
<p>But make sure you click back onto the new layer just created so it&#8217;s highlighted in blue. We&#8217;re going to fill it with this new pattern but we only want to see stripes over the top bar gradient (and below the buttons). In the top menu go to <em>Edit -&gt; Fill</em> and select &#8220;Pattern&#8221; from the dropdown menu. In the box below you should select the last dotted pattern and hit OK.</p>
<div class="tutorialimage"><img class="alignNone size-full" src="http://designshack.net/wp-content/uploads/gradient-texture-stripes-topbar.jpg" alt="First texture with striped bars" width="510" /></div>
<p>The lines seem fairly rigid at first. So in the layers pallet drop the fill down to about 20% value. Also we could change the blending mode to Overlay so the bars will flow with the gradient colors. Zoom back out to 100% and check out the awesome effect!</p>
<div class="tutorialimage"><img class="alignNone size-full" src="http://designshack.net/wp-content/uploads/gradient-texture2-topbar.jpg" alt="2nd texture addition of pluses" width="510" /></div>
<p>You can build another sweet texture by setting up a 3px by 3px doc and filling in a plus symbol. I added an example above of how this changes the look of our top bar gradient so dramatically. You may also try changing the color from pure black to pure white #FFFFFF.</p>
<h2>Tab Bar Icons</h2>
<p>The navigation buttons found at the bottom of your app are crucial to the overall user experience. Users need to figure out where to edit settings, how to perform tasks and what to do in your app quickly. Otherwise they often grow frustrated or bored and quit trying. So as one more tip let&#8217;s spruce up the nav area in the bottom bar.</p>
<p>Using the same iPhone 4 GUI PSD file locate the &#8220;tab bar&#8221; group. Remember you can do this by CMD/CTRL+clicking on the block in Photoshop. Similar to the top bar we can edit the background FX gradient for some matching styles. But alternatively the black default gradient does go well with most color schemes.</p>
<p>For some icons I highly recommend <a href="http://blog.twg.ca/2010/11/retina-display-icon-set/">The Working Group&#8217;s retina set</a> which come in 24px, 48px, and 64px. Each of the icons from the GUI PSD have FX layer styles applied &#8211; basically a light drop shadow and an overlay gradient. These small bits of detail really add up to a terrific design, so pay close attention to your pixels. Try using this <a href="http://www.colorblender.com/">color scheme designer</a> if you&#8217;re having troubles.</p>
<div class="tutorialimage"><img class="alignNone size-full" src="http://designshack.net/wp-content/uploads/tabbar-lower-icons-example.jpg" alt="customized gradients and tab icons" width="510" /></div>
<p>You should think about how text labels will affect the user experience. If you feel the tab icons are enough on their own then label text may just get in the way. However it is important to keep your options open and play around with a few different ideas. Try to get the opinions of friends and co-workers to see which method is best for your app.</p>
<p>Another fairly popular technique is for app designers to create a center button splitting the tab bar into 5 slots. I have seen a lot of really creative applications using this design to save space and add some elegance into the navigation. Formspring is one example, I added the screen below.</p>
<div class="tutorialimage"><img class="alignNone size-full" src="http://designshack.net/wp-content/uploads/formspring-app-preview-tab-button.jpg" alt="Formspring app tab bar icon" width="510" /></div>
<h2>Helpful Links</h2>
<ul>
<li><a href="http://glyphish.com/">Glyphish Icon Set</a></li>
<li><a href="http://mobile.tutsplus.com/tutorials/mobile-design-tutorials/design-an-iphone-bank-app-in-photoshop-part-1/">Design an iPhone Bank App in Photoshop[Tutorial]</a></li>
<li><a href="http://www.bamboudesign.com/preso/photoshop/iphoneappdesign_Photoshop_PDF.pdf">Design iPhone Applications in Photoshop[PDF]</a></li>
<li><a href="http://www.onextrapixel.com/2011/04/12/a-useful-collection-of-iphoneipad-apps-developer-tools-and-resources/">Useful Collection of iPhone/iPad App Developer Tools and Resources</a></li>
<li><a href="http://designshack.net/articles/layouts/ios-usability-tips-and-resources-for-iphone-and-ipad-apps/">iOS Usability Tips and Resources for iPhone and iPad Apps</a></li>
<li><a href="http://coding.smashingmagazine.com/2009/08/11/how-to-create-your-first-iphone-application/">How To Create Your First iPhone Application</a></li>
</ul>
<h2>Conclusion</h2>
<p>These strategies for working with iOS apps and Adobe Photoshop will come in handy as you further develop your design senses. Mobile applications are a whole different ballgame compared to websites and logos. Keep this in mind throughout the process since you&#8217;ll constantly be learning new techniques.</p>
<p>Along with the links added above you should feel much more comfortable moving forward with app interface design. Layout mockups are always difficult and require time to build and study. But if you have enough dedication the mobile market is possibly the most prosperous area to be. If you have additional questions or comments please let us know in the discussion area below.</p>
]]></content:encoded>
			<wfw:commentRss>http://designshack.net/articles/graphics/tips-for-designing-sleek-iphone-app-ui-layouts-in-photoshop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Code a Web Magazine Style Dropdown Navigation Menu</title>
		<link>http://designshack.net/articles/javascript/code-a-web-magazine-style-dropdown-navigation-menu/</link>
		<comments>http://designshack.net/articles/javascript/code-a-web-magazine-style-dropdown-navigation-menu/#comments</comments>
		<pubDate>Fri, 02 Sep 2011 22:15:34 +0000</pubDate>
		<dc:creator>Jake Rocheleau</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[dropdown]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[Navigation]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://designshack.co.uk/?p=24335</guid>
		<description><![CDATA[Frontend web development has grown into a very popular niche. With the expansion of jQuery more web designers are beginning to create fantastic animations and page effects. The possibilities are limitless! In this tutorial we&#8217;ll be creating a magazine-style drop down nav menu. This will be created with some fancy CSS3 techniques to work in [...]]]></description>
			<content:encoded><![CDATA[<p>Frontend web development has grown into a very popular niche. With the expansion of jQuery more web designers are beginning to create fantastic animations and page effects. The possibilities are limitless!</p>
<p>In this tutorial we&#8217;ll be creating a magazine-style drop down nav menu. This will be created with some fancy CSS3 techniques to work in standards-compliant browsers. Even if you are shaky with jQuery you should be able to keep up with this little bit of code, and possibly learn something new. Check out the live demo script in my example.</p>
<p><span id="more-24335"></span><br />
<em>Like the article? Be sure to subscribe to our <a href="feed://feeds.feedburner.com/designshack">RSS feed</a> and follow us on <a href="http://twitter.com/designshack">Twitter</a> to stay up on recent content.</em></p>
<h2>Try it Out</h2>
<p style="text-align:center"><strong><a href="http://designshack.net/tutorialexamples/SexyMenu/index.html">View Live Demo</a></strong> &#8211; <strong><a href="http://designshack.net/tutorialexamples/SexyMenu/sexyddmenu-source.zip">Download Source</a></strong></p>
<div class="tutorialimage"><a href="http://designshack.net/tutorialexamples/SexyMenu/index.html" target="_blank"><img class="alignNone size-full" src="http://designshack.net/wp-content/uploads/dropdown-menu-demo-screenshot.jpg" alt="Sexy Magazine Dropdown Screenshot" width="510" /></a></div>
<h2>Structuring our Page HTML</h2>
<p>We should start off by constructing the basic page layout. I&#8217;ve done this in HTML with an unordered list for menu links. Both the CSS styles and jQuery library are excluded externally which saves a bit of space. Added below is the heading to our HTML code.</p>
<div style="overflow: auto;background-color: #eeeeee">

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE html&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span> <span style="color: #000066;">lang</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;en&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">http-equiv</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Content-Type&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/html; charset=utf-8&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>DesignShack Sexy Magazine-Style Dropdown Menu<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;style.css&quot;</span> <span style="color: #000066;">media</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;all&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span></pre></div></div>

</div>
<p></ br></p>
<p>The jQuery library v1.6.2 is hosted on Google&#8217;s servers for web developers to use. This can often cut off some of the load to your own servers. Differences are especially noticeable if you are processing tens or hundreds of thousands of visitors daily. I&#8217;ve also set my doctype to HTML5, not that it should affect our script.</p>
<p>Moving down a bit in the code let&#8217;s take a look at the inner body content. Below is a copy/paste of everything inside the body tag. I have removed the final jQuery code since we&#8217;ll be looking at that in a later section.</p>
<div style="overflow: auto;background-color: #eeeeee">

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;head&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;wrap&quot;</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;images/logo.jpg&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Blog Magazine Logo&quot;</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;wrap&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;nav&quot;</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Homepage<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>About the Mag<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
				<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Company<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
				<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Authors<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
				<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Write for Us?<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
				<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Advertising<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
				<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Get in Touch<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Freebies<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
				<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>PSD<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
				<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>AI Vectors<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
				<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Patterns<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
				<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Icons<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>			
		<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Tutorials<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
				<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>HTML5<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
				<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>CSS3<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
				<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>jQuery<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
				<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>PHP MySQL<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
				<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Ruby on Rails<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Web Tools<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
				<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Performance<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
				<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Browser Testing<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
				<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>CMS Plugins<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
				<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Cheat Sheets<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Originals<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
				<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Website Design<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
				<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Mobile<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
				<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>User Interface<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
				<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Freelancing<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
				<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Inspiration<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

</div>
<p></ br></p>
<p>So this should finish up our main HTML structure. All the nested lists are using ul elements which are positioned inside a parent list item. Not too difficult if you have a basic grasp in web design and coding. So let&#8217;s move right ahead into the CSS styles.</p>
<h2>Designing with CSS</h2>
<p>I&#8217;ll break down each segment of the small style.css file attached with the demo code. We start with a group block resetting margins/padding for the whole document. A simple man&#8217;s page reset, really.</p>
<div style="overflow: auto;background-color: #eeeeee">

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #00AA00;">*</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
body <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> Arial<span style="color: #00AA00;">,</span> Tahoma<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">11px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#232323</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* @group structure */</span>
<span style="color: #cc00cc;">#head</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#e1ecf6</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">15px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">border-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#d5dce8</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.wrap</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">800px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>

</div>
<p></ br></p>
<p>The head content will hold a small logo graphic I made in Photoshop. I&#8217;ve used .wrap as a class so we can re-use the same styles with our nav menu. This wrapper creates an 800px content div and centers it on the page.</p>
<p>The next group is a bit larger, providing styles for the root nav menu and its list items. Note the <code>#nav</code> selector is on our original unordered list element, so we can use this to select all sub-ul elements later on.</p>
<div style="overflow: auto;background-color: #eeeeee">

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* @group core nav menu */</span>
<span style="color: #cc00cc;">#nav</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">list-style</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">border-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#d5dce8</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">border-right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#d5dce8</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">border-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#d5dce8</span><span style="color: #00AA00;">;</span> border-bottom-left-radius<span style="color: #00AA00;">:</span> <span style="color: #933;">4px</span><span style="color: #00AA00;">;</span> -moz-border-radius-bottomleft<span style="color: #00AA00;">:</span> <span style="color: #933;">4px</span><span style="color: #00AA00;">;</span> -webkit-border-bottom-left-radius<span style="color: #00AA00;">:</span> <span style="color: #933;">4px</span><span style="color: #00AA00;">;</span> border-bottom-right-radius<span style="color: #00AA00;">:</span> <span style="color: #933;">4px</span><span style="color: #00AA00;">;</span> -moz-border-radius-bottomright<span style="color: #00AA00;">:</span> <span style="color: #933;">4px</span><span style="color: #00AA00;">;</span> -webkit-border-bottom-right-radius<span style="color: #00AA00;">:</span> <span style="color: #933;">4px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">50px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">15px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding-right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">15px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#edf3f7</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#nav</span> li <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">999</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">1px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#nav</span> li a <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">700</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">50px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#818ba3</span><span style="color: #00AA00;">;</span> zoom<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">1</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">border-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #993333;">transparent</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">border-right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #993333;">transparent</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span> <span style="color: #933;">12px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#nav</span> li a<span style="color: #3333ff;">:hover</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#nav</span> li a<span style="color: #6666ff;">.hov</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">border-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#d5dce8</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">border-right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#d5dce8</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#576482</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>

</div>
<p></ br></p>
<p>On the root UL I have added 3 solid borders: left, right, and bottom. The top border spans the entire website and this is added in the header area. I&#8217;ve additionally rounded the bottom left and right corners. This technique done in CSS3 using -moz, -webkit, and the standard border-radius properties.</p>
<p>The list items are given a <code>z-index</code> of 999 to appear above all other elements. So in this way we would hover off the original li onto our subnav and lose the popup. Instead the li element expands to take up the full height of our new sliding menu and stay on top as we mouse over links. Also <code>position: relative;</code> is added to properly use absolute positioning on the inner list.</p>
<p>The anchor links aren&#8217;t too interesting in themselves. They highlight with a white background on hover with two additional borders to the left and right side. On the final hover selector I added another class <em>.hov</em> to be used by jQuery. This will make it so when you move the mouse cursor over sub-menu links the original nav link stays hovered! Pretty neat.</p>
<h2>Sub-Navigation Menu Styles</h2>
<p>This last CSS code will style our sub menu links. We use absolute positioning to move around our sub-ul element directly to the top of its container. Also a great drop shadow effect using some new CSS3 properties.</p>
<div style="overflow: auto;background-color: #eeeeee">

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* @group subnav */</span>
<span style="color: #cc00cc;">#nav</span> ul <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">list-style</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> -moz-box-shadow<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">1px</span> <span style="color: #933;">3px</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0.2</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> -o-box-shadow<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">1px</span> <span style="color: #933;">3px</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0.2</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> box-shadow<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">1px</span> <span style="color: #933;">3px</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0.2</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> -webkit-box-shadow<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">1px</span> <span style="color: #933;">3px</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0.2</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">3px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>	
<span style="color: #cc00cc;">#nav</span> ul li <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">180px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">border-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#nav</span> ul li<span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">border-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span> <span style="color: #993333;">solid</span> <span style="color: #993333;">transparent</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">border-right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span> <span style="color: #993333;">solid</span> <span style="color: #993333;">transparent</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>

</div>
<p></ br></p>
<p>The individual properties I&#8217;ve used and their supporting browsers can get a bit confusing. Below is a small translation guide.</p>
<ul>
<li>-moz-box-shadow &#8211; Firefox/Mozilla Engine</li>
<li>-o-box-shadow &#8211; Opera</li>
<li>-webkit-box-shadow &#8211; Standard WebKit browsers, Google Chrome or Safari</li>
<li>box-shadow &#8211; Most others including Microsoft Internet Explorer</li>
</ul>
<p>Each sub-nav list item is set 180px in width. This defines the max size our menu will pop out to be. If you port over the code you should change this to accommodate sizes in your own template.</p>
<div style="overflow: auto;background-color: #eeeeee">

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#nav</span> ul a <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">8px</span> <span style="color: #933;">5px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#666</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">border-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #993333;">transparent</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">text-transform</span><span style="color: #00AA00;">:</span>  <span style="color: #993333;">uppercase</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#797979</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">normal</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#nav</span> ul a<span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">border-right-color</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">transparent</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">border-left-color</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">transparent</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">transparent</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#4e4e4e</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #00AA00;">*</span> html <span style="color: #cc00cc;">#nav</span> ul <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">-2px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>

</div>
<p></ br></p>
<p>Each sub-menu anchor is set to a height and line-height of 20px. This will keep the menu text centered vertically in each menu block. On hover effect I&#8217;ve hidden the borders which are inherited from the parent nav links. All fairly straightforward with CSS styles, and now the final bit of JavaScript to piece it all together.</p>
<h2>jQuery Show/Hide Sub Menu</h2>
<p>Directly after the final <code>.wrap</code> div our content area ends. So right here I&#8217;ve added a new script tag and placed all the jQuery code inside. This makes editing a lot easier, and our code is fairly small anyways.</p>
<div style="overflow: auto;background-color: #eeeeee">

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>	
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#nav li'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hover</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'ul'</span><span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">slideDown</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">200</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">children</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'a:first'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;hov&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'ul'</span><span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">slideUp</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">100</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">children</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'a:first'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">removeClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;hov&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>		
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</div>
<p></ br></p>
<p>Start the script by checking if the page document has finished loading. We want to trigger our first function after the user hovers over a list item in the root #nav ul. The first block of function code is made up of two lines.</p>
<p>It targets our inner ul element and adds a slide-down effect to complete in 200 milliseconds. Secondly we need to add the <strong>.hov</strong> class onto the currently selected anchor link. This keeps the hovered effect in the main link even when moving over sub-navigation links. The second function is our callback parameter for the <code>.hover()</code> method which happens on mouse off.</p>
<p>This is also comprised of 2 simple lines of code. These actually just reverse what we&#8217;ve done in the first area. The inner ul is forced to slide up in a quicker animation (100 milliseconds long) and we remove the hover class as well.</p>
<p style="text-align:center"><strong><a href="http://designshack.net/tutorialexamples/SexyMenu/index.html">View Live Demo</a></strong> &#8211; <strong><a href="http://designshack.net/tutorialexamples/SexyMenu/sexyddmenu-source.zip">Download Source</a></strong></p>
<h2>Conclusion</h2>
<p>I&#8217;ve left the menu fairly basic so other designers can tweak the template to fit their own website. It is quite impressive what is possible with just a couple lines in jQuery! If you have implemented anything similar on your own site please let us know. And don&#8217;t forget to download and play around with the demo source code.</p>
]]></content:encoded>
			<wfw:commentRss>http://designshack.net/articles/javascript/code-a-web-magazine-style-dropdown-navigation-menu/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Developing a jQuery Private Messaging Modal Box</title>
		<link>http://designshack.net/articles/javascript/developing-a-jquery-private-messaging-modal-box/</link>
		<comments>http://designshack.net/articles/javascript/developing-a-jquery-private-messaging-modal-box/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 14:39:33 +0000</pubDate>
		<dc:creator>Jake Rocheleau</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[interface]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[popover]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://designshack.co.uk/?p=23908</guid>
		<description><![CDATA[You can build some really neat things using jQuery. The latest release bundle updates a lot of bugs and even hints at support for a new jQuery Mobile. With frontend scripting you can build practically any type of web application. But more specifically we&#8217;ll be looking into constructing a small modal box window. I have [...]]]></description>
			<content:encoded><![CDATA[<p>You can build some really neat things using jQuery. The latest release bundle updates a lot of bugs and even hints at support for a new <a href="http://designshack.net/community/how-to-write-a-simple-application-on-jquery-mobile">jQuery Mobile</a>. With frontend scripting you can build practically any type of web application. But more specifically we&#8217;ll be looking into constructing a small modal box window.</p>
<p>I have designed the functionality to look and feel like a private messaging solution. This is perfect to implement on a user profile page or author&#8217;s page in a blog. We will be using some handy CSS3 techniques along with coding the page structure in HTML5. You don&#8217;t need to be a master jQuery artist to understand this tutorial, but it wouldn&#8217;t hurt to brush up on the basics. Check out my live demo example and download the project source code below.</p>
<p><span id="more-23908"></span><br />
<em>Like the article? Be sure to subscribe to our <a href="feed://feeds.feedburner.com/designshack">RSS feed</a> and follow us on <a href="http://twitter.com/designshack">Twitter</a> to stay up on recent content.</em></p>
<h2>Try It Out</h2>
<p style="text-align:center"><strong><a href="http://designshack.net/tutorialexamples/jQueryModal/index.html">View Live Demo</a></strong> &#8211; <strong><a href="http://designshack.net/tutorialexamples/jQueryModal/jquery-modal-form.zip">Download Source</a></strong></p>
<div class="tutorialimage"><a href="http://designshack.net/tutorialexamples/jQueryModal/index.html" target="_blank"><img class="alignNone size-full" src="http://designshack.net/wp-content/uploads/jquery-modal-example-screenshot.jpg" alt="jQuery Modal Box Screen" width="510" /></a></div>
<h2>The HTML Structure</h2>
<p>Before we dive into jQuery let&#8217;s examine a bit of the HTML first. If you&#8217;re interested in examining the whole document layout I suggest downloading from the source code. But I&#8217;d like to focus on the modal box HTML code for further explanation.</p>
<p>I split the template using HTML5 <code>&lt;section&gt;</code> tags. Inside I have a div with the class <code>.containmsg</code> which holds our modal box and button to show/hide the contents. The modal container uses the class <code>.mainCompose</code>. This is also how we target in jQuery &#8211; let&#8217;s look at the HTML code for this below.</p>
<div style="overflow: auto;background-color: #eeeeee">

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!-- begin modal msg box --&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;containmsg&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;img/compose.gif&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;compose&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;compose&quot;</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
&nbsp;
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;mainComposeD&quot;</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;calloutUp&quot;</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;calloutUp2&quot;</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>	
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">form</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;sendprivatemsg&quot;</span> <span style="color: #000066;">action</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span> <span style="color: #000066;">method</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;post&quot;</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;tofield&quot;</span>&gt;</span>To<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;userslist clearfix&quot;</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://designshack.net/author/jakerocheleau/&quot;</span> <span style="color: #000066;">target</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;_blank&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;recipient&quot;</span>&gt;</span>Jake Rocheleau<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
&nbsp;
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;break&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;mymsg&quot;</span>&gt;</span>Message<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">textarea</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;mymsg&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">textarea</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>**Enter some text!<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;sendbtn&quot;</span>&gt;</span>Send Message<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;img/ajax-loader.gif&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;loader&quot;</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">form</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #808080; font-style: italic;">&lt;!-- @end modal --&gt;</span></pre></div></div>

</div>
<p></ br></p>
<p>Inside our form element there aren&#8217;t any surprises. A small label and input message field. Also a to: field with a link to the user&#8217;s page. In this demo I linked to my DesignShack author page. It&#8217;s not required, though. You could even remove the link altogether and still keep the CSS styles in-tact. The users list is coded as a UL element so you could support messaging to more than one person.</p>
<p>Now before we dive into jQuery there&#8217;s one more technique I wanted to cover. If you click the compose icon you&#8217;ll notice our modal box has a small triangle tip at the very top. You could use images for this technique, but there is a simpler alternative using strictly CSS.</p>
<h2>Cool CSS Tooltip Triangles</h2>
<p>There is a small div which appears directly above the message form. This contains two classes labeled <strong>calloutUp</strong> and <strong>calloutUp2</strong>. The former behaves as a continuation of our outer border (the darker tan) while the latter connects to the center of our form area. Using both we can create matching triangles in a tooltip style connector.</p>
<p>This works because of a setting in CSS that makes all borders come together in center as a triangle. So we can set both of these divs to have no height or width, but massive borders. If we only give color to one of the borders and the rest are transparent we create the triangle effect seen here. Check out the CSS classes for both of the callouts.</p>
<div style="overflow: auto;background-color: #eeeeee">

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.calloutUp</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">border-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">12px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#f0ecd0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">border-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">12px</span> <span style="color: #993333;">dotted</span> <span style="color: #993333;">transparent</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">border-right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">12px</span> <span style="color: #993333;">dotted</span> <span style="color: #993333;">transparent</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">30px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">10</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.calloutUp2</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-12px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">8px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">border-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">12px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#faf7e3</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">border-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">12px</span> <span style="color: #993333;">dotted</span> <span style="color: #993333;">transparent</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">border-right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">12px</span> <span style="color: #993333;">solid</span> <span style="color: #993333;">transparent</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">11</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>

</div>
<p></ br></p>
<p>I&#8217;m also setting details for the surrounding borders because this keeps the div block looking square. Otherwise our shape would turn rectangular, and then our triangles would come out lopsided with jagged edges. The <code>z-index</code> property is also important so that our inner tip will stay above the outer tip. The other styles are used to mockup our fonts in the demo example, certainly nothing extraordinary.</p>
<h2>Developing Interactions with jQuery</h2>
<p>Now we can delve into the good stuff! If you have used jQuery before you&#8217;ll likely be familiar with starting off a new document. First include the latest version of jQuery into your page. If you don&#8217;t wish to download and host the file yourself Google offers all versions of jQuery live for developers. The latest I&#8217;m using is <a href="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js">library 1.6.2 mini</a>.</p>
<p>Once that&#8217;s included you should open another script tag for JavaScripting. I decided to write my code within the head block of the same HTML page. But you could alternatively move this to the body, footer, or even into an external file. The first snippets of code I&#8217;ve added below.</p>
<div style="overflow: auto;background-color: #eeeeee">

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.mainCompose&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.loader'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#errortxt'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.compose'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.mainCompose'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">slideToggle</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</div>
<p></ br></p>
<p>We call our <code>$(document).ready()</code> function to hold off on any actions until the page is finished loading. The first task is to hide 3 page elements right away. These are <code>.mainCompose</code> to hide our modal box, <code>.loader</code> to hide the ajax loading gif, and <code>#errortxt</code> which only displays if the user hasn&#8217;t entered anything and tries to submit the form. Each of these elements will only be displayed under certain conditions so it&#8217;s best to keep them hidden immediately.</p>
<p>And finally our first scripting action is checking for a click event handler. The <code>.compose</code> class is actually tied to our compose image even though there is no anchor link to be clicked. jQuery can handle the click events and call <a href="http://api.jquery.com/slideToggle/">slideToggle()</a> either way. Now the last bit of code to examine is how we can pull data out from user input.</p>
<h2>Processing the Modal Form</h2>
<p>We are only checking for one more final event handler. This is tied to the click event of our <code>.sendbtn</code>, which is actually tied to an anchor link in our modal box. Directly next to this is our animated ajax .gif image which was hidden right after the page loaded.</p>
<div style="overflow: auto;background-color: #eeeeee">

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.sendbtn'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	e.<span style="color: #660066;">preventDefault</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.sendbtn'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.loader'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#mymsg'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#errortxt'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.sendbtn'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.loader'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'sendbtn'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.loader'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#errortxt'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #003366; font-weight: bold;">var</span> formQueryString <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#sendprivatemsg'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">serialize</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// form data for ajax input</span>
		finalSend<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>    		
	<span style="color: #009900;">&#125;</span></pre></div></div>

</div>
<p></ br></p>
<p>The execution function right after our button is click now has a parameter. <code>function(e)</code> just passes the instance of our click event right into the function as a variable. We use this event selector to call the <a href="http://api.jquery.com/event.preventDefault/">preventDefault()</a> method so that our link doesn&#8217;t behave as a link. We also immediately hide the .sendbtn and replace it with our .loader image.</p>
<p>Next we pass into a standard if/else clause checking the <code>#mymsg</code> textarea value. If this contains no text then we know the user hasn&#8217;t entered anything. In this case we display our error message and re-hide the loading image while displaying our button again. Otherwise we enter the <code>else{ }</code> clause which assumes we can send the message!</p>
<p>I haven&#8217;t written any Ajax/PHP code since it jumps out of range of this tutorial. But you should check out the <a href="http://api.jquery.com/jQuery.ajax/">jQuery ajax() function</a> which can speed up backend development tenfold. I have set aside a variable <code>formQueryString</code> which can be used to pass the form data into an Ajax call. Instead I&#8217;ll be just finishing up the aesthetics in a small function <strong>finalSend();</strong></p>
<div style="overflow: auto;background-color: #eeeeee">

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">	<span style="color: #006600; font-style: italic;">// possibly include Ajax calls here to external PHP</span>
	<span style="color: #003366; font-weight: bold;">function</span> finalSend<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.mainCompose'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">delay</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1000</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">slideToggle</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'slow'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#composeicon'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'sent'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">removeClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'compose'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #006600; font-style: italic;">// hide original link and display confirmation icon</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#composebtn'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&amp;lt;img src=&quot;img/check-sent.png&quot; /&amp;gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</div>
<p></ br></p>
<p>What we want to do now is close our modal box and display a small check icon to let the user know everything is fine and dandy. I&#8217;ve used <a href="http://api.jquery.com/delay/">.delay()</a> to keep the modal box open for 1 second before calling our final slideToggle() method. This was added solely for appearances in this tutorial so you can see how it looks waiting for the server to load. If you want to keep your users waiting an extra second you could leave this &#8211; but it serves little point otherwise!</p>
<p>After the slide animation I&#8217;ve added a callback function. It only includes 2 lines of basic code. First we target the compose icon and change its class from <code>.compose</code> to <code>.sent</code>, then hide it from view. Finally we target <code>#composebtn</code> which is the container div of our icon and append a new check mark icon. Now our users know the message was sent and we&#8217;ve barely used any screen real estate!</p>
<p style="text-align:center"><strong><a href="http://designshack.net/tutorialexamples/jQueryModal/index.html">View Live Demo</a></strong> &#8211; <strong><a href="http://designshack.net/tutorialexamples/jQueryModal/jquery-modal-form.zip">Download Source</a></strong></p>
<h2>Conclusion</h2>
<p>This tutorial should have gotten you a bit more comfortable building a scalable modal box in jQuery. We have built some great CSS styles and used some basic form processing to enhance the user interaction. There is certainly a lot you could add on but our example lays the ground structure and paves the road for higher possibilities.</p>
<p>If you&#8217;re still looking to check out my demo or download the source code you can do so below. Reading code can be confusing after long periods of time, so I recommend downloading the source directly to get a better idea of how this small app functions. Similarly if you have any questions or ideas you can offer them in the discussion area.</p>
]]></content:encoded>
			<wfw:commentRss>http://designshack.net/articles/javascript/developing-a-jquery-private-messaging-modal-box/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Creating an Apple-Style Input Field With Display Labels</title>
		<link>http://designshack.net/articles/css/creating-an-apple-style-input-field-with-display-labels/</link>
		<comments>http://designshack.net/articles/css/creating-an-apple-style-input-field-with-display-labels/#comments</comments>
		<pubDate>Mon, 01 Aug 2011 20:31:47 +0000</pubDate>
		<dc:creator>Jake Rocheleau</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[frontend]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[poshytips]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://designshack.co.uk/?p=23108</guid>
		<description><![CDATA[Apple is a very popular brand in the new technological age in which we live. Both designers and developers agree that Apple&#8217;s products display exquisite talent and passion for their skills. Over time user interface design has taken a turn upwards and is now one of the hottest topics amongst web designers. Below I&#8217;ll be [...]]]></description>
			<content:encoded><![CDATA[<p>Apple is a very popular brand in the new technological age in which we live. Both designers and developers agree that Apple&#8217;s products display exquisite talent and passion for their skills. Over time user interface design has taken a turn upwards and is now one of the hottest topics amongst web designers.</p>
<p>Below I&#8217;ll be going over how to build a small Apple-styled input form with some basic structure and scripting. All code included is based off XHTML Transitional Doctype along with newer CSS2/CSS3 techniques. We&#8217;ll also be using the jQuery 1.4.1 library to support our display label functions.</p>
<p><span id="more-23108"></span><br />
<em>Like the article? Be sure to subscribe to our <a href="feed://feeds.feedburner.com/designshack">RSS feed</a> and follow us on <a href="http://twitter.com/designshack">Twitter</a> to stay up on recent content.</em></p>
<h2>Try It Out</h2>
<p>Here&#8217;s a sneak peak of what we&#8217;ll be building. Check out the demo page to see it live and download the example for a closer look.</p>
<p><strong><a href="http://designshack.net/tutorialexamples/AppleJake/index.html">Live Demo</a> &#8211; <a href="http://designshack.net/tutorialexamples/AppleJake/apple-display-fields.zip">Download</a></strong></p>
<div class="tutorialimage"><img class="alignNone size-full" src="http://designshack.net/wp-content/uploads/project-demo.jpg" alt="jQuery Apple Input Field - Demo Graphic" width="510" /></div>
<h2>Building our HTML and CSS</h2>
<p>Before we can start developing it&#8217;s important to get frontend code structure in order. Luckily this process is very simple and shouldn&#8217;t take long at all to complete. Below I&#8217;ve included a stripped copy of the HTML code from our example &#8220;index.html&#8221; document. This should all be standard code to display a very basic input form, nothing further than any basic HTML developer&#8217;s knowledge.</p>
<div style="overflow: auto;background-color: #eeeeee">

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span> xmlns<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.w3.org/1999/xhtml&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">http-equiv</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Content-Type&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/html; charset=utf-8&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>Apple-style Input Field<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;c&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">form</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;basicform&quot;</span> <span style="color: #000066;">action</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span> <span style="color: #000066;">method</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;post&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;username&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;unameblock&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Enter your username&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;u1&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;password&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;password&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;pwblock&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Enter your password&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;u1&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">br</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">br</span> <span style="color: #66cc66;">/</span>&gt;</span>
&nbsp;
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;submit&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;submitbtn&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Submit Button!&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">form</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></div></div>

</div>
<p>Here I&#8217;ve set up 2 very important input elements under the IDs &#8220;unameblock&#8221; and &#8220;pwblock&#8221;. These stand for <strong>username block</strong> and <strong>password block</strong>, respectively, and will be very important later in our script. Now that our code is looking good it would be wise to jump into CSS styles.</p>
<div class="tutorialimage"><img class="alignNone size-full" src="http://designshack.net/wp-content/uploads/web-designer-magazine-html5.jpg" alt="HTML5 Code - Web Designer Mag UK" width="510" /></div>
<p>These are the real bare-bones structure rules since CSS is what gives all HTML elements their form. There aren&#8217;t many changes we will be including. Some basic resets for global variables along with alignment and positioning for input fields. Below are clips from the source code, explained in bit intervals.</p>
<div style="overflow: auto;background-color: #eeeeee">

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #00AA00;">*</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
body <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> Arial<span style="color: #00AA00;">,</span> Helvetica<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">150px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#dbe9f7</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#c</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">850px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>

</div>
<p>Here we have our global reset with the <em>asterisk</em> (*) selector removing all browser-standard margins and padding. We also give some styles to the body element for positioning our form front and center. The #c division is our container div which has been centered for the sake of our demo.</p>
<div style="overflow: auto;background-color: #eeeeee">

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">input<span style="color: #6666ff;">.u1</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">6px</span> <span style="color: #933;">12px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1.6em</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#787878</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">letter-spacing</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-0.02em</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">text-shadow</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span> <span style="color: #933;">1px</span> <span style="color: #933;">0px</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">outline</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> -webkit-gradient<span style="color: #00AA00;">&#40;</span>linear<span style="color: #00AA00;">,</span> <span style="color: #000000; font-weight: bold;">left</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">,</span> <span style="color: #000000; font-weight: bold;">left</span> <span style="color: #000000; font-weight: bold;">bottom</span><span style="color: #00AA00;">,</span> from<span style="color: #00AA00;">&#40;</span><span style="color: #cc00cc;">#e0e0e0</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span> to<span style="color: #00AA00;">&#40;</span><span style="color: #cc00cc;">#ffffff</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> -moz-linear-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">,</span>  <span style="color: #cc00cc;">#e0e0e0</span><span style="color: #00AA00;">,</span>  <span style="color: #cc00cc;">#ffffff</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
	-webkit-border-radius<span style="color: #00AA00;">:</span> <span style="color: #933;">3px</span><span style="color: #00AA00;">;</span>
	-moz-border-radius<span style="color: #00AA00;">:</span> <span style="color: #933;">3px</span><span style="color: #00AA00;">;</span>
	border-radius<span style="color: #00AA00;">:</span> <span style="color: #933;">3px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#717171</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
	-webkit-box-shadow<span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #933;">1px</span> <span style="color: #933;">0px</span> <span style="color: #cc00cc;">#efefef</span><span style="color: #00AA00;">;</span>
	-moz-box-shadow<span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #933;">1px</span> <span style="color: #933;">0px</span> <span style="color: #cc00cc;">#efefef</span><span style="color: #00AA00;">;</span>
	box-shadow<span style="color: #00AA00;">:</span>  <span style="color: #933;">1px</span> <span style="color: #933;">1px</span> <span style="color: #933;">0px</span> <span style="color: #cc00cc;">#efefef</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
input<span style="color: #cc00cc;">#submitbtn</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1.3em</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">4px</span> <span style="color: #933;">9px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> Arial<span style="color: #00AA00;">,</span> Helvetica<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">letter-spacing</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-0.05em</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#444</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
input<span style="color: #6666ff;">.fail</span> <span style="color: #00AA00;">&#123;</span> -webkit-box-shadow<span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span> <span style="color: #933;">0px</span> <span style="color: #933;">5px</span> <span style="color: #cc00cc;">#ff4848</span><span style="color: #00AA00;">;</span> -moz-box-shadow<span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span> <span style="color: #933;">0px</span> <span style="color: #933;">5px</span> <span style="color: #cc00cc;">#ff4848</span><span style="color: #00AA00;">;</span> box-shadow<span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span> <span style="color: #933;">0px</span> <span style="color: #933;">5px</span> <span style="color: #cc00cc;">#ff4848</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
input<span style="color: #3333ff;">:focus </span><span style="color: #00AA00;">&#123;</span> -webkit-box-shadow<span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span> <span style="color: #933;">0px</span> <span style="color: #933;">5px</span> <span style="color: #cc00cc;">#007eff</span><span style="color: #00AA00;">;</span> -moz-box-shadow<span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span> <span style="color: #933;">0px</span> <span style="color: #933;">5px</span> <span style="color: #cc00cc;">#007eff</span><span style="color: #00AA00;">;</span> box-shadow<span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span> <span style="color: #933;">0px</span> <span style="color: #933;">5px</span> <span style="color: #cc00cc;">#007eff</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>

</div>
<p>The first noticeable block is used to style our input fields. It targets all input elements with a class of &#8220;u1&#8243; which both our username and password fields run. Instead of placing 10-20 style declarations on a single line it&#8217;s much easier for editing to keep this in block-level.</p>
<p>In here we have the styles to configure how our input fields will look. Padding, font-size, among many borders and text manipulation properties as well. We&#8217;re using many new CSS3 techniques here which should be apparent to all CSS developers.</p>
<h2>New CSS3 Entities</h2>
<p>Two brand new CSS3 functions we&#8217;re using are <code>-webkit-gradient</code> and <code>-moz-linear-gradient</code> which can generate gradients on-the-fly. This is an amazing feature which hasn&#8217;t been discussed in many CSS3 articles. This removes the need for any images in creating standards-compliant background gradients.</p>
<div class="tutorialimage"><img class="alignNone size-full" src="http://designshack.net/wp-content/uploads/mac-osx-office-space.jpg" alt="Mac OS X Home Working Office" width="510" /></div>
<p>We also have <code>-webkit-box-shadow</code> and <code>-moz-box-shadow</code>. Similar naming schemes help with confusing between Webkit browsers and Mozilla-based Gecko browsers.</p>
<p>Further down we have 3 more styles which attack our submit button along with states for our input forms. The <em>:focus</em> pseudo-targeting means CSS will only apply our styles when the user is focused on either input field. These styles will display a blue glow for focus and red glow for errors (very useful when debugging user logins and registration forms).</p>
<p>So far this all looks great! In fact all we need to do is include a few scripts/styles in our header section to really get started on our dynamic effects. If you take the current document and include our stylesheet we can get the hover effects immediately.</p>
<h2>Working with jQuery Effects</h2>
<p>jQuery is an amazing JavaScript library which has proven useful time and again. Your average web developer is heavily focused on speed and precision of scripting. This is something jQuery takes in and internalizes with their ideas.</p>
<p>Below is a small section which needs to be added between the <code>head</code> tags of your document. I&#8217;ll explain a few of these below and also get into some of the behind-the-scenes code.</p>
<div style="overflow: auto;background-color: #eeeeee">

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;css/style.css&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;css/tip-yellowsimple.css&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;src/jquery.poshytip.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></div></div>

</div>
<p>Our style.css is the file which includes all of our CSS rules listed above. Another inclusion is <strong>tip-yellowsimple.css</strong> which hasn&#8217;t been mentioned yet. It&#8217;s a script written through jQuery as a plug-in for tooltip hovers. With this stylesheet (download with demo source) we are able to style tooltips on any action.</p>
<p>Our two JavaScript files are really basic and self-explanatory. We&#8217;re accessing jQuery 1.4.1 min so as to cut down on processing and download speeds. We&#8217;re also reading through Google&#8217;s APIs code database which stores all previous and active versions of popular scripts. This is a tremendous effort and helps development projects surge forward without the need to constantly download the jQuery library manually.</p>
<div class="tutorialimage"><img class="alignNone size-full" src="http://designshack.net/wp-content/uploads/poshytips-design-blog-download.jpg" alt="JavaScript PoshyTips with jQuery" width="510" /></div>
<p>The second file we have &#8220;jquery.poshytip.js&#8221; contains our plug-in code. Poshytip is a jQuery class written by <a href="http://vadikom.com/">Vasil Dinkov</a> to support dynamic tooltips. The code is vast and unnecessary to learn in-detail. However if you&#8217;re a jQuery geek feel free to check out his manual efforts to see how these methods are called and what variables you could edit.</p>
<h2>Basic Action Call</h2>
<p>All we need now is our infamous call to action! This is our main function which will load on document load and prepare to launch upon whatever signal we call. In this case we&#8217;re looking for an event which happens when a user focuses on one of the input fields.</p>
<p>One last step is to add this code into the head beneath all our file includes. This is straight JavaScript code so it should be encapsulated with a <code>script</code> tag. For easing I&#8217;ve removed the tags in the code below so we can focus on just the js functionality.</p>
<div style="overflow: auto;background-color: #eeeeee">

<div class="wp_syntax"><div class="code"><pre class="js" style="font-family:monospace;">$(function(){
	$('#unameblock').poshytip({
		className: 'tip-yellowsimple',
		showOn: 'focus',
		alignTo: 'target',
		alignX: 'inner-left',
		alignY: 'top',
		offsetX: 10
	});
&nbsp;
	$('#pwblock').poshytip({
		className: 'tip-yellowsimple',
		showOn: 'focus',
		alignTo: 'target',
		alignX: 'inner-left',
		alignY: 'top',
		offsetX: 10
	});
});</pre></div></div>

</div>
<p>So what we&#8217;re doing is calling a generic <code>function() {}</code> to check on some events. We are creating 2 new instances of the <code>poshytip()</code> method based off our input forms. This can be seen when we parse the DOM for the element IDs &#8220;unameblock&#8221; and &#8220;pwblock&#8221;.</p>
<p>Each of the individual settings in place expands on the functionality of poshytip. If you&#8217;d like to view <a href="http://vadikom.com/demos/poshytip/#methods">documentation for all methods</a> there is a great collection which Vasil has put online. Namely <em>showOn</em> is our most important variable which tells the parsing engine to check for any focus activity in these two elements.</p>
<p>AlignX and AlignY are important in regards to placement. These hold the values for where our tooltip will show up in page. This can be bottom, center, top, along with offset placements such as inner-left and inner-right. Try messing with these if you&#8217;d rather have the tooltips pop up on the side or bottom instead of the top.</p>
<p>What you may not have noticed by now is where our text is loaded from. Poshytips makes it simple here, too, where the value of our <em>title</em> attribute is displayed in tooltip text. This makes targeting specific elements extremely simple and very productive!</p>
<h2>Conclusion</h2>
<p>These are some of the most basic steps towards building an Apple-style input field. There are many other unique effects which can be applied using jQuery that range out of the scope on this tutorial. Check out some demos from Apple&#8217;s website for more inspiration. Also if you&#8217;d like to download the entire demo package you can <a href="http://designshack.net/tutorialexamples/AppleJake/apple-display-fields.zip">do so here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://designshack.net/articles/css/creating-an-apple-style-input-field-with-display-labels/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Adding an About the Author Box to Your WordPress Posts</title>
		<link>http://designshack.net/articles/php-articles/adding-an-about-the-author-box-to-your-wordpress-posts/</link>
		<comments>http://designshack.net/articles/php-articles/adding-an-about-the-author-box-to-your-wordpress-posts/#comments</comments>
		<pubDate>Fri, 29 Jul 2011 17:26:29 +0000</pubDate>
		<dc:creator>Jake Rocheleau</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[author]]></category>
		<category><![CDATA[modules]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://designshack.co.uk/?p=22934</guid>
		<description><![CDATA[Digital magazines have become a popular commodity for today&#8217;s web users. With WordPress powering millions of blogs on the web today, it&#8217;s fair to assume they run a stable piece of software. Some of the best features are all internal as the WP team publishes live, updated documentation with each release. Not only is the [...]]]></description>
			<content:encoded><![CDATA[<p>Digital magazines have become a popular commodity for today&#8217;s web users. With WordPress powering millions of blogs on the web today, it&#8217;s fair to assume they run a stable piece of software.  Some of the best features are all internal as the WP team publishes live, updated documentation with each release.</p>
<p>Not only is the software very powerful but the underlying classes and functions give developers an all-access pass. It is extremely simple to develop apps and modules within WordPress. Today we&#8217;ll be looking into author meta data functions for building an &#8220;About the Author&#8221; box.</p>
<p><span id="more-22934"></span><br />
<em>Like the article? Be sure to subscribe to our <a href="feed://feeds.feedburner.com/designshack">RSS feed</a> and follow us on <a href="http://twitter.com/designshack">Twitter</a> to stay up on recent content.</em></p>
<div class="tutorialimage"><a href="http://www.onextrapixel.com/"><img class="alignNone size-full" src="http://designshack.net/wp-content/uploads/oxp-about-the-author-post-details.jpg" alt="Onextra Pixel Author box" width="510" /></a></div>
<p>Towards the end of single post pages you may frequently see a box explaining a bit about the writer. This will generally include their Gravatar or some sort of photo, a description about them, and possibly links to their profiles or personal website.</p>
<p>If things seems difficult check out some of WordPress&#8217; <a href="http://codex.wordpress.org/Template_Tags">documentation on template tags</a>. These include much of what can be covered in this project and a whole lot more. The WP community also runs a very pleasant forum for in-depth system questions.</p>
<h2>The WordPress Architecture</h2>
<p>There is something referenced throughout WordPress code titled <a href="http://codex.wordpress.org/The_Loop">The Loop</a>. This is a section where meta functions can be called based on a single article to pull down specific information from the database. As per our example we can call functions to pull out author data from any single post within The Loop.</p>
<p>Most notably this should be done within your template folder. For the lazy, it may be easier to edit individual files by adding code you&#8217;ll need. For example, the WP theme <code>single.php</code> file generally contains all code to parse on an individual posts&#8217; page. You may find it easier to pull data while inside The Loop and add HTML code here.</p>
<p>Alternatively, a safer method would be to add a new file to your theme directory and include it whenever you&#8217;d want your author box to appear. This allows for greater control regarding variable terms and template files. This also saves you time and energy so as to not go back and re-invent the wheel.</p>
<h2>WP Template Code</h2>
<p>There aren&#8217;t many functions we&#8217;ll be using, though many could be new to WP amateurs. Below are just a few examples which you should familiarize yourself with. Much of what we&#8217;ll be covering works within the WordPress library with just a few key ideas – nothing that can&#8217;t be learned with a few hours of study.</p>
<div style="overflow: auto;background-color: #eeeeee">

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> the_author<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

</div>
<p>The author function pulls data from within the loop to display the author&#8217;s name. This can be changed in the WordPress backend on anybody&#8217;s profile settings page. You are able to set this value to First/Last name, username, or even a custom set.</p>
<div class="tutorialimage"><a href="http://freelanceswitch.com/"><img class="alignNone size-full" src="http://designshack.net/wp-content/uploads/freelanceswitch-blog-footer-author.jpg" alt="Freelance Switch Blog - Author Box" width="510" /></a></div>
<p>To make this process simpler, WordPress has released an entire function library for <code>the_author_meta()</code>. This replacement takes in arguments which can pull any author data from the database on request. You can check out <a href="http://codex.wordpress.org/Function_Reference/the_author_meta">the page documentation</a> if you&#8217;d like to research more into the subject.</p>
<p>What&#8217;s fascinating about this function is how much information can actually be obtained. By default the function accepts two arguments: the type of data you need and the user ID to pull. The ID is an optional parameter which is only required in cases outside of The Loop. Possible values to pull include user_login, user_email, user_url, nickname, description (bio), jabber/aim/yim, and so much more!</p>
<div class="tutorialimage"><a href="http://webdesign.tutsplus.com/"><img class="alignNone size-full" src="http://designshack.net/wp-content/uploads/tutsplus-design-author.jpg" alt="Author Box after Web Design Tuts+ Network" width="510" /></a></div>
<p>What many don&#8217;t consider here is just how much potential information can be shared. WordPress allows for administrators to edit author profile pages to add in custom avatars, bios, and even home page links. These can then be pulled from the database and used as marketing information for each author.</p>
<p>With just these functions alone we are able to display all of the set data we will need. The only thing left to do is add our sample HTML and CSS code and publish the file!</p>
<h2>Cordial Author Box Styles</h2>
<p>CSS is an important language in our project scope, being a web application. We need to define specific sets of styles and display cases to incorporate for all major browsers, monitor resolutions, and other hidden variables. As web developers it is our job to study and work over these climates.</p>
<div style="overflow: auto;background-color: #eeeeee">

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.aboutauthor</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#f4f4f4</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#999</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.aboutauthor</span> img <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#aboutauthorimg</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">5px</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.aboutauthor</span> <span style="color: #6666ff;">.span-desc</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">500px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.aboutauthor</span> <span style="color: #6666ff;">.span-2</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span> <span style="color: #933;">10px</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>

</div>
<p>The simple class <em>.aboutauthor</em> should be applied to your covering box. We have added a light background color with a solid border and extra padding. Our img tag is also displayed floating left with extra padding. This will keep our author&#8217;s avatar in line with box content.</p>
<div class="tutorialimage"><a href="http://www.noupe.com/"><img class="alignNone size-full" src="http://designshack.net/wp-content/uploads/noupe-author-box-design.jpg" alt="Noupe Post Author Box" width="510" /></a></div>
<p>Further, we have two classes which demonstrate how we need our inner data to perform. <em>.span-2</em> is a class held inside where our main content will be found. Inside here we have removed all extra margins/padding to keep spacing neutral, along with rearranging the box model for left alignment. This code would do best inside your template&#8217;s style.css file, though it could be added inline with your block element.</p>
<p>The HTML code is very short and similar as seen below. Here we have added a few extra functions which can be explained very quickly.</p>
<div style="overflow: auto;background-color: #eeeeee">

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;div class=&quot;aboutauthor&quot;&gt;
&lt;div id=&quot;aboutauthorimg&quot; class=&quot;span-2&quot;&gt;&lt;/div&gt;
&nbsp;
&lt;div class=&quot;span-desc&quot;&gt;About Author: &lt;strong&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_author<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #339933;">&gt;&lt;/</span>strong<span style="color: #339933;">&gt;</span>  <span style="color: #009900;">&#40;</span><span style="color: #339933;">;</span> Articles<span style="color: #009900;">&#41;</span>
<span style="color: #339933;">&lt;</span>strong<span style="color: #339933;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?</span>php the_author_meta<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'display_name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #339933;">&gt;&lt;/</span>strong<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span></pre></div></div>

</div>
<p>We are calling a function <code>get_avatar()</code> which takes a set of parameters. The two we have passed above are the current author&#8217;s e-mail address which is the unique identifier for a database query. This could be equivalent to a user&#8217;s ID, too. We also pass in 64 as a string value – this represents the size of the image we want returned squared off in width and height.</p>
<div class="tutorialimage"><a href="http://mac.appstorm.net/"><img class="alignNone size-full" src="http://designshack.net/wp-content/uploads/mac-appstorm-author-info.jpg" alt="Mac AppStorm Author Profile Page" width="510" /></a></div>
<p><code>the_author_posts()</code> is another fairly straightforward function which pulls the total number of articles a writer has published. This is more of an added feature as I don&#8217;t see many blogs running this info. Commonly, though, this is useful from a users&#8217; perspective since it gives more information about the current author and deeper insight into their interaction with the blog itself.</p>
<p>These are just some of the basics techniques for building a simple WordPress author block. From here it&#8217;s very simple to save a new file, let&#8217;s say author-box.php into your themes folder and upload into your root directory. From there a simple PHP include can add all of your code right into any source automatically.</p>
<div class="tutorialimage"><a href="http://www.blog.spoongraphics.co.uk/"><img class="alignNone size-full" src="http://designshack.net/wp-content/uploads/spoongraphics-about-the-author.jpg" alt="Chris Spooner SpoonGraphics Author Box" width="510" /></a></div>
<div style="overflow: auto;background-color: #eeeeee">

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span>get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;template_url&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/author-box.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

</div>
<p>If this is still a bit fuzzy, check out the example code above. This would be the most direct way to include your file and sustain security in your actions. Here we are calling the <code>get_bloginfo()</code> function to pull our entire template directory structure out first, followed by our single data file. Be sure to rename this file to whatever will suit your theme best and don&#8217;t get confused between function calls!</p>
<h2>Conclusion</h2>
<p>Hopefully this tutorial has given you a starting point for reference in WordPress development. Blogs are all too common in today&#8217;s web, but adding an author box gives your online articles some flare. They also give incentive for authors to post more frequently and build up a small portfolio of their writing. Many of the most popular magazines online now feature detailed information and profile links from their article writers.</p>
<p>If you&#8217;d like to experiment with these features without messing around in PHP or HTML/CSS, there are a few alternatives. The WordPress plugins system is one such scenario which works perfectly. I recommend the <a href="http://wordpress.org/extend/plugins/cool-author-box/">Cool Author Box</a> plugin which will automatically add author info and supports gravatar icons. Do you have any suggestions or tips for building unique author boxes in WordPress? Share your ideas in the discussion below.</p>
]]></content:encoded>
			<wfw:commentRss>http://designshack.net/articles/php-articles/adding-an-about-the-author-box-to-your-wordpress-posts/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Create an Awesome 3D Slideshow With Cu3er: Part 1</title>
		<link>http://designshack.net/articles/css/create-an-awesome-3d-slideshow-with-cu3er-part-1/</link>
		<comments>http://designshack.net/articles/css/create-an-awesome-3d-slideshow-with-cu3er-part-1/#comments</comments>
		<pubDate>Thu, 27 May 2010 18:46:06 +0000</pubDate>
		<dc:creator>Joshua Johnson</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[cu3er]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://designshack.co.uk/?p=8953</guid>
		<description><![CDATA[Today we&#8217;re going to build a simple web page with an amazing and free tool: Cu3er. Cu3er is a really neat 3D image slider with crazy visual transitions and lots of customization options. Though it&#8217;s built with Flash and JavaScript, you don&#8217;t really need to know either of these to use it. In this article, [...]]]></description>
			<content:encoded><![CDATA[<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/cu3erTut-10.jpg" alt="screenshot" width="510"/></div>
<p class="lead">Today we&#8217;re going to build a simple web page with an amazing and free tool: Cu3er.</p>
<p>Cu3er is a really neat 3D image slider with crazy visual transitions and lots of customization options. Though it&#8217;s built with Flash and JavaScript, you don&#8217;t really need to know either of these to use it. </p>
<p>In this article, we&#8217;ll get the page built and the slideshow up and running. Next time we&#8217;ll return and see how to customize some of Cu3er&#8217;s many features and variables. </p>
<p><span id="more-8953"></span><br />
<em>Like the article? Be sure to subscribe to our <a href="feed://feeds.feedburner.com/designshack">RSS feed</a> and follow us on <a href="http://twitter.com/designshack">Twitter</a> to stay up on recent content.</em></p>
<h2>What We&#8217;re Building</h2>
<p>To see how easy it is to incorporate Cu3er into a design, we&#8217;ll build a simple web page that contains a header, footer, paragraph copy, and a navigation area. </p>
<p>Before we get started, you might want to check out the <a href="http://designshack.net/tutorialexamples/Cu3erTut/demo.htm">demo</a> and download the <a href="http://designshack.net/tutorialexamples/Cu3erTut/Cu3erSourceFiles.zip">source files</a>. </p>
<p><strong>Note:</strong> In my own testing, cu3er works great in Safari and Firefox but has some troubles in IE (surprise). Due to this as well as the little bit of CSS3 we&#8217;ll be using, be sure to <strong>view the demo in Firefox or Safari</strong>. </p>
<div class="tutorialimage"><a href="http://designshack.net/tutorialexamples/Cu3erTut/demo.htm"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/cu3erTut-1.jpg" alt="screenshot" width="510"/></a></div>
<p>To keep things interesting, we&#8217;ll also be using a little CSS3 and learning how to setup a &#8220;sticky footer&#8221; that stays anchored to the bottom of the page. Let&#8217;s get started!</p>
<h2>Step 1: Grab Cu3er</h2>
<p>The first thing you&#8217;ll want to do is stop by the <a href="http://www.progressivered.com/cu3er/">Cu3er website</a> and hit the download button. When you open up the .zip you should see the following files:</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/cu3erTut-2.jpg" alt="screenshot" width="510"/></div>
<p>The first thing you&#8217;ll want to do is to copy this entire folder and put it in a safe place so you&#8217;ll always be able to revert back to the original versions of any or all of the files. </p>
<p>Once you&#8217;ve done that, open up <em>demo.htm</em> in your favorite IDE or text editor.</p>
<h2>Step 2: Customize the Demo Page</h2>
<p>When you open up the demo page, you&#8217;ll see that it&#8217;s pretty straightforward and already contains a centered div with a working version of cu3er. I told you this would be easy!</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/cu3erTut-3.jpg" alt="screenshot" width="510"/></div>
<p>We need only to add content and restyle this page and we&#8217;ll be all finished. To begin this process, replace the Step 1, Step 2, etc. comments in the <em>head</em> portion of the document and add something more descriptive. Also delete any inline styling and insert a link to an external stylesheet. You should have something like the following.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span> xmlns<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.w3.org/1999/xhtml&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">http-equiv</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Content-Type&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/html; charset=utf-8&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>CU3ER - demo!<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">&lt;!--  Path to SWFObject JavaScript --&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;js/swfobject/swfobject.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">&lt;!--  Configure SWFObject JavaScript and embed CU3ER slider --&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span>
		var flashvars = {};
		flashvars.xml = &quot;config.xml&quot;;
		flashvars.font = &quot;font.swf&quot;;
		var attributes = {};
		attributes.wmode = &quot;transparent&quot;;
		attributes.id = &quot;slider&quot;;
		swfobject.embedSWF(&quot;cu3er.swf&quot;, &quot;cu3er-container&quot;, &quot;600&quot;, &quot;300&quot;, &quot;9&quot;,
		&quot;expressInstall.swf&quot;, flashvars, attributes);
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">&lt;!--  Path to CSS --&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;style.css&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span></span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span></pre></div></div>

<p>Next, go into the body of the HTML and throw the <em>cu3er-container</em> into a &#8220;slideshow&#8221; div.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
&nbsp;
	<span style="color: #808080; font-style: italic;">&lt;!--  Cu3er --&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;slideshow&quot;</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;cu3er-container&quot;</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.adobe.com/go/getflashplayer&quot;</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.adobe.com/images/shared/download_buttons/</span>
<span style="color: #009900;">			get_flash_player.gif&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Get Adobe Flash player&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></div></div>

<h3>Customizing the Pictures</h3>
<p>Before we go any further, you might want to customize the slides in the &#8220;images&#8221; folder. To do this, simply open up the jpgs, drop in your own artwork and save over the files. </p>
<p>You can use whatever you like, but in case you&#8217;re curious, I just stopped by Flickr and grabbed five photos:</p>
<ul>
<li><a href="http://www.flickr.com/photos/lambertwm/3204040887/">Misty Lepelenburg, Utrecht &#8211; black &#038; white</a></li>
<li><a href="http://www.flickr.com/photos/beadmobile/3298460491/">Esso Black &#038; White</a></li>
<li><a href="http://www.flickr.com/photos/elstruthio/4404340043/">Pencil Crayons Black &#038; White</a></li>
<li><a href="http://www.flickr.com/photos/mobilestreetlife/2392476623/">Rainy Day Black &#038; White</a></li>
<li><a href="http://www.flickr.com/photos/j_m_c/3371112290/">Hamburg Fair 1 black &#038; white</a></li>
</ul>
<h2>Step 3: Add a Header</h2>
<p>Next we&#8217;re going to throw everything into a single page wrapper and add a header. The wrapper will serve as a way to center everything on the page and easily define a width for the content. The header will simply be a little text with a CSS background.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!--  Begin Page Wrap --&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;page_wrap&quot;</span>&gt;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">&lt;!--  Header --&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;header&quot;</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Design Shack<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">&lt;!--  Cu3er --&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;slideshow&quot;</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;cu3er-container&quot;</span>&gt;</span>
				<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.adobe.com/go/getflashplayer&quot;</span>&gt;</span>
				<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.adobe.com/images/shared/download_buttons/</span>
<span style="color: #009900;">				get_flash_player.gif&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Get Adobe Flash player&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
				<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

<h3>The Header Graphic</h3>
<p>The header will be fairly basic and could easily be done with CSS, but to keep things simple we&#8217;ll use a repeating background image. In Photoshop, make an image with a thick horizontal black bar and a thin red bar (#5c0000) like the one below.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/cu3erTut-4.jpg" alt="screenshot" width="510"/></div>
<p>My final file was 15px wide by 55px high. Yours can be as wide as you want but if you&#8217;re following along make sure you get the height right so everything will line up. </p>
<h2>Step 4: Start Some CSS</h2>
<p>Create a style.css file and add in the following CSS.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">&nbsp;
<span style="color: #808080; font-style: italic;">/* Reset */</span>
&nbsp;
<span style="color: #00AA00;">*</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* Float Clear */</span>
&nbsp;
<span style="color: #6666ff;">.clearDiv</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">both</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* Body Styles */</span>
&nbsp;
html<span style="color: #00AA00;">,</span> body <span style="color: #00AA00;">&#123;</span> 
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#4a4a4a</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">images/header_repeat.jpg</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">repeat-x</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span><span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;HelveticaNeue-Light&quot;</span><span style="color: #00AA00;">,</span> <span style="color: #ff0000;">&quot;Helvetica Neue Light&quot;</span><span style="color: #00AA00;">,</span> <span style="color: #ff0000;">&quot;Helvetica Neue&quot;</span><span style="color: #00AA00;">,</span> Helvetica<span style="color: #00AA00;">,</span> Arial<span style="color: #00AA00;">,</span>
	<span style="color: #ff0000;">&quot;Lucida Grande&quot;</span><span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">300</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Let&#8217;s go over these chunks of code one at a time. First off, I added a simple margin and padding reset just make sure various browser defaults don&#8217;t screw up our layout. Next is a trick I learned from Chris Coyier at CSS-Tricks for clearing floats (so yell at him if you don&#8217;t think it&#8217;s semantic). We&#8217;ll be floating a few things in this design and now that we&#8217;ve setup this CSS we can just throw in a <em>.clearDiv</em> class to make sure the content following that section will be reset back to where we want it. </p>
<p>Next, I&#8217;ve assigned a few text styles such as font-family and font-weight. I&#8217;ve also set the background to a dark gray and inserted out header graphic. Make sure you set the header slice to repeat so you get a bar that stretches all across the page. Finally, I&#8217;ve set the height at 100% and made sure these styles applied to both the html and body portions. This has to do with the sticky footer trick we&#8217;ll be setting up later. For now just make sure these styles are present.</p>
<p>Your file should be coming along nicely now and look roughly like the image below.</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/cu3erTut-5.jpg" alt="screenshot" width="510"/></div>
<h2>Step 5: Style the Page Wrap and Header</h2>
<p>Next up, add the following text to your CSS:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">&nbsp;
<span style="color: #cc00cc;">#page_wrap</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">850px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* Header Styles */</span>
&nbsp;
<span style="color: #cc00cc;">#header</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;Palatino Linotype&quot;</span><span style="color: #00AA00;">,</span><span style="color: #ff0000;">&quot;Book Antiqua&quot;</span><span style="color: #00AA00;">,</span>Palatino<span style="color: #00AA00;">,</span>FreeSerif<span style="color: #00AA00;">,</span><span style="color: #993333;">serif</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">25px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Here we&#8217;ve set our page wrap to 850px (a little unorthodox, but it just seemed right) and our margin to auto. This centers all of our content nicely within the browser window. </p>
<p>Next I&#8217;ve set the text to white, floated it left, set it apart from the top and assigned a font family and size. This should position the &#8220;Design Shack&#8221; text nicely in your preview. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/cu3erTut-6.jpg" alt="screenshot" width="510"/></div>
<h2>Step 6: Position the Slideshow</h2>
<p>Before we add the navigation into the header, we need to get the slideshow out of our way. To do this, first place the clearDiv class we talked about earlier after the header and before the slideshow in your HTML.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;">&nbsp;
<span style="color: #808080; font-style: italic;">&lt;!--  Header --&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;header&quot;</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Design Shack<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;clearDiv&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">&lt;!--  Cu3er --&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;slideshow&quot;</span>&gt;</span></pre></div></div>

<p>Now that we&#8217;ve cleared the float from the header, we can go into our CSS and add some styles for the slideshow.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">&nbsp;
<span style="color: #808080; font-style: italic;">/* Slideshow Styles */</span>
&nbsp;
<span style="color: #cc00cc;">#cu3er-container</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">600px</span><span style="color: #00AA00;">;</span>	
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#slideshow</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span>images/cube_shadow2.jpg<span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">top</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">350px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">70px</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Here we&#8217;ve added most of the styling to the wrapper around the slideshow. This is so we can keep the <em>cu3er-container</em> div at 600px (the width of the slideshow) while having a shadow graphic that extends beyond this boundary.</p>
<p>You can either make your own shadow in Photoshop or just grab mine from the <a href="http://designshack.net/tutorialexamples/Cu3erTut/Cu3erSourceFiles.zip">source files</a>. </p>
<p>Now your slideshow should be positioned perfectly on top of a nice shadow graphic to give it a sort of floating illusion. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/cu3erTut-7.jpg" alt="screenshot" width="510"/></div>
<h2>Step 6: Add the Navigation</h2>
<p>Now that the slideshow is out of our way, we can add in the navigation area. We&#8217;ll keep this pretty basic and just use an unordered list of links. Like the header, the navigation will use a float so place the navigation HTML after the header and before the clearDiv.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;">&nbsp;
<span style="color: #808080; font-style: italic;">&lt;!--  Header --&gt;</span>
	<span style="color: #808080; font-style: italic;">&lt;!--  Begin Page Wrap --&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;page_wrap&quot;</span>&gt;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">&lt;!--  Header --&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;header&quot;</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Design Shack<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">&lt;!--  Navigation --&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;nav&quot;</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://designshack.net/&quot;</span>&gt;</span>Home<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://designshack.net/articles&quot;</span>&gt;</span>Articles<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://designshack.net/gallery/&quot;</span>&gt;</span>Gallery<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://twitter.com/designshack&quot;</span>&gt;</span>Twitter<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;clearDiv&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

<p>Now we&#8217;ll need a large chunk of CSS to style everything involved with the navigation. We need to cover the navigation div as a whole, the unordered list, list items, list item links, and list item link hover effects.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">&nbsp;
<span style="color: #cc00cc;">#nav</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">text-transform</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">uppercase</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">12px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">15px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#nav</span> ul <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">list-style</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#nav</span> ul li <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#nav</span> ul li a<span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#nav</span> ul li a<span style="color: #3333ff;">:hover</span><span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">underline</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Everything here is pretty straightforward. The navigation is floated right (this sets it to the right side of the page and puts the elements in a line), set to white, positioned into place and transformed to uppercase. We&#8217;ve set the list-style to none to ditch the bullet points and eliminated any link text decoration except on hover, where we applied an underline. </p>
<p>And with that our navigation is finished. Now all that&#8217;s left is some superfluous text and the footer and we&#8217;ll be all finished!</p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/cu3erTut-8.jpg" alt="screenshot" width="510"/></div>
<h2>Step 7: Add the Text Below the Slideshow</h2>
<p>Just to round off the design a little, we&#8217;ll add a heading and paragraph under the slideshow. Just a few lines of html is all we&#8217;ll need:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;">&nbsp;
<span style="color: #808080; font-style: italic;">&lt;!--  Text Under The Slideshow --&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;tagline&quot;</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>Cu3er Slideshow<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>A Design Shack Tutorial<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

<p>Then we&#8217;ll style both the h1 and the paragraph tags individually. Notice I used the letterpress technique we learned in the <a href="http://designshack.net/articles/critique-articles/web-design-critique-1">Google Fonts article</a>. This uses a CSS3 text-shadow that&#8217;s lighter in color than the background to give the illusion of inset text.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">&nbsp;
<span style="color: #808080; font-style: italic;">/* Tagline Styles */</span>
&nbsp;
<span style="color: #cc00cc;">#tagline</span> h1<span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;Palatino Linotype&quot;</span><span style="color: #00AA00;">,</span><span style="color: #ff0000;">&quot;Book Antiqua&quot;</span><span style="color: #00AA00;">,</span>Palatino<span style="color: #00AA00;">,</span>FreeSerif<span style="color: #00AA00;">,</span><span style="color: #993333;">serif</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">70px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#272727</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">text-shadow</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span> <span style="color: #933;">2px</span> <span style="color: #933;">3px</span> <span style="color: #cc00cc;">#555</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#tagline</span> p<span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;HelveticaNeue-Light&quot;</span><span style="color: #00AA00;">,</span> <span style="color: #ff0000;">&quot;Helvetica Neue Light&quot;</span><span style="color: #00AA00;">,</span> <span style="color: #ff0000;">&quot;Helvetica Neue&quot;</span><span style="color: #00AA00;">,</span>
	    Helvetica<span style="color: #00AA00;">,</span> Arial<span style="color: #00AA00;">,</span> <span style="color: #ff0000;">&quot;Lucida Grande&quot;</span><span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">300</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#272727</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">text-shadow</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span> <span style="color: #933;">2px</span> <span style="color: #933;">3px</span> <span style="color: #cc00cc;">#555</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>That brings us to the end of most of our design. You can even stop there if you wish but I&#8217;m going to press on and show you a neat sticky footer trick I learned this week. </p>
<p>The image we use below for the footer is the exact same as the header image, only rotated 108 degrees so the red is on top and the black is on the bottom. </p>
<div class="tutorialimage"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/cu3erTut-9.jpg" alt="screenshot" width="510"/></div>
<h2>Final Step: Add the Footer</h2>
<p>If you&#8217;re wondering what a sticky footer is, it&#8217;s simply a footer that adheres to the bottom of the page as you resize the window. This can be tricky to implement but <a href="http://ryanfait.com/sticky-footer/">Ryan Fait</a> has created a pretty ingenious method of accomplishing it with very little code; see that method <a href="http://ryanfait.com/sticky-footer/">here</a>. </p>
<p>The basic idea is that you can use negative margins and a &#8220;push&#8221; to keep the footer at the bottom of the page. The first thing we need to do is insert the push and footer divs into our html. Place the push div inside of the page wrap and the footer div outside of the page wrap (so it will extend to the edges.)</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;">&nbsp;
		<span style="color: #808080; font-style: italic;">&lt;!--  Text Under The Slideshow --&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;tagline&quot;</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>Cu3er Slideshow<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>A Design Shack Tutorial<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">&lt;!--  For the Sticky Footer --&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;push&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
	<span style="color: #808080; font-style: italic;">&lt;!--  End Page Wrap --&gt;</span>
&nbsp;
&nbsp;
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;footer&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

<p>Now go into your CSS and insert the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">&nbsp;
<span style="color: #808080; font-style: italic;">/* Footer Styles */</span>
&nbsp;
<span style="color: #6666ff;">.push</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">55px</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* .push must be the same height as .footer */</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#footer</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">55px</span><span style="color: #00AA00;">;</span> 
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#4a4a4a</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">images/footer_repeat.jpg</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">repeat-x</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Notice that the height of the push has been set to the exact height of the footer. This is very important and the trick will not work without it. I&#8217;ve also placed in the background image that I mentioned above (just rotate the header image).</p>
<p>Finally, we&#8217;ll add one more snippet of CSS into our page wrap:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">&nbsp;
<span style="color: #cc00cc;">#page_wrap</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">850px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">min-height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span> !important<span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span> <span style="color: #933;">-55px</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* the bottom margin is the negative value of the footer's height */</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>The height and min-height have both been set to 100% and the bottom margin has been set to the negative value of the footer height (55px). This creates the effect of keeping the footer at the bottom of the page. The <em>height: auto !important;</em> bit is an IE hack to get around <em>min-height</em> issues with that browser.</p>
<h2>Final Result</h2>
<p>Our page is complete! If you&#8217;ve done everything right your page should look like the one below. You might notice that my version auto-starts when the page loads, don&#8217;t worry if yours doesn&#8217;t, we&#8217;ll deal with this in the next article.</p>
<div class="tutorialimage"><a href="http://designshack.net/tutorialexamples/Cu3erTut/demo.htm"><img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/cu3erTut-1.jpg" alt="screenshot" width="510"/></a></div>
<p>Now you have an awesome page with a mind-blowing 3D flash image slider to begin building a portfolio site.</p>
<h2>Conclusion</h2>
<p>Notice that virtually all the work involved was setting up the website. Cu3er was actually running just fine in the very first step! Check back soon for part two where we&#8217;ll learn to tweak some of the basic features, add text and links and more. </p>
]]></content:encoded>
			<wfw:commentRss>http://designshack.net/articles/css/create-an-awesome-3d-slideshow-with-cu3er-part-1/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>Ruby on Rails Intro</title>
		<link>http://designshack.net/articles/ruby-on-rails-intro/</link>
		<comments>http://designshack.net/articles/ruby-on-rails-intro/#comments</comments>
		<pubDate>Tue, 22 Apr 2008 16:38:22 +0000</pubDate>
		<dc:creator>David Appleyard</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[introduction]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[rubyonrails]]></category>
		<category><![CDATA[simple]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://localhost:8888/?p=229</guid>
		<description><![CDATA[You’ve probably heard about Ruby on Rails by now, but it might not be something you have ever really got to grips with. A List Apart have published two great articles as an introduction to Ruby On Rails: Getting Started with Ruby on Rails Creating More Using Less Effort with Ruby on Rails They look [...]]]></description>
			<content:encoded><![CDATA[<p>You’ve probably heard about Ruby on Rails by now, but it might not be something you have ever really got to grips with. A List Apart have published two great articles as an introduction to Ruby On Rails:</p>
<p><a href="http://www.alistapart.com/articles/gettingstartedwithrubyonrails">Getting Started with Ruby on Rails</a></p>
<p><a href="http://www.alistapart.com/articles/creatingmoreusinglesseffortwithrubyonrails">Creating More Using Less Effort with Ruby on Rails</a></p>
<p>They look like an easy way to get started, aiming to to demystify Ruby on Rails and convince you that you can make the leap.</p>
]]></content:encoded>
			<wfw:commentRss>http://designshack.net/articles/ruby-on-rails-intro/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Top 10 CSS Navigation Menus</title>
		<link>http://designshack.net/articles/top-10-css-navigation-menus/</link>
		<comments>http://designshack.net/articles/top-10-css-navigation-menus/#comments</comments>
		<pubDate>Wed, 26 Mar 2008 16:42:52 +0000</pubDate>
		<dc:creator>David Appleyard</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Navigation]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[tabs]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://localhost:8888/?p=239</guid>
		<description><![CDATA[Creating navigation with CSS is one of the most crucial elements of website design. Get the navigation right, and people will feel welcomed and at home. Get it wrong, and it can spell trouble for your website. This is a great collection of 10 CSS navigation examples and tutorials to get you in the creative [...]]]></description>
			<content:encoded><![CDATA[<p>Creating navigation with CSS is one of the most crucial elements of website design. Get the navigation right, and people will feel welcomed and at home. Get it wrong, and it can spell trouble for your website. This is a great collection of 10 CSS navigation examples and tutorials to get you in the creative mood.<br />
<span id="more-239"></span></p>
<h3>1. <a href="http://devthought.com/cssjavascript-true-power-fancy-menu/">CSS Fancy Menu</a></h3>
<p><img src="http://www.designshack.net/postimages/menu_css_1.jpg" alt="CSS Fancy Menu" /></p>
<p>This article gos through the creation of a custom navigation bar with some cute Javascript effects that will certainly impress your friends. Thanks to the great Mootools library, this beauty is contained in 1.5kb. Not only that, but it’s also cross browser (tested on Internet Explorer 6/7, Firefox and Safari) and accessible!</p>
<h3>2. <a href="http://qrayg.com/learn/code/cssmenus/">cssMenus</a></h3>
<p><img src="http://www.designshack.net/postimages/menu_css_2.jpg" alt="cssMenus" /></p>
<p>This navigation menu works both vertically and horizontally, being fully compatible with all browsers.</p>
<h3>3. <a href="http://www.webdesignerwall.com/tutorials/advanced-css-menu/">Advanced CSS Menu</a></h3>
<p><img src="http://www.designshack.net/postimages/menu_css_3.jpg" alt="Advanced CSS Menu" /></p>
<p>This tutorial I will show you how to slice up the menu design (step by step) and put them together with CSS. Most of you probably know how to code a horizontal or vertical CSS list menu. Now let’s take it to the next level &#8211; code an advanced (un-typical) list menu utilizing the CSS position property.</p>
<h3>4. <a href="http://www.alistapart.com/articles/taminglists/">Taming CSS Lists</a></h3>
<p><img src="http://www.designshack.net/postimages/menu_css_4.jpg" alt="Taming CSS Lists" /></p>
<p>In this article, I&#8217;ll demonstrate how to use CSS to bring unwieldy lists under control. It’s time for you to tell lists how to behave, instead of letting them run wild on your web page. Specific attention is paid to using a list as a vertical CSS menu.</p>
<h3>5. <a href="http://www.simplebits.com/notebook/2003/06/07/mini_tabs_the_untab_tab.html">Mini Tabs</a></h3>
<p><img src="http://www.designshack.net/postimages/menu_css_5.jpg" alt="CSS Tabs" /></p>
<p>I came up with these little “mini tabs” for navigation while working on a few projects. They’ll probably appear in the real world eventually. They are generated with pure CSS of course, and require no images.</p>
<h3>6. <a href="http://www.456bereastreet.com/lab/inverted_tabs/">Inverted Sliding Doors Tabs</a></h3>
<p><img src="http://www.designshack.net/postimages/menu_css_6.jpg" alt="Inverted Sliding Doors Tabs" /></p>
<p>This is an explanation of how I adapted Doug Bowman’s Sliding Doors technique to work with inverted tabs for a recent redesign of netrelations.se.</p>
<p>7. <a href="http://www.13styles.com/">A collection of free CSS menus</a></p>
<p>8. <a href="http://www.webcredible.co.uk/user-friendly-resources/css/css-navigation-menu.shtml">A simple gradient CSS menu</a></p>
<p>9. <a href="http://www.sitepoint.com/article/navigation-using-css">A walk-through of different CSS navigation techniques</a></p>
<p>10. <a href="http://www.sgclark.com/sandbox/minislide/">Mini sliding navigation</a></p>
]]></content:encoded>
			<wfw:commentRss>http://designshack.net/articles/top-10-css-navigation-menus/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>CSSEdit Tutorial: The Basics</title>
		<link>http://designshack.net/articles/cssedit-tutorial-part-1/</link>
		<comments>http://designshack.net/articles/cssedit-tutorial-part-1/#comments</comments>
		<pubDate>Fri, 18 Jan 2008 16:59:53 +0000</pubDate>
		<dc:creator>David Appleyard</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[cssedit]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[macrabbit]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://localhost:8888/?p=291</guid>
		<description><![CDATA[CSSEdit is, as the name implies, a CSS editor for the Mac. It has come on leaps and bounds in the latest version and is now one of the best apps available on the Mac for designers. CSSEdit is created by the great delopers over at MacRabbit, who are also responsible for DeskShade. One of [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.designshack.net/postimages/cssedit_icon.jpg" alt="CSSEdit Icon" class="right" /></p>
<p><a href="http://macrabbit.com/cssedit/">CSSEdit</a> is, as the name implies, a CSS editor for the Mac. It has  come on leaps and bounds in the latest version and is now one of the best apps available on the Mac for designers. CSSEdit is created by the great delopers over at <a href="http://macrabbit.com">MacRabbit</a>, who are also responsible for <a href="http://macrabbit.com/deskshade">DeskShade</a>.</p>
<p>One of the strongest features of CSSEdit is the simple, easy to navigate and beautiful interface. Even people who have no experience in styling web pages can find their way around this amazing app and create some stunning web pages. In this tutorial we&#8217;re going to be looking at the interface and how to get the most out of it.</p>
<h2>The Main Window</h2>
<p>The main window has three main sections, the first section (on the left) is the styles section. Here you can see all the styles you have applied to your site. The middle section is the actual editor of the app, here you do all the coding of your css file all with the ever-helpful code completion feature. The right hand section is a way of styling your page without coding anything whatsoever. You can type in or select with drop down boxes how you wish to style a certain element and the code is inserted for you. This is a great feature for anyone new to CSS or anyone who isn&#8217;t sure how to code a certain technique.</p>
<p><img src="http://www.designshack.net/postimages/cssedit1.jpg" alt="CSSEdit Main Window" /></p>
<h2>The Toolbar</h2>
<p>The toolbar of CSSEdit has some of the best features in the app and is therefore used quite a bit, especially in more advanced use, we&#8217;ll go through each toolbar icon one-by-one and I&#8217;ll explain what each one does.</p>
<p><img src="http://www.designshack.net/postimages/cssedit2.jpg" alt="CSSEdit Toolbar" /></p>
<p>Along the left hand side of the toolbar there are 5 tools, the first is the new style feature, this allows you to add a new style to your stylesheet quite easily. The second allows you to group certain styles together into a folder to make them easier to navigate through. The third is a simple of way of adding a comment into your stylesheet without having to code it in by hand. The fourth is a more advanced way of styling elements, it allows you to style a certain element wherever it appears in your stylesheet. With these four features there is no coding needed, CSSEdit does it all for you. The fifth feature is a simple search function, useful if you have a very large stylesheet.</p>
<p><img src="http://www.designshack.net/postimages/cssedit3.jpg" alt="CSSEdit Right Icons" /></p>
<p>The right hand side of the toolbar contains some of the more advanced features of CSSEdit. The first allows you to insert a link to the stylesheet into a HTML file, this assigns the HTML file the CSS file to style it. The second is a way of previewing your web page without having to open an external web browser. The third is called Milestones, it is a way of saving your current progress in the stylesheet, allowing you to revert if a mistake is made. The fourth is a way of validating your CSS and the final icon allows you to change which three columns of the main interface you can see, meaning that if you can&#8217;t code you can just edit your CSS with no coding needed.</p>
<p>If you don&#8217;t have this app, as a web developer I seriously suggest reading more at <a href="http://macrabbit.com">MacRabbit</a>. It really is the ultimate in stylesheet creation.</p>
]]></content:encoded>
			<wfw:commentRss>http://designshack.net/articles/cssedit-tutorial-part-1/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>10 CSS Table Examples</title>
		<link>http://designshack.net/articles/10-css-table-examples/</link>
		<comments>http://designshack.net/articles/10-css-table-examples/#comments</comments>
		<pubDate>Thu, 30 Aug 2007 19:55:44 +0000</pubDate>
		<dc:creator>David Appleyard</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Layouts]]></category>
		<category><![CDATA[style]]></category>
		<category><![CDATA[tables]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[webdesign]]></category>

		<guid isPermaLink="false">http://localhost:8888/?p=397</guid>
		<description><![CDATA[Today we&#8217;re going to take a look at a selection of beautiful tables styled using CSS. These are sourced from a variety of different sites. If you&#8217;re interested in learning how to do this yourself, be sure to take a look at a few of our CSS tutorials! 1. A CSS Styled Table Further to [...]]]></description>
			<content:encoded><![CDATA[<p>Today we&#8217;re going to take a look at a selection of beautiful tables styled using CSS. These are sourced from a variety of different sites. If you&#8217;re interested in learning how to do this yourself, be sure to take a look at a few of our <a href="http://designshack.net/category/articles/css/">CSS tutorials</a>!</p>
<p><span id="more-397"></span></p>
<h2>1. <a href="http://veerle.duoh.com/blog/comments/a_css_styled_table/">A CSS Styled Table</a></h2>
<p><img src="http://designshack.net/wp-content/uploads/csstable1.png" alt="A CSS Styled Table" class="tutorialimage" width="510" height="128" /></p>
<p>Further to my article about the creation of a CSS calendar the thought crossed my mind to show you an example on how you can style a table using CSS. The data of tables can be boring so all the more reason that we need to attract attention to it and make it as pleasant to read as possible. Presentation and design with some basic accessibility rules in mind is the way to go.</p>
<h2>2. <a href="http://veerle.duoh.com/blog/comments/a_css_styled_table_version_2/">A CSS Styled Table Part 2</a></h2>
<p><img src="http://designshack.net/wp-content/uploads/table2.jpg" alt="A CSS Styled Table 2" title="table2" width="510" height="324" class="tutorialimage" /></p>
<p>This article is about the proper usage of tables, for tabular data. How you can implement them with accessibility in mind and how to make them appealing for the eye using CSS. </p>
<h2>3. <a href="http://www.askthecssguy.com/2007/08/creating_a_table_with_dynamica.html">Creating a Dynamic CSS &#038; AJAX Table</a></h2>
<p><img src="http://designshack.net/wp-content/uploads/tabledynamic.jpg" alt="Dynamic AJAX CSS Table" width="510" height="197" class="tutorialimage" /></p>
<p>I like Crazy Egg&#8217;s pricing table on their Pricing &#038; Signup page. When you click on &#8220;Sign Up&#8221; for an option, that plan&#8217;s column highlights, the other plans vanish, and a signup form takes their place. There is a number of impressive things happening within this small area. I wanted to try and recreate the behavior step by step, and share the power of combining CSS, JavaScript, and images in clever ways.</p>
<h2>4. <a href="http://24ways.org/2005/tables-with-style">Tables With Style</a></h2>
<p><img src="http://designshack.net/wp-content/uploads/tablered.jpg" alt="Tables With Style" width="510" height="221" class="tutorialimage" /></p>
<p>It might not seem like it but styling tabular data can be a lot of fun. From a semantic point of view, there are plenty of elements to tie some style into. You have cells, rows, row groups and, of course, the table element itself. Adding CSS to a paragraph just isn’t as exciting.</p>
<h2>5. <a href="http://www.lukew.com/ff/entry.asp?328">Redesigning a Simple Table</a></h2>
<p><img src="http://designshack.net/wp-content/uploads/simpletable3.gif" alt="Simple CSS Table" width="510" height="249" class="tutorialimage" /></p>
<p>A series of excellent examples, showcasing how to simplify a basic data table by eliminating unnecessary interface elements.</p>
<h2>6. <a href="http://icant.co.uk/csstablegallery/">CSS Table Gallery</a></h2>
<p>The CSS Table Gallery is a showcase of how CSS and data tables can work together to create usable and pretty results. It&#8217;s a great way to see a bunch of interesting examples.</p>
<h2>7. <a href="http://robertdenton.org/reference/css-tables-tutorial.html">Various Table Techniques</a></h2>
<p><img src="http://designshack.net/wp-content/uploads/styletables.jpg" alt="Various Table Techniques" width="510" height="99" class="tutorialimage" /></p>
<p>Tables styled with CSS rules are much more efficient, if done well, than the old method of using font tags, a lot of color tags, and more&#8230; These examples are forward thinking, and also degrade well to older browsers.</p>
<h2>8. <a href="http://moronicbajebus.com/wordpress/wp-content/cssplay/reformat-table/index.html">Firefox Theme Table Example</a></h2>
<p><img src="http://designshack.net/wp-content/uploads/reformat.jpg" alt="Reformat the Table" title="reformat" width="510" height="195" class="tutorialimage" /></p>
<p>I banned the use of tables in my works when I first switched to CSS based layouts. But I was still missing the point of tables, tables are a way to markup tabular data. Once I got that point in my head, I started to think of things that really were tabular data such as the next example of Mozilla Firebird themes. Each row is a record of a theme and the columns are the fields for each theme.</p>
<h2>9. <a href="http://www.alistapart.com/articles/tableruler/">The Table Ruler</a></h2>
<p>With a bit of JavaScript / DOM sorcery, we can provide our visitors with the same functionality for long data tables in HTML, by applying rollover states to the rows. This could be implemented tediously by hand, of course, but it would be silly to do so. Instead, we will use the DOM to find the rows to highlight on mouseover.</p>
<p><strong><em>Like the article? Be sure to subscribe to our <a href="feed://feeds.feedburner.com/designshack">RSS feed</a> and follow us on <a href="http://twitter.com/designshack">Twitter</a> to stay up on recent content.</em></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://designshack.net/articles/10-css-table-examples/feed/</wfw:commentRss>
		<slash:comments>82</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Object Caching 709/847 objects using disk: basic

Served from: designshack.net @ 2012-02-09 17:56:40 -->
