<?xml version="1.0" encoding="UTF-8" standalone="no"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:gd="http://schemas.google.com/g/2005" xmlns:georss="http://www.georss.org/georss" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-8363405111659754159</atom:id><lastBuildDate>Tue, 17 Mar 2026 09:02:38 +0000</lastBuildDate><category>css</category><category>design</category><category>designer</category><category>freelance</category><category>interview</category><category>jquery</category><category>logo</category><category>portfolio</category><category>.net</category><category>CS6</category><category>Color</category><category>Features</category><category>Fireworks</category><category>Infographic</category><category>Painting</category><category>Palettes</category><category>Work</category><category>asp.net</category><category>bootstrap</category><category>c#</category><category>effect</category><category>gallary</category><category>idea</category><category>image</category><category>image.</category><category>it</category><category>javascript</category><category>learn</category><category>mistake</category><category>plugin</category><category>resource</category><category>seo</category><category>server</category><category>slider</category><category>soap</category><category>sql</category><category>twitter</category><category>ui</category><category>web service</category><title>Kida's World</title><description>Inspiring your creativity...</description><link>http://kidaworld.blogspot.com/</link><managingEditor>noreply@blogger.com (UXAWY)</managingEditor><generator>Blogger</generator><openSearch:totalResults>38</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><language>en-us</language><itunes:explicit>no</itunes:explicit><itunes:subtitle>Inspiring your creativity...</itunes:subtitle><itunes:category text="Technology"><itunes:category text="Gadgets"/></itunes:category><itunes:owner><itunes:email>noreply@blogger.com</itunes:email></itunes:owner><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8363405111659754159.post-146790973444336231</guid><pubDate>Mon, 12 Nov 2012 13:27:00 +0000</pubDate><atom:updated>2012-11-12T05:27:04.751-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">javascript</category><category domain="http://www.blogger.com/atom/ns#">jquery</category><title>Useful JavaScript Libraries and jQuery Plugins</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h3&gt;
Web Forms and Input Validation&lt;/h3&gt;
&lt;a href="http://ivaynberg.github.com/select2/"&gt;Select2 jQuery Plugin&lt;/a&gt;&lt;sup class="print_only"&gt; 42&lt;/sup&gt;&lt;br /&gt;
A jQuery-plugin for replacement and enhancement of &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt;-boxes. The plugin supports search, remote data sets, and infinite scrolling of results. Users can just start typing what they’re looking for. Non-matching entries are removed from the view, and options can be selected using “Enter” or a mouse click. The plug-in works with standard select input fields as well as with multiple selects and &lt;code&gt;optgroup&lt;/code&gt;. It also has support for &lt;code&gt;selected&lt;/code&gt;, &lt;code&gt;disabled&lt;/code&gt; and default text (HTML5’s &lt;code&gt;placeholder&lt;/code&gt; attribute). The plug-in is based on &lt;a href="https://github.com/harvesthq/chosen/"&gt;Chosen&lt;/a&gt;&lt;sup class="print_only"&gt; 43&lt;/sup&gt;, an alternative solution which is currently available in jQuery, MooTools and Prototype flavors and as a Drupal 7 module.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://ivaynberg.github.com/select2/" style="border: medium none;"&gt;&lt;img alt="JavaScript Library" class="alignnone size-full wp-image-121595" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/select2.gif" title="Select2" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 44&lt;/sup&gt;&lt;br /&gt;
&lt;a href="http://shaggysmile.github.com/jQueryCoreUISelect/"&gt;jQueryCoreUISelect&lt;/a&gt;&lt;sup class="print_only"&gt; 45&lt;/sup&gt;&lt;br /&gt;
Another cross-browser solution to enhance the &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; element with jQuery and CSS. Requires jQuery 1.6 or higher. It provides full customization, support of &lt;code&gt;optiongroup&lt;/code&gt;, automatic calculations, keyboard support, callback functions and is compatible with mobile devices.&lt;br /&gt;
&lt;a href="http://shaggysmile.github.com/jQueryCoreUISelect/" style="border: medium none;"&gt;&lt;img alt="jQueryCoreUISelect" src="http://media.smashingmagazine.com/wp-content/uploads/2012/08/select.png" title="jQueryCoreUISelect" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 46&lt;/sup&gt;&lt;br /&gt;
&lt;a href="http://coding.smashingmagazine.com/2011/12/05/sisyphus-js-client-side-drafts-and-more/"&gt;Sisyphus.js&lt;/a&gt;&lt;sup class="print_only"&gt; 47&lt;/sup&gt;&lt;br /&gt;
This script allows Gmail-like auto-saving of drafts. It stores form data to the HTML5 local storage of the user’s browser and restores it when the user reloads or reopens the page or opens the page in a new tab. The data is cleared from local storage when the user submits or resets the form.&lt;br /&gt;
&lt;a href="http://coding.smashingmagazine.com/2011/12/05/sisyphus-js-client-side-drafts-and-more/" style="border: medium none;"&gt;&lt;img alt="Sisyphus.js" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/sisyphus-js.jpg" title="Sisyphus.js" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 48&lt;/sup&gt;&lt;br /&gt;
&lt;a href="http://paweldecowski.github.com/jQuery-CreditCardValidator/"&gt;jQuery Credit Card Validator&lt;/a&gt;&lt;sup class="print_only"&gt; 49&lt;/sup&gt;&lt;br /&gt;
This library attaches to the input event (with a fallback to the keyup event) and so every time a number in the input field changes, it calls a validation function. When a card is recognized, the credit card type is highlighted; and if the credit card number is correct, it is highlighted with a green checkmark as well. The plugin supports American Express, Diners Club, Discover Card, JCB, Laser, Maestro, MasterCard, Visa and Visa Electron. You might want to consider &lt;a href="http://davidwalsh.name/validate-credit-cards"&gt;credit cards JavaScript validator&lt;/a&gt;&lt;sup class="print_only"&gt; 50&lt;/sup&gt; and the &lt;a href="http://www.egrappler.com/jquery-credit-card-validation-plugin-smart-validate/"&gt;Smart Validate Credit Card Validation plugin&lt;/a&gt;.&lt;br /&gt;
&lt;a href="http://paweldecowski.github.com/jQuery-CreditCardValidator/" style="border: medium none;"&gt;&lt;img alt="JavaScript Library" class="alignnone size-full wp-image-121583" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/jquery-creditcard.jpg" title="jQuery Card Validator" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 51&lt;/sup&gt;&lt;br /&gt;
&lt;a href="http://textextjs.com/"&gt;TextExt&lt;/a&gt;&lt;sup class="print_only"&gt; 52&lt;/sup&gt;&lt;br /&gt;
This library allows you to transform HTML text into input fields, without resorting to code inflation. The plugin inserts aesthetic as well as practical input possibilities, e.g. Tags, Ajax, Focus and others.&lt;br /&gt;
&lt;a href="http://textextjs.com/" style="border: medium none;"&gt;&lt;img alt="TextExt" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/textext.jpg" title="TextExt" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 53&lt;/sup&gt;&lt;br /&gt;
&lt;a href="http://labs.voronianski.com/jquery.avgrund.js/"&gt;Avgrund: Better Modal Boxes&lt;/a&gt;&lt;br /&gt;
A jQuery plugin for displaying a depth illusion between popup and page. The &lt;a href="https://github.com/hakimel/avgrund/"&gt;original script by Hakim El Hattab&lt;/a&gt;&lt;sup class="print_only"&gt; 54&lt;/sup&gt; uses CSS transitions and transformations, and the plugin gracefully degrades in those that do not support transitions and transforms. MIT licensed.&lt;br /&gt;
&lt;a href="http://labs.voronianski.com/jquery.avgrund.js/" style="border: medium none;"&gt;&lt;img alt="Avgrund: Better Modal Boxes" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/modal.png" title="Avgrund" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://documentcloud.github.com/visualsearch/"&gt;VisualSearch.js&lt;/a&gt;&lt;sup class="print_only"&gt; 55&lt;/sup&gt;&lt;br /&gt;
This library enhances ordinary search boxes with the ability to autocomplete faceted search queries. You can specify the facets for completion, along with the completable values for any facet. You can retrieve the search query as a structured object, so you don’t have to parse the query string yourself.&lt;br /&gt;
&lt;a href="http://elclanrs.github.com/jq-idealforms/"&gt;Ideal Forms Framework&lt;/a&gt;&lt;sup class="print_only"&gt; 56&lt;/sup&gt;&lt;br /&gt;
A very comprehensive jQuery plugin for building and validating responsive HTML5 forms. It provides keyboard support, customizable input types, “on the spot” validation, localization and HTML5 &lt;code&gt;placeholder&lt;/code&gt; polyfill. Supported in IE8+, Chrome, Firefox, Opera, iOS5+, Android 4.0+.&lt;br /&gt;
&lt;a href="http://elclanrs.github.com/jq-idealforms/" style="border: medium none;"&gt;&lt;img alt="Ideal Forms Framework" src="http://media.smashingmagazine.com/wp-content/uploads/2012/08/ideal-forms.png" title="Ideal Forms Framework" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 57&lt;/sup&gt;&lt;br /&gt;
&lt;a href="https://github.com/Kicksend/mailcheck"&gt;Mailcheck&lt;/a&gt;&lt;sup class="print_only"&gt; 58&lt;/sup&gt;&lt;br /&gt;
With this JavaScript spell-checker you can suggests another domain when the user misspells it in an email address. Mailcheck helps effectively reducing sign up typos. While it already includes some &amp;nbsp;domains, you can easily supply your own.&lt;br /&gt;
&lt;a href="https://github.com/Kicksend/mailcheck" style="border: medium none;"&gt;&lt;img alt="Mailcheck" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/mailcheck.gif" title="Mailcheck" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 59&lt;/sup&gt;&lt;br /&gt;
&lt;a href="http://rickharrison.github.com/validate.js/"&gt;Validate.js&lt;/a&gt;&lt;br /&gt;
A lightweight JavaScript form validation library. You can validate form fields using over a dozen rules and set custom messages; the library doesn’t have any dependencies and you can define your own validation callbacks for custom rules. Works in all major browsers (even IE6!).&lt;br /&gt;
&lt;a href="http://rickharrison.github.com/validate.js/" style="border: medium none;"&gt;&lt;img alt="JavaScript Library" class="alignnone size-full wp-image-121608" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/validate-js.jpg" title="Validate.js" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://github.com/blueimp/jQuery-File-Upload"&gt;jQuery File Upload&lt;/a&gt;&lt;sup class="print_only"&gt; 60&lt;/sup&gt;&lt;br /&gt;
File Upload widget with multiple file selection, drag&amp;amp;drop-support, progress bars and preview images. It supports cross-domain, chunked and resumable file uploads and client-side image resizing. Works with any server-side platform (PHP, Python, Ruby on Rails, Java, Node.js, Go etc.) that supports standard HTML form file uploads.&lt;br /&gt;
&lt;a href="https://github.com/blueimp/jQuery-File-Upload" style="border: medium none;"&gt;&lt;img alt="JavaScript Library" class="alignnone size-full wp-image-121609" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/fileupload-jquery.jpg" title="File Upload" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 61&lt;/sup&gt;&lt;br /&gt;
&lt;a href="http://jamescryer.github.com/grumble.js/"&gt;Grumble.js&lt;/a&gt;&lt;br /&gt;
&lt;i&gt;&lt;/i&gt;This jQuery plugin provides tool tips without being limited to cardinal directions. A &lt;i&gt;grumble&lt;/i&gt; can be rotated around a given element at any angle, all 360 degrees and at any distance — with CSS. Works in Internet Explorer 6+ and modern browsers. Also, check &lt;a href="http://projects.nickstakenburg.com/tipped"&gt;Tipped&lt;/a&gt;&lt;sup class="print_only"&gt; 62&lt;/sup&gt;, a larger library of various designs and implementations of tooltips with an extensive API.&lt;br /&gt;
&lt;a href="http://jamescryer.github.com/grumble.js/" style="border: medium none;"&gt;&lt;img alt="Grumble.js" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/grumble-js.jpg" title="Grumble.js" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://bootboxjs.com/"&gt;Dialogs for Twitter Bootstrap&lt;/a&gt;&lt;br /&gt;
A small JavaScript library which allows you to create dialog boxes using Twitter’s Bootstrap modals, without having to worry about creating, managing or removing any of the required DOM elements or JS event handlers. You might want to check out the &lt;a href="http://www.dangrossman.info/2012/08/20/a-date-range-picker-for-twitter-bootstrap/"&gt;Date Range Picket for Bootstrap&lt;/a&gt;&lt;sup class="print_only"&gt; 63&lt;/sup&gt; as well as a growing library of &lt;a href="http://bootsnipp.com/"&gt;HTML Snippets for Twitter Bootstrap&lt;/a&gt;.&lt;br /&gt;
&lt;a href="http://bootboxjs.com/" style="border: medium none;"&gt;&lt;img alt="JavaScript Library" class="alignnone size-full wp-image-121610" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/bootbox.jpg" title="Dialogs" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 64&lt;/sup&gt;&lt;br /&gt;
&lt;a href="http://designwithpc.com/Plugins/ddSlick"&gt;ddSlick&lt;/a&gt;&lt;sup class="print_only"&gt; 65&lt;/sup&gt;&lt;br /&gt;
Prashant Chaudhary has realeased a free lightweight jQuery plugin that lets you create a custom drop-down that can include images, a short description, along with your usual text and value. It also supports callback functions on selection. You could use &lt;a href="http://azadcreative.com/2012/01/bulletproof-css3-dropdown-navigation-menu/"&gt;CSS3 Drop-Downs&lt;/a&gt;&lt;sup class="print_only"&gt; 66&lt;/sup&gt; as well.&lt;br /&gt;
&lt;a href="http://designwithpc.com/Plugins/ddSlick" style="border: medium none;"&gt;&lt;img alt="ddSlick" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/ddslick.jpg" title="ddSlick" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 67&lt;/sup&gt;&lt;br /&gt;
&lt;a href="http://needim.github.com/noty/"&gt;noty&lt;/a&gt;&lt;sup class="print_only"&gt; 68&lt;/sup&gt;&lt;br /&gt;
This jQuery plugin makes it easy to create alert, success, error, warning, information and confirmation messages. The notification can be positioned anywhere on the page and you can customize the text, animation, speed and buttons easily.&lt;br /&gt;
&lt;a href="http://needim.github.com/noty/" style="border: medium none;"&gt;&lt;img alt="noty" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/noty1.jpg" title="noty" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 69&lt;/sup&gt;&lt;br /&gt;
&lt;a href="https://github.com/danpalmer/jquery.complexify.js"&gt;jQuery.complexify.js&lt;/a&gt;&lt;br /&gt;
Complexify helps you to accurately gauge the quality of a user’s password to give them visual feedback, and to enforce a minimum level of security.&lt;br /&gt;
&lt;a href="https://github.com/danpalmer/jquery.complexify.js" style="border: medium none;"&gt;&lt;img alt="JavaScript Library" class="alignnone size-full wp-image-121611" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/complexify.png" title="Complexify.js" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.mitya.co.uk/blog/2012/Jan/Numberfy-add-line-numbers-to-your-textareas-198"&gt;Numberfy&lt;/a&gt;&lt;sup class="print_only"&gt; 70&lt;/sup&gt;&lt;br /&gt;
With Numberfy you can integrate native support for line numbers in your website’s text areas. On every key press in the text area, the text area’s current value is split into lines. This script will not work in IE due to a bug in the text-wrap properties.&lt;br /&gt;
&lt;a href="https://github.com/OliverJAsh/FormAccordion"&gt;FormAccordion&lt;/a&gt;&lt;br /&gt;
A jQuery plugin for easily hiding and revealing related form fields conditionally.&lt;br /&gt;
&lt;a href="https://github.com/remybach/jQuery.superLabels"&gt;jQuery.superLabels&lt;/a&gt;&lt;sup class="print_only"&gt; 71&lt;/sup&gt;&lt;br /&gt;
You can use the library to give your forms a fade-out label. This implementation makes the label slide across the field when gaining focus and fade out when a value is entered. A fallback is provided as well.&lt;br /&gt;
&lt;a href="https://github.com/wwwtyro/cryptico"&gt;cryptico&lt;/a&gt;&lt;sup class="print_only"&gt; 72&lt;/sup&gt;&lt;br /&gt;
An encryption system utilizing RSA and AES for JavaScript.&lt;br /&gt;
&lt;h3&gt;
Web Typography Libraries and Plugins&lt;/h3&gt;
&lt;a href="http://daneden.me/baseline/"&gt;Baseline.js&lt;/a&gt;&lt;sup class="print_only"&gt; 73&lt;/sup&gt;&lt;br /&gt;
A jQuery plugin for restoring baselines thrown off by odd image sizes. To use it, you just call the plugin passing the height of your baseline as a variable. You can also define multiple baselines for different responsive breakpoints. &lt;br /&gt;
&lt;a href="http://daneden.me/baseline/" style="border: medium none;"&gt;&lt;img alt="Baseline.js" src="http://media.smashingmagazine.com/wp-content/uploads/2012/08/baseline-js.png" title="Baseline.js" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 74&lt;/sup&gt;&lt;br /&gt;
&lt;a href="https://github.com/ftlabs/ftcolumnflow"&gt;FTColumnflow&lt;/a&gt;&lt;sup class="print_only"&gt; 75&lt;/sup&gt;&lt;br /&gt;
Developed by the development team of Financial Times, this library is essentially a polyfill that fixes the inadequacies of CSS column layouts. With the library, you can provide configurable column widths, gutters and margins, define elements spanning columns, keep-with-next to avoid headings at the bottom of a column, group columns into pages and standardize line height to align text baseline to a grid.&lt;br /&gt;
&lt;a href="https://github.com/ftlabs/ftcolumnflow" style="border: medium none;"&gt;&lt;img alt="FTcolumnflow" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/financialtimes.gif" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 76&lt;/sup&gt;&lt;br /&gt;
&lt;a href="http://jbrewer.github.com/Responsive-Measure/"&gt;Responsive Measure jQuery Plugin&lt;/a&gt;&lt;br /&gt;
A simple script that allows you to pass in a selector (ideally the container where your primary content will go), which generates the ideal font size needed to produce the ideal measure for your text. The script also &amp;nbsp;generates a resolution-independent font-scale based on the ideal font-size. Created by Josh Brewer.&lt;br /&gt;
&lt;a href="http://jbrewer.github.com/Responsive-Measure/" style="border: medium none;"&gt;&lt;img alt="Baseline.js" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/responsive-measure.gif" title="Responsive Measure" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 77&lt;/sup&gt;&lt;br /&gt;
&lt;a href="http://artequalswork.com/posts/on-widows.php"&gt;The Widow Tamer&lt;/a&gt;&lt;sup class="print_only"&gt; 78&lt;/sup&gt;&lt;br /&gt;
The Widow Tamer is a small JavaScript library that automatically “fixes” typographic widows. It’s designed to work with responsive sites, fixing widows as it finds them on resize or orientation change.&lt;br /&gt;
&lt;a href="http://artequalswork.com/posts/on-widows.php" style="border: medium none;"&gt;&lt;img alt="JavaScript Library" class="alignnone size-full wp-image-121621" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/widow-tamer.gif" title="The Widow Tamer" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 79&lt;/sup&gt;&lt;br /&gt;
&lt;a href="http://nicewebtype.com/notes/2012/02/03/molten-leading-or-fluid-line-height/"&gt;Fluid Line-Height&lt;/a&gt;&lt;sup class="print_only"&gt; 80&lt;/sup&gt;&lt;br /&gt;
&lt;i&gt;&lt;/i&gt;With his article, Tim Brown inspired developers to release tools that adjust &lt;code&gt;line-height&lt;/code&gt; for optimum readability on responsive websites. The so-called &lt;i&gt;molten-leading&lt;/i&gt; binds the height of the line to an element’s minimum and maximum width. jQuery-minLineHeight is a jQuery plugin that works similarly with minimum and maximum width association.&lt;br /&gt;
&lt;a href="http://nicewebtype.com/notes/2012/02/03/molten-leading-or-fluid-line-height/" style="border: medium none;"&gt;&lt;img alt="Nice Web Type" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/molten-leading.gif" title="Molten-Leading" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 81&lt;/sup&gt;&lt;br /&gt;
&lt;a href="http://fittextjs.com/"&gt;FitText.js&lt;/a&gt;&lt;sup class="print_only"&gt; 82&lt;/sup&gt;&lt;br /&gt;
This jQuery plugin helps you create scalable headlines that fill the width of a parent element in your fluid or responsive layouts. You might want to check out &lt;a href="http://fittextjs.com/"&gt;Lettering.js&lt;/a&gt;&lt;sup class="print_only"&gt; 83&lt;/sup&gt; as well to get a complete down-to-the-letter control of letters in your projects.&lt;br /&gt;
&lt;a href="http://fittextjs.com/" style="border: medium none;"&gt;&lt;img alt="FitText.js" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/fittextjs1.jpg" title="FitText.js" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 84&lt;/sup&gt;&lt;br /&gt;
&lt;a href="http://kerningjs.com/"&gt;Kerning.js&lt;/a&gt;&lt;sup class="print_only"&gt; 85&lt;/sup&gt;&lt;br /&gt;
This library lets you kern, style, transform, and scale your Web type with CSS rules, automatically. You can adjust pairings, introduce font conditionals and augment properties.&lt;br /&gt;
&lt;a href="http://kerningjs.com/" style="border: medium none;"&gt;&lt;img alt="Kerning.js" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/kerningjs1.gif" title="Kerning.js" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 86&lt;/sup&gt;&lt;br /&gt;
&lt;a href="http://www.frequency-decoder.com/demo/slabText/"&gt;SlabText.js&lt;/a&gt;&lt;sup class="print_only"&gt; 87&lt;/sup&gt;&lt;br /&gt;
The script splits headlines into rows before resizing each row to fill the available horizontal space. The ideal number of characters to set on each row is calculated by dividing the available width by the pixel font-size – the script then uses this ideal character count to split the headline into word combinations that are displayed as separate rows of text.&lt;br /&gt;
&lt;a href="http://www.frequency-decoder.com/demo/slabText/" style="border: medium none;"&gt;&lt;img alt="Nice Web Type" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/slabtextjs1.gif" title="SlabText.js" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 88&lt;/sup&gt;&lt;br /&gt;
&lt;h3&gt;
Little Time-Savers&lt;/h3&gt;
&lt;a href="http://josscrowcroft.github.com/money.js/"&gt;money.js: Open-Source Exchange Rates and Currency Conversion&lt;/a&gt;&lt;br /&gt;
&lt;i&gt;&lt;/i&gt;Joss Crowcroft has created an &lt;i&gt;Open Source Exchange Rates API&lt;/i&gt;, which provides up-to-date, flexible and portable currency-conversion data that can be used in any application, framework or language (not just JavaScript). It has no access fees, no rate limits, no nasty XML: just free, hourly updated exchange rates in JSON. Joss also built &lt;i&gt;money.js&lt;/i&gt;, a JavaScript currency conversion library that can be easily integrated in any website. A demo playground and detailed documentation are provided on the website, and the source code is available on GitHub.&lt;br /&gt;
&lt;a href="http://josscrowcroft.github.com/money.js/" style="border: medium none;"&gt;&lt;img alt="JavaScript Library" class="alignnone size-full wp-image-121591" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/money-js.gif" title="Money.js" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://josscrowcroft.github.com/accounting.js/"&gt;Accounting.js: Easier Number and Currency Formatting&lt;/a&gt;&lt;br /&gt;
This simple, tiny JavaScript library will solve your currency and numbers-related formatting hassles, and it even includes optional Excel-style column rendering to line up symbols and decimals. It will make all of your numbers and currencies look much more uniform and professional.&lt;br /&gt;
&lt;a href="http://josscrowcroft.github.com/accounting.js/" style="border: medium none;"&gt;&lt;img alt="JavaScript Library" class="alignnone size-full wp-image-121593" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/accounting-js.gif" title="Accounting.js" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://momentjs.com/"&gt;Moment.js: Format Dates And Times&lt;/a&gt;&lt;sup class="print_only"&gt; 89&lt;/sup&gt;&lt;br /&gt;
&lt;i&gt;Moment.js&lt;/i&gt; is a lightweight JavaScript library which lets you format, parse and manipulate dates. You can add or subtract dates from one another, as well as parse things like Unix Timestamps. Display options include formatted dates, time from now, difference, time from another moment, native date and support for leap years.&lt;br /&gt;
&lt;a href="http://momentjs.com/" style="border: medium none;"&gt;&lt;img alt="JavaScript Library" class="alignnone size-full wp-image-121590" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/moment-js.gif" title="Calendar Time" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 90&lt;/sup&gt;&lt;br /&gt;
&lt;a href="http://pragmaticly.github.com/smart-time-ago/"&gt;Smart Time Ago&lt;/a&gt;&lt;sup class="print_only"&gt; 91&lt;/sup&gt;&lt;br /&gt;
&lt;i&gt;&lt;/i&gt;This little jQuery library provides you with an intelligent way of updating relative timestamps in your documents. &lt;i&gt;Smart Time Ago&lt;/i&gt; checks and updates every 60 seconds the relative time, within a scope which you specify at the start. It checks the newest time in your scope and tunes the checking time interval to a proper value. The tool can be used as a jQuery plugin, or – if using node – can be installed from npm.&lt;br /&gt;
&lt;a href="http://pragmaticly.github.com/smart-time-ago/" style="border: medium none;"&gt;&lt;img alt="Smart Time Ago" src="http://media.smashingmagazine.com/wp-content/uploads/2012/08/js-libraries-102.jpg" title="Smart Time Ago" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 92&lt;/sup&gt;&lt;br /&gt;
&lt;a href="https://github.com/cjstewart88/sortByTimeAgo"&gt;sortByTimeAgo.js&lt;/a&gt;&lt;sup class="print_only"&gt; 93&lt;/sup&gt;&lt;br /&gt;
A little JavaScript library that takes an array of objects with &lt;code&gt;TimeAgo&lt;/code&gt; properties and sorts them from newest to oldest.&lt;br /&gt;
&lt;a href="http://lipka.github.com/piecon/"&gt;Piecon&lt;/a&gt;&lt;br /&gt;
Piecon is a tiny JavaScript library for dynamically generating progress pie charts in your favicons. It has been tested to work in Chrome 15+, Firefox 9+ and Opera 11+.&lt;br /&gt;
&lt;a href="http://lipka.github.com/piecon/" style="border: medium none;"&gt;&lt;img alt="Piecon" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/piecon.jpg" title="Piecon" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 94&lt;/sup&gt;&lt;br /&gt;
&lt;a href="https://github.com/makeable/Notificon"&gt;Notificon: Favicon Notifications and Alerts&lt;/a&gt;&lt;br /&gt;
&lt;i&gt;&lt;/i&gt;Matt Williams’ &lt;i&gt;Notificon&lt;/i&gt; is a JavaScript library for creating favicon alerts and notifications. Instead of having to create a number of favicons and serving them to the client, you can specify a label and a favicon (the default being the current favicon), and it will generate a favicon notification for you. The script currently works with Chrome 6+, Firefox 2+ and Opera, but it’s a nice little add-on for browsers that support it.&lt;br /&gt;
&lt;a href="http://viget.com/inspire/jquery-stick-em"&gt;jQuery Stick ‘em: Make Content Sticky on Scroll, to a Point&lt;/a&gt;&lt;br /&gt;
A problem: some of the images in the layout are very tall, so by the time you scrolled down to the bottom of the images, you would have to scroll back up just to read the description of the images or navigation items. The solution: make the content sticky as you are scrolling. This library solves this problem.&lt;br /&gt;
&lt;a href="http://viget.com/inspire/jquery-stick-em" style="border: medium none;"&gt;&lt;img alt="jQuery Stick 'em" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/viget2.jpg" title="Stick 'em" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 95&lt;/sup&gt;&lt;br /&gt;
&lt;a href="http://countdownjs.org/"&gt;Countdown.js&lt;/a&gt;&lt;sup class="print_only"&gt; 96&lt;/sup&gt;&lt;br /&gt;
&lt;i&gt;&lt;/i&gt;Human descriptions for a span of time are often fuzzier than a computer naturally computes. For example, how long does “in 1 month” mean? We casually talk about four weeks, but in fact there is only one month in a year which is four weeks long. &lt;i&gt;Countdown.js&lt;/i&gt; tackles this problem by producing an accurate and intuitive description of timespans which are consistent as time goes on.&lt;br /&gt;
&lt;a href="https://github.com/manuelbieh/geolib"&gt;geolib&lt;/a&gt;&lt;sup class="print_only"&gt; 97&lt;/sup&gt;&lt;br /&gt;
A small library to provide some basic geo functions like distance calculation, conversion of decimal coordinates to sexagesimal and vice versa.&lt;br /&gt;
&lt;a href="https://github.com/manuelbieh/geolib" style="border: medium none;"&gt;&lt;img alt="Geolib.js" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/geolib.jpg" title="geolib.js" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 98&lt;/sup&gt;&lt;br /&gt;
&lt;a href="https://github.com/ScottHamper/Cookies"&gt;Cookies&lt;/a&gt;&lt;sup class="print_only"&gt; 99&lt;/sup&gt;&lt;br /&gt;
Cookies.js is a small client-side JavaScript library that makes managing cookies easy. It caches cookie values, making sequential reads faster, supports AMD / CommonJS loaders and is supported in Chrome, Firefox 3+, Safari 4+, Opera 10+ and Internet Explorer 6+.&lt;br /&gt;
&lt;a href="http://www.ravelrumba.com/blog/firstimpression-js-library-detecting-new-visitors/"&gt;firstImpression.js&lt;/a&gt;&lt;br /&gt;
firstImpression.js is a micro-library (1 Kb minified) that answers the simple question, “Has this user visited this site before?” The detection doesn’t require much logic, so the majority of the code is just a plain JavaScript port of the popular &lt;a href="https://github.com/carhartl/jquery-cookie"&gt;jquery.cookie&lt;/a&gt;&lt;sup class="print_only"&gt; 100&lt;/sup&gt; plugin.&lt;br /&gt;
&lt;a href="http://lab.rog.ie/chirp/"&gt;Chirp.js: Tweets on Your Website&lt;/a&gt;&lt;br /&gt;
A lightweight templating JavaScript library that enables you to display tweets on your website. Client-side caching is available; and you can set if you’d like to show retweets and replies, too.&lt;br /&gt;
&lt;a href="http://lab.rog.ie/chirp/" style="border: medium none;"&gt;&lt;img alt="Chirp.js: Tweets on your website" src="http://media.smashingmagazine.com/wp-content/uploads/2012/08/chirp-js.png" title="Chirp.js" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 101&lt;/sup&gt;&lt;br /&gt;
&lt;a href="http://monkeecreate.github.com/jquery.simpleWeather/"&gt;simpleWeather jQuery Plugin&lt;/a&gt;&lt;sup class="print_only"&gt; 102&lt;/sup&gt;&lt;br /&gt;
A simple jQuery plugin to display the weather information for any location. The data is pulled from the public Yahoo! Weather feed via the YQL API.&lt;br /&gt;
&lt;a href="http://gildas-lormeau.github.com/zip.js/"&gt;zip.js&lt;/a&gt;&lt;br /&gt;
&lt;i&gt;&lt;/i&gt;A JavaScript library to zip and unzip files. &lt;i&gt;zip.js&lt;/i&gt; provides a low-level API for writing and reading large zip files (up to 4GB with File Writer API). Works with Chrome, Firefox, Safari 6 and (unfortunately) Internet Explorer 10+. With Safari 5 and IE9, you must disable Web Workers and use a &lt;a href="https://bitbucket.org/lindenlab/llsd/raw/7d2646cd3f9b/js/typedarray.js"&gt;Typed Array polyfill&lt;/a&gt;.&lt;br /&gt;
&lt;a href="http://stringjs.com/"&gt;string.js&lt;/a&gt;&lt;sup class="print_only"&gt; 103&lt;/sup&gt;&lt;br /&gt;
&lt;i&gt;&lt;/i&gt;A library that provides extra String methods to normalize text strings and manipulate them.&lt;br /&gt;
&lt;h3&gt;
Images, Maps, Graphs and Visualization Libraries&lt;/h3&gt;
&lt;a href="http://jvectormap.com/"&gt;jVectorMap&lt;/a&gt;&lt;sup class="print_only"&gt; 104&lt;/sup&gt;&lt;br /&gt;
jVectorMap is a jQuery plugin that renders SVG and VML vector maps in browsers ranging from the ancient Internet Explorer 6 to modern browsers. jVectorMap uses JavaScript, CSS, HTML, SVG or VML, and no Flash or any other proprietary browser plugin is required.&lt;br /&gt;
&lt;a href="http://jvectormap.com/" style="border: medium none;"&gt;&lt;img alt="JavaScript Library" class="alignnone size-full wp-image-121614" src="http://media.smashingmagazine.com/wp-content/uploads/2012/08/js7.png" title="js7" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 105&lt;/sup&gt;&lt;br /&gt;
&lt;a href="http://www.kalyani.com/2010/10/subway-map-visualization-jquery-plugin/"&gt;Subway Map Visualization jQuery Plugin&lt;/a&gt;&lt;br /&gt;
If you often deal with government projects, university departments or any websites of sophisticated organizations, every now and again you’ll be asked to design a nice visualization that would explain the various divisions, structures and internal hierarchy of those organizations. Where do you start? Well, creating a Subway Map-alike visualization is an option worth considering.&lt;br /&gt;
&lt;a href="http://www.kalyani.com/2010/10/subway-map-visualization-jquery-plugin/" style="border: medium none;"&gt;&lt;img alt="JavaScript Library" class="alignnone size-full wp-image-121589" src="http://media.smashingmagazine.com/wp-content/uploads/2012/08/nl-12.jpg" title="nl-12" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 106&lt;/sup&gt;&lt;br /&gt;
&lt;a href="http://hpneo.github.com/gmaps/"&gt;GMaps.js&lt;/a&gt;&lt;sup class="print_only"&gt; 107&lt;/sup&gt;&lt;br /&gt;
This library allows you to easily use Google Maps in your projects. Extensive documentation or large amount of code aren’t required anymore. You might want to check out &lt;a href="http://gmap3.net/"&gt;Gmap3 jQuery plugin&lt;/a&gt;&lt;sup class="print_only"&gt; 108&lt;/sup&gt; as well.&lt;br /&gt;
&lt;a href="http://hpneo.github.com/gmaps/" style="border: medium none;"&gt;&lt;img alt="GMaps.js" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/gmaps.jpg" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 109&lt;/sup&gt;&lt;br /&gt;
&lt;a href="http://leaflet.cloudmade.com/"&gt;Leaflet: Open-Source Interactive Maps With JavaScript&lt;/a&gt;&lt;sup class="print_only"&gt; 110&lt;/sup&gt;&lt;br /&gt;
A library for creating tile-based interactive maps for desktop and mobile browsers. An easy-to-use API is available, and the tool emphasizes usability, performance, flexibility and excellent browser support. The library offers a variety of map layers, including tiles, markers, pop-ups, image overlays and GeoJSON. It supports panning on both mobile and desktop browsers, double-tap zoom on mobile browsers (plus multi-touch zoom on iOS) and more. On iOS, hardware acceleration is enabled, and Leaflet has a modular structure that lets you reduce the size of the library to make it even faster. The project is open source and available for further development and forking on GitHub.&lt;br /&gt;
&lt;a href="http://leaflet.cloudmade.com/" style="border: medium none;"&gt;&lt;img alt="JavaScript Library" class="alignnone size-full wp-image-121594" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/leaflet.jpg" title="nl-17" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 111&lt;/sup&gt;&lt;br /&gt;
&lt;a href="http://twostepmedia.co.uk/svgeezy/"&gt;SVGeezy: a JavaScript plugin for SVG fallbacks&lt;/a&gt;&lt;sup class="print_only"&gt; 112&lt;/sup&gt;&lt;br /&gt;
A JavaScript library which detects SVG images on your website and automatically “looks” for a standard image fallback for those older, less capable browsers. Created by  Ben Howdle and Jack Smith.&lt;br /&gt;
&lt;a href="http://twostepmedia.co.uk/svgeezy/" style="border: medium none;"&gt;&lt;img alt="SVGeezy - a JS plugin for SVG fallbacks" src="http://media.smashingmagazine.com/wp-content/uploads/2012/08/svg.png" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 113&lt;/sup&gt;&lt;br /&gt;
&lt;a href="http://retinajs.com/"&gt;Retina.js&lt;/a&gt;&lt;sup class="print_only"&gt; 114&lt;/sup&gt;&lt;br /&gt;
A script that checks each image on your website, when it’s loaded by a user, and replaces low-resolution image with their high-resolution equivalent, if available. It’s assumed that you use Apple’s high resolution modifier (&lt;code&gt;@2x&lt;/code&gt;) to designate high resolution versions of images.&lt;br /&gt;
&lt;a href="http://www.justgage.com/"&gt;JustGage&lt;/a&gt;&lt;sup class="print_only"&gt; 115&lt;/sup&gt;&lt;br /&gt;
A JavaScript library for generating and animating gauges. Based on Raphaël library for vector drawing, it’s resolution-independent and works in all modern browsers.&lt;br /&gt;
&lt;a href="http://www.justgage.com/" style="border: medium none;"&gt;&lt;img alt="JustGage" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/gauge.gif" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 116&lt;/sup&gt;&lt;br /&gt;
&lt;a href="http://arborjs.org/"&gt;arbor.js&lt;/a&gt;&lt;sup class="print_only"&gt; 117&lt;/sup&gt;&lt;br /&gt;
A graph visualization library for building trees with connected nodes of data. Arbor.js is essentially a layout algorithm with abstractions for graph organization and screen refresh handling.&lt;br /&gt;
&lt;a href="http://arborjs.org/" style="border: medium none;"&gt;&lt;img alt="Arbor.js" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/atlas.gif" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 118&lt;/sup&gt;&lt;br /&gt;
&lt;a href="http://timeline.verite.co/"&gt;Timeline: Generate Timelines To Visualize Data&lt;/a&gt;&lt;sup class="print_only"&gt; 119&lt;/sup&gt;&lt;br /&gt;
This library is supposed to pull in media from different sources. It has built-in support for pulling in data from Twitter, YouTube, Flickr, Vimeo, Google Maps and SoundCloud—and more will be included in the near future. You can easily fill in data from a Google spreadsheet, or use a more detailed method such as JSON to create your time-line. You can also host it on your website by using the Timeline jQuery plugin. The library is available on &lt;a href="https://github.com/VeriteCo/Timeline"&gt;GitHub&lt;/a&gt;&lt;sup class="print_only"&gt; 120&lt;/sup&gt;, or as &lt;a href="http://wordpress.org/extend/plugins/timeline-verite-shortcode/"&gt;WordPress plugin&lt;/a&gt;&lt;sup class="print_only"&gt; 121&lt;/sup&gt;.&lt;br /&gt;
&lt;a href="http://timeline.verite.co/" style="border: medium none;"&gt;&lt;img alt="JavaScript Library" class="alignnone size-full wp-image-121580" src="http://media.smashingmagazine.com/wp-content/uploads/2012/08/nl-61.jpg" title="nl-6" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 122&lt;/sup&gt;&lt;br /&gt;
&lt;a href="https://github.com/filamentgroup/unicon"&gt;Unicon&lt;/a&gt;&lt;br /&gt;
Unicon is a Grunt.js task that makes it easy to manage icons and background images for all devices, preferring HD (retina) SVG icons but also provides fallback support for standard definition browsers, and old browsers alike. From a CSS perspective, it’s easy to use, as it generates a class referencing each icon, and doesn’t use CSS sprites.&lt;br /&gt;
&lt;a href="https://github.com/adamdbradley/foresight.js"&gt;Foresight.js&lt;/a&gt;&lt;br /&gt;
This device recognition library, gives websites the ability to gauge the users device capabilities before the image is requested from the server. Judging display resolution and network speed, it customizes the img src attribute to optimize the websites image resolution to the individual users hardware.&lt;br /&gt;
&lt;a href="http://thecodeplayer.com/walkthrough/magnifying-glass-for-images-using-jquery-and-css3"&gt;A Magnifying Glass With CSS3 And jQuery&lt;/a&gt;&lt;sup class="print_only"&gt; 123&lt;/sup&gt;&lt;br /&gt;
This technique achieves an aesthetically pleasing visual effect. The CSS3 &lt;code&gt;box-shadow&lt;/code&gt; and &lt;code&gt;border-radius&lt;/code&gt; properties are used to create the magnifying glass itself, while jQuery is used to detect the cursor coordinates and mouse movements and present the larger image. And when your cursor moves off the image, the magnifying glass elegantly fades away. The included tutorial makes it very easy to learn and understand how to achieve this effect. The technique includes both a small and a large image in the markup, so optimizing the technique to load a larger image on demand might be a good idea.&lt;br /&gt;
&lt;a href="http://media.smashingmagazine.com/wp-content/uploads/2012/08/nl-2.jpg" style="border: medium none;"&gt;&lt;img alt="JavaScript Library" class="alignnone size-full wp-image-121574" src="http://media.smashingmagazine.com/wp-content/uploads/2012/08/nl-2.jpg" title="nl-2" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://code.shutterstock.com/rickshaw/"&gt;Rickshaw&lt;/a&gt;&lt;sup class="print_only"&gt; 124&lt;/sup&gt;&lt;br /&gt;
This free and open source JavaScript toolkit provides the elements which you need to create interactive graphs, such as renderers, legends, hovers and range selectors. Rickshaw is based on D3, graphs are drawn with standard SVG and styled with CSS.&lt;br /&gt;
&lt;a href="http://code.shutterstock.com/rickshaw/" style="border: medium none;"&gt;&lt;img alt="Rickshaw" src="http://media.smashingmagazine.com/wp-content/uploads/2012/08/js-libraries-111.jpg" title="Rickshaw" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 125&lt;/sup&gt;&lt;br /&gt;
&lt;a href="http://www.flotcharts.org/"&gt;Flot: Plotting for jQuery&lt;/a&gt;&lt;sup class="print_only"&gt; 126&lt;/sup&gt;&lt;br /&gt;
A JavaScript plotting library for jQuery, supports Internet Explorer 6+, Chrome, Firefox 2+, Safari 3+ and Opera 9.5+. You can use different types of graphs, use multiple axes, annotate a chart, update graphs with AJAX, provide support for zooming and interaction with the data points, use stacked charts, theresholding the data, apply pie charts and plot prerendered images.&lt;br /&gt;
&lt;a href="http://www.flotcharts.org/" style="border: medium none;"&gt;&lt;img alt="Flot.js" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/flotjs.jpg" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 127&lt;/sup&gt;&lt;br /&gt;
&lt;a href="http://stoicloofah.github.com/chronoline.js/"&gt;Chronoline.js&lt;/a&gt;&lt;br /&gt;
&lt;i&gt;&lt;/i&gt;&lt;i&gt;Chronoline.js&lt;/i&gt; is a library that allows you to create a chronology time-line out of events on a horizontal timescale. From a list of dates and events, it can generate a graphical representation of schedules, historical events, deadlines, and more.&lt;br /&gt;
&lt;a href="http://stoicloofah.github.com/chronoline.js/" style="border: medium none;"&gt;&lt;img alt="JavaScript Library" class="alignnone size-full wp-image-121620" src="http://media.smashingmagazine.com/wp-content/uploads/2012/08/js13.png" title="js13" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://square.github.com/cubism/"&gt;Cubism&lt;/a&gt;&lt;sup class="print_only"&gt; 128&lt;/sup&gt;&lt;br /&gt;
This D3 plugin helps you to visualize time series and construct better real-time dashboards, pulling data from Graphite, Cube and other sources. Cubism scales and reduces server load by pulling only the most recent values. Cubism can scale easily to hundreds of metrics updating every ten seconds. Cubism’s horizon charts allow you to see many more metrics at-a-glance space than standard area charts.&lt;br /&gt;
&lt;a href="http://square.github.com/cubism/" style="border: medium none;"&gt;&lt;img alt="Cubism" src="http://media.smashingmagazine.com/wp-content/uploads/2012/08/js-libraries-112.jpg" title="Cubism" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 129&lt;/sup&gt;&lt;br /&gt;
&lt;a href="http://www.humblesoftware.com/envision"&gt;Envision.js&lt;/a&gt;&lt;br /&gt;
An alternative library for creating fast, dynamic and interactive HTML5 visualizations.&lt;br /&gt;
&lt;a href="http://www.humblesoftware.com/envision" style="border: medium none;"&gt;&lt;img alt="JavaScript Library" class="alignnone size-full wp-image-121616" src="http://media.smashingmagazine.com/wp-content/uploads/2012/08/js9.png" title="js9" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 130&lt;/sup&gt;&lt;br /&gt;
&lt;a href="http://selection.datavisualization.ch/"&gt;Data Visualization JavaScript Libraries&lt;/a&gt;&lt;br /&gt;
A growing, curated collection of data visualization JavaScript libraries that make it easier to create meaningful and beautiful data visualizations. If you haven’t one a useful data visualization library in the list above, you’ll definitely find the right one in this overview.&lt;br /&gt;
&lt;a href="http://selection.datavisualization.ch/" style="border: medium none;"&gt;&lt;img alt="Data Visualization JavaScript Libraries" src="http://media.smashingmagazine.com/wp-content/uploads/2012/08/dataviz.png" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 131&lt;/sup&gt;&lt;br /&gt;
&lt;h3&gt;
Last Click&lt;/h3&gt;
&lt;a href="http://jqfundamentals.com/"&gt;jQuery Fundamentals&lt;/a&gt;&lt;sup class="print_only"&gt; 132&lt;/sup&gt;&lt;br /&gt;
This HTML book is designed to get you comfortable working through common problems you’ll be called upon to solve using jQuery. You can read the content and try the various interactive examples. Each chapter will cover a concept and give you a chance to try example code related to the concept. Written by Rebecca Murphey and recently updated by her and the rest of the gang at Bocoup.&lt;br /&gt;
&lt;a href="http://jqfundamentals.com/" style="border: medium none;"&gt;&lt;img alt="JavaScript Library" class="alignnone size-full wp-image-121578" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/jquery-fundamentals.gif" title="JavaScript library" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 133&lt;/sup&gt;&lt;br /&gt;
&lt;a href="http://shichuan.github.com/javascript-patterns/"&gt;JavaScript Patterns Collection&lt;/a&gt;&lt;br /&gt;
A JavaScript pattern and anti-pattern collection that covers function patterns, jQuery patterns, jQuery plugin patterns, design patterns, general patterns, literals and constructor patterns, object creation patterns, code reuse patterns, DOM and browser patterns.&lt;br /&gt;
&lt;a href="http://shichuan.github.com/javascript-patterns/" style="border: medium none;"&gt;&lt;img alt="JavaScript Library" class="alignnone size-full wp-image-121578" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/js-patterns.gif" title="JavaScript library" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 134&lt;/sup&gt;&lt;br /&gt;
&lt;a href="http://bonsaiden.github.com/JavaScript-Garden/"&gt;JavaScript Garden&lt;/a&gt;&lt;sup class="print_only"&gt; 135&lt;/sup&gt;&lt;br /&gt;
A growing collection of documentation about the most quirky parts of the JavaScript programming language. It gives advice to avoid common mistakes and subtle bugs, as well as performance issues and bad practices, that non-expert JavaScript programmers may encounter on their endeavors into the depths of the language.&lt;br /&gt;
&lt;a href="http://bonsaiden.github.com/JavaScript-Garden/" style="border: medium none;"&gt;&lt;img alt="JavaScript Library" class="alignnone size-full wp-image-121578" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/javascript-garden.gif" title="JavaScript library" /&gt;

&lt;/a&gt;&lt;br /&gt;
&lt;h3&gt;
&lt;a href="http://bonsaiden.github.com/JavaScript-Garden/" style="border: medium none;"&gt;Text Manipulation Libraries&lt;/a&gt;&lt;/h3&gt;
&lt;a href="http://bonsaiden.github.com/JavaScript-Garden/" style="border: medium none;"&gt;
&lt;/a&gt;&lt;a href="http://bonsaiden.github.com/JavaScript-Garden/" style="border: medium none;"&gt;&lt;/a&gt;&lt;a href="http://prismjs.com/"&gt;Prism&lt;/a&gt;&lt;sup class="print_only"&gt; 22&lt;/sup&gt;&lt;br /&gt;A lightweight and extensible syntax highlighter. There are no Prism-specific markup or class names, you can use the standard markup. Prism supports parallelism with Web workers, if available. All styling is done through CSS, with sensible class names like &lt;code&gt;.comment&lt;/code&gt;, &lt;code&gt;.string&lt;/code&gt;, &lt;code&gt;.property&lt;/code&gt; etc. The overall core core size is only 1.5Kb (minified and gzipped).&lt;br /&gt;

&lt;div class="showcase"&gt;
&lt;a href="http://prismjs.com/" style="border: medium none;"&gt;&lt;img alt="Prism" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/prism.gif" title="Prism" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 23&lt;/sup&gt;&lt;/div&gt;
&lt;a href="http://projects.jga.me/toc/"&gt;TOC jQuery Plugin: Generate Tables Of Contents&lt;/a&gt;&lt;br /&gt;This library automatically generates and guides the user through a table of contents on a page. It’s customizable and is able to automatically highlight a current section of the document. The plugin is also very lightweight, can be used multiple times on a page, and even includes a smooth scrolling functionality for the correct section. The plugin is developed by Greg Allen and is currently available in beta. You might want to check out &lt;a href="http://gregfranko.com/jquery.tocify.js/"&gt;Tocify jQuery plugin&lt;/a&gt; as well.&lt;br /&gt;

&lt;a href="http://projects.jga.me/toc/" style="border: medium none;"&gt;&lt;img alt="JavaScript Library" class="alignnone size-full wp-image-121584" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/toc.gif" title="JavaScript Library" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 24&lt;/sup&gt;&lt;br /&gt;

&lt;a href="http://johnpolacek.github.com/MagicNav.js/"&gt;MagicNav: Generates Links for The FAQ&lt;/a&gt;&lt;br /&gt;If you want to create a quick navigation for your FAQ page, you can use this jQuery plugin for generating navigation links dynamically from page elements.&lt;br /&gt;

&lt;a href="https://github.com/tcorral/Cutter.js"&gt;Cutter.js&lt;/a&gt;&lt;br /&gt;This library solves the problem when cutting content by a number of words is required but you don’t want to change the markup. It simply cuts the content to the required length, while allowing the user to see the full content again.&lt;br /&gt;

&lt;a href="https://github.com/rviscomi/trunk8"&gt;Trunk8&lt;/a&gt;&lt;sup class="print_only"&gt; 25&lt;/sup&gt;&lt;br /&gt;Trunk8 is a text truncation jQuery plugin that cuts off just enough text from a large block of text to prevent it from spilling over. While conventional truncation just limits the character length, this library is able to measure the content area for spill-over and chooses the text that best fits into a given space.&lt;br /&gt;

&lt;a href="https://github.com/padolsey/relevancy.js"&gt;Relevancy.js&lt;/a&gt;&lt;br /&gt;This library allows you to sort an array of items based on their relevancy. This script is attempting to implement basic partial matching which so far has not been successfully implemented. It assigns strings to their respective elements.&lt;br /&gt;

&lt;h3&gt;
Manipulating Tables and Lists&lt;/h3&gt;
&lt;a href="http://warpech.github.com/jquery-handsontable/"&gt;Handsontables: Excel-Like Tables For The Web&lt;/a&gt;&lt;br /&gt;This jQuery library allows you to use auto-expanding and auto-complete as well as add new rows and columns. It also includes a legend, scrolling (so as your table grows, it won’t take up your entire page and become unwieldy), context menus, conditional formatting and other features. You can even set it to track changes made to the table. And, all the data you enter in Handsontable can be copied and pasted to Excel, Google Spreadsheet, or LibreOffice.&lt;br /&gt;

&lt;a href="http://warpech.github.com/jquery-handsontable/" style="border: medium none;"&gt;&lt;img alt="JavaScript Library" class="alignnone size-full wp-image-121575" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/handsontable.jpg" title="nl-3" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 26&lt;/sup&gt;&lt;br /&gt;

&lt;a href="http://listjs.com/"&gt;List.js&lt;/a&gt;&lt;sup class="print_only"&gt; 27&lt;/sup&gt;&lt;br /&gt;A cross-browser native JavaScript library that transforms HTML lists into flexible content that you can easily edit. It makes your list easily searchable and sortable. A template-driven concept lets you simply add and edit items.&lt;br /&gt;

&lt;div class="showcase"&gt;
&lt;a href="http://listjs.com/" style="border: medium none;"&gt;&lt;img alt="List.js" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/listjs.jpg" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 28&lt;/sup&gt;&lt;/div&gt;
&lt;a href="http://farhadi.ir/projects/html5sortable/"&gt;Create Nested Sortable Lists With jQuery&lt;/a&gt;&lt;sup class="print_only"&gt; 29&lt;/sup&gt;&lt;br /&gt;This plugin lets you create a sortable list where your users can drag and drop list items into any configuration they choose. You can set various attributes, such as the maximum number of nested levels, as well as setting custom methods (including To hierarchy, To array, and Serialize). As an alternative, there’s also the &lt;a href="http://farhadi.ir/projects/html5sortable/"&gt;HTML5 Sortable&lt;/a&gt;&lt;sup class="print_only"&gt; 30&lt;/sup&gt; plugin, which uses HTML5 and jQuery for a similar functionality.&lt;br /&gt;

&lt;a href="http://farhadi.ir/projects/html5sortable/" style="border: medium none;"&gt;&lt;img alt="JavaScript Library" class="alignnone size-full wp-image-121573" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/html5sortable.jpg" title="nl-1" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 31&lt;/sup&gt;&lt;br /&gt;

&lt;a href="http://rjackson.github.com/pivot.js/"&gt;Pivot.js&lt;/a&gt;&lt;br /&gt;With Pivot you can easily summarize large data sets on the fly. The library lets you create customizable table views from your browser. The results of pivot-table tools (which automatically sort, count, total or give the average) will be displayed as an HTML table pivoting from the input data (CSV or JSON).&lt;br /&gt;

&lt;div class="showcase"&gt;
&lt;a href="http://rjackson.github.com/pivot.js/" style="border: medium none;"&gt;&lt;img alt="Pivot.js" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/pivotjs.jpg" title="Pivot.js" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a href="http://square.github.com/crossfilter/"&gt;Crossfilter&lt;/a&gt;&lt;sup class="print_only"&gt; 32&lt;/sup&gt;&lt;br /&gt;Crossfilter is a JavaScript library which supports exploring large multivariate datasets in the browser. It enables fast (&amp;lt;30ms) interaction with coordinated views, even with large data sets containing more than a million records. It was built to power analytics for Square Register and allows merchants to slice and dice their payment history fluidly. By using sorted indexes, the library speeds up incremental filtering and thereby increases the performance of live histograms and top-K lists.&lt;br /&gt;

&lt;div class="showcase"&gt;
&lt;a href="http://square.github.com/crossfilter/" style="border: medium none;"&gt;&lt;img alt="Crossfilter" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/crossfilter.jpg" title="Crossfilter" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 33&lt;/sup&gt;&lt;/div&gt;
&lt;a href="http://code.google.com/p/jquerycsvtotable/"&gt;jQuery CSV to Table&lt;/a&gt;&lt;sup class="print_only"&gt; 34&lt;/sup&gt;&lt;br /&gt;This library reads in comma separated values (CSV) or tab separated values (TSV) data and generates an HTML table.&lt;br /&gt;

&lt;a href="http://code.google.com/p/jquerycsvtotable/" style="border: medium none;"&gt;&lt;img alt="jQuery CSV to Table" src="http://media.smashingmagazine.com/wp-content/uploads/2012/08/csvtable.png" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 35&lt;/sup&gt;&lt;br /&gt;

&lt;a href="http://archan937.github.com/csonv.js/"&gt;Csonv.js&lt;/a&gt;&lt;br /&gt;Paul Engel has released a tiny library to fetch relational CSV data client-side (JSON). When using CSV, one file represents one entity; the librarycan also nest relational data within the resulting objects as if you are joining SQL tables. &lt;br /&gt;

&lt;a href="http://datatables.net/"&gt;DataTables jQuery Plug-in&lt;/a&gt;&lt;sup class="print_only"&gt; 36&lt;/sup&gt;&lt;br /&gt;The library can display data from different sources, be it DOM, a JavaScript array, or a server-side file with JSON formatting. Among other features, the library provides  pagination, on-the-fly filtering, and multi-column sorting with data type detection. And the features that DataTables provides can be enhanced by many freely available plug-ins: e.g. with row grouping, column filtering, column resizer, etc. The library weighs 68Kb minified, and 20Kb gzip’d. Open source, and released under GPL and BSD.&lt;br /&gt;

&lt;a href="http://datatables.net/" style="border: medium none;"&gt;&lt;img alt="JavaScript Library" class="alignnone size-full wp-image-121585" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/datatables.jpg" title="nl-11" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 37&lt;/sup&gt;&lt;br /&gt;

&lt;h3&gt;
Useful JavaScript Tools for Web Development&lt;/h3&gt;
&lt;a href="http://yeoman.io/"&gt;Yeoman&lt;/a&gt;&lt;sup class="print_only"&gt; 38&lt;/sup&gt;&lt;br /&gt;Yeoman is a set of tools and libraries that helps to scaffold new projects, automatically compiles CoffeeScript &amp;amp; Compass, runs yours scripts against jshint for proper language coverage and optimizes all your images. It effectively uses plugins like NodeJS, Compass, Grunt and PhantomJS and actually requires the installation of Node 0.8.x.&lt;br /&gt;

&lt;a href="http://yeoman.io/" style="border: medium none;"&gt;&lt;img alt="JavaScript Library" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/Yeoman.png" title="Yeoman" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 39&lt;/sup&gt;&lt;br /&gt;

&lt;a href="http://gruntjs.com/"&gt;Grunt.js: Task-Based Command Line Tool&lt;/a&gt;&lt;sup class="print_only"&gt; 40&lt;/sup&gt;&lt;br /&gt;Grunt is a task-based command line build tool for JavaScript projects. It has a dozen of predefined tasks built-in already: file concatenation, project scaffolding  from a predefined template, validation with JSHint, minifcation with UglifyJS, qUnit tests, server start, running unit tests with nodeunit and running watched files.&lt;br /&gt;

&lt;a href="http://gruntjs.com/" style="border: medium none;"&gt;&lt;img alt="Grunt.js: Task-Based Command Line Tool" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/grunt-cmd1.jpg" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 41&lt;/sup&gt;&lt;br /&gt;

&lt;a href="http://imsky.github.com/holder/"&gt;Holder.js&lt;/a&gt;&lt;sup class="print_only"&gt; 42&lt;/sup&gt;&lt;br /&gt;A client-side image placeholder library to render placeholders entirely in browser. It works both online and offline, and offers a chainable API to style and create placeholders with ease. You can use Holder in different areas on different images with custom themes. Since it extends its default settings with the settings you provide, you only have to include those settings which you want changed.&lt;br /&gt;

&lt;div class="showcase"&gt;
&lt;a href="http://imsky.github.com/holder/" style="border: medium none;"&gt;&lt;img alt="Holder.js" src="http://media.smashingmagazine.com/wp-content/uploads/2012/08/js-libraries-107.jpg" title="Holder.js" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 43&lt;/sup&gt;&lt;/div&gt;
&lt;a href="http://thinkpixellab.com/pxloader/"&gt;PxLoader&lt;/a&gt;&lt;sup class="print_only"&gt; 44&lt;/sup&gt;&lt;br /&gt;A JavaScript library that makes it easier to download images, sound files or any other file needed before taking an action on your website. The script lets you set up a preloader for HTML5 games and websites. You can monitor download status and even prioritize downloads in tagged groups.&lt;br /&gt;

&lt;div class="showcase"&gt;
&lt;a href="http://thinkpixellab.com/pxloader/" style="border: medium none;"&gt;&lt;img alt="PxLoader" src="http://media.smashingmagazine.com/wp-content/uploads/2012/08/js-01-110.jpg" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 45&lt;/sup&gt;&lt;/div&gt;
&lt;a href="http://widgets.better2web.com/loader/"&gt;Percentage Loader&lt;/a&gt;&lt;sup class="print_only"&gt; 46&lt;/sup&gt;&lt;br /&gt;With this jQuery plugin the common horizontal progress bar is displayed differently. The script uses HTML5 canvas and data URI encoding (vector graphics) to allow for visually appealing and variably sizable graphics. Also, it can be used to display feedback during long-running tasks.&lt;br /&gt;

&lt;div class="showcase"&gt;
&lt;a href="http://widgets.better2web.com/loader/" style="border: medium none;"&gt;&lt;img alt="Percentage Loader" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/percentage-loader1.jpg" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 47&lt;/sup&gt;&lt;/div&gt;
&lt;a href="https://github.com/23/resumable.js"&gt;Resumable.js&lt;/a&gt;&lt;br /&gt;The library is designed to introduce fault-tolerance into the upload of large files through HTTP. It thus provides multiple, simultaneous and resumable uploads through the HTML5 File API. That means, losing the networks connection doesn’t require a completely new upload. Users can also manage their uploads without loss of data. However, due to the reliance on the HTML5 File API, support is currently limited to Firefox 4+ and Chrome 11+.&lt;br /&gt;

&lt;a href="https://github.com/balupton/History.js/"&gt;History.js&lt;/a&gt;&lt;br /&gt;The library gracefully supports the HTML5 History/State APIs (&lt;code&gt;pushState&lt;/code&gt;, &lt;code&gt;replaceState&lt;/code&gt;, &lt;code&gt;onPopState&lt;/code&gt;) in all browsers. Including continued support for data, titles, replaceState. Supports jQuery, MooTools and Prototype. You can modify the URL directly, without needing to use hashes.&lt;br /&gt;

&lt;a href="https://github.com/tombonner/jurlp"&gt;Jurlp&lt;/a&gt;&lt;sup class="print_only"&gt; 48&lt;/sup&gt;&lt;br /&gt;Jurlp is a jQuery URL parser  plugin for parsing, manipulating, filtering and monitoring URLs in &lt;code&gt;href&lt;/code&gt; and &lt;code&gt;src&lt;/code&gt; attributes within arbitrary elements, as well as creating anchor elements from URLs found in HTML or text.&lt;br /&gt;

&lt;div class="showcase"&gt;
&lt;a href="https://github.com/tombonner/jurlp" style="border: medium none;"&gt;&lt;img alt="Jurlp" src="http://media.smashingmagazine.com/wp-content/uploads/2012/08/js-01-126.jpg" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 49&lt;/sup&gt;&lt;/div&gt;
&lt;a href="http://medialize.github.com/URI.js/"&gt;URI.js&lt;/a&gt;&lt;br /&gt;To work with URLs you could use this JavaScript library, that offers a jQuery-like API. URI.js offers simple, yet powerful ways of working with query string, has a number of URI-normalization functions and converts relative/absolute paths.&lt;br /&gt;

&lt;a href="https://github.com/jairajs89/Touchy.js"&gt;Touchy.js&lt;/a&gt;&lt;br /&gt;A JavaScript library which handles touch events without any dependencies. It’s an easy way to assign hand functionality for touchscreen devices to your website. You might want to check out &lt;a href="http://eightmedia.github.com/hammer.js/"&gt;Hammer.js&lt;/a&gt; as well.&lt;br /&gt;

&lt;div class="showcase"&gt;
&lt;a href="https://github.com/jairajs89/Touchy.js" style="border: medium none;"&gt;&lt;img alt="Touchy.js" src="http://media.smashingmagazine.com/wp-content/uploads/2012/08/js-01-105.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a href="http://gridster.net/"&gt;gridster.js&lt;/a&gt;&lt;sup class="print_only"&gt; 50&lt;/sup&gt;&lt;br /&gt;A jQuery plugin that allows building intuitive draggable layouts from elements spanning multiple columns. You can even dynamically add and remove elements from the grid. It is on par with sliced bread, or possibly better. MIT licensed. &lt;br /&gt;

&lt;a href="http://gridster.net/" style="border: medium none;"&gt;&lt;img alt="gridster.js" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/gridster.png" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 51&lt;/sup&gt;&lt;br /&gt;

&lt;a href="http://yconst.com/web/freetile/"&gt;Freetile&lt;/a&gt;&lt;sup class="print_only"&gt; 52&lt;/sup&gt;&lt;br /&gt;A jQuery plugin that enables you to organize the page content in a dynamic and responsive layout. Once applied to a container element, it  attempts to arrange its children in a layout that makes optimal use of screen space, by “packing” them in a tight arrangement.&lt;br /&gt;

&lt;a href="http://yconst.com/web/freetile/" style="border: medium none;"&gt;&lt;img alt="Freetile.js" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/arrangement.png" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 53&lt;/sup&gt;&lt;br /&gt;

&lt;a href="http://strapdownjs.com/"&gt;Strapdown.js&lt;/a&gt;&lt;sup class="print_only"&gt; 54&lt;/sup&gt;&lt;br /&gt;This tool makes it easy for you to embed a Markdown editor into your page. No server-side compilation required. The tool is cross-browser-compatible and has Github-style syntax highlighting.&lt;br /&gt;

&lt;a href="http://strapdownjs.com/" style="border: medium none;"&gt;&lt;img alt="Strapdown.js" src="http://media.smashingmagazine.com/wp-content/uploads/2012/08/strapdown.png" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 55&lt;/sup&gt;&lt;br /&gt;

&lt;a href="https://github.com/yatil/accessifyhtml5.js"&gt;accessifyhtml5.js&lt;/a&gt;&lt;br /&gt;Eric Eggert has released a practical polyfill to make HTML5 more accessible. Most modern browsers work fine with HTML5′s new semantic elements, however, they often lack the ARIA accessibility attributes that the specification demands. This small script adds those attributes to enhance accessibility of web sites.&lt;br /&gt;

&lt;div class="showcase"&gt;
&lt;a href="https://github.com/yatil/accessifyhtml5.js" style="border: medium none;"&gt;&lt;img alt="accessifyhtml5.js" src="http://media.smashingmagazine.com/wp-content/uploads/2012/08/js-01-107.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a href="http://jquerypp.com/"&gt;jQuery++&lt;/a&gt;&lt;sup class="print_only"&gt; 56&lt;/sup&gt;&lt;br /&gt;An MIT-licensed collection of useful DOM helpers such as jQuery.cookie, jQuery.formParams, jQuery.within and special events for jQuery 1.7 that provide low-level utilities for features that jQuery doesn’t support. You can download a variety of plugins you might wish to use and disregard the rest.&lt;br /&gt;

&lt;div class="showcase"&gt;
&lt;a href="http://jquerypp.com/" style="border: medium none;"&gt;&lt;img alt="jQuery++" src="http://media.smashingmagazine.com/wp-content/uploads/2012/08/js-01-117.jpg" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 57&lt;/sup&gt;&lt;/div&gt;
&lt;a href="http://twitter.github.com/hogan.js/"&gt;Hogan.js&lt;/a&gt;&lt;br /&gt;Twitter’s templating engine that lets you precompile your templates ahead of time for vanilla JavaScript. This engine was developed with Mustache test suite compatibility and performance in mind.&lt;br /&gt;

&lt;a href="http://zeptojs.com/"&gt;Zepto.js&lt;/a&gt;&lt;sup class="print_only"&gt; 58&lt;/sup&gt;&lt;br /&gt;Zepto is a lightweight JavaScript library  with a largely jQuery-compatible API. The main purpose of the library is to cover the most important jQuery functions yet have a relatively small modular library that loads and executes fast, with a familiar and versatile API. If you use jQuery, you already know how to use Zepto. You might want to check &lt;a href="http://minijs.com/"&gt;Mini.js&lt;/a&gt;&lt;sup class="print_only"&gt; 59&lt;/sup&gt; and &lt;a href="http://createjs.com/#!/CreateJS"&gt;CreateJS&lt;/a&gt;&lt;sup class="print_only"&gt; 60&lt;/sup&gt; as well if you are looking for simple and lightweight JavaScript libraries to perform very specific tasks.&lt;br /&gt;

&lt;div class="showcase"&gt;
&lt;a href="http://zeptojs.com/" style="border: medium none;"&gt;&lt;img alt="Zepto.js" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/zeptojs.gif" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 61&lt;/sup&gt;&lt;/div&gt;
&lt;a href="http://cssrefresh.frebsite.nl/"&gt;CSSrefresh&lt;/a&gt;&lt;sup class="print_only"&gt; 62&lt;/sup&gt;&lt;br /&gt;A useful small script file that immediately implements changes on your browser made to your CSS-files, by surveying the CSS files in your Web page. Saved CSS-files are executed right away.&lt;br /&gt;

&lt;div class="showcase"&gt;
&lt;a href="http://cssrefresh.frebsite.nl/" style="border: medium none;"&gt;&lt;img alt="CSSrefresh" src="http://media.smashingmagazine.com/wp-content/uploads/2012/08/js-01-102.jpg" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 63&lt;/sup&gt;&lt;/div&gt;
&lt;a href="http://badassjs.com/post/1217357060/hasjs"&gt;Has.js&lt;/a&gt;&lt;sup class="print_only"&gt; 64&lt;/sup&gt;&lt;br /&gt;Instead of browser sniffing and feature inference, this library provides a collection of self-contained tests and a unified framework using pure feature detection for whatever library consumes it. Make sure to &lt;a href="http://www.netmagazine.com/features/essential-javascript-top-five-script-loaders"&gt;consider other alternatives&lt;/a&gt;, too.&lt;br /&gt;

&lt;a href="http://www.filepicker.io/"&gt;Filepicker.io&lt;/a&gt;&lt;sup class="print_only"&gt; 65&lt;/sup&gt;&lt;br /&gt;An advanced solution for uploading files to the server as well as conversion, synchronization and integration of file uploads with services such as Facebook, Dropbox etc. A free plan is available.&lt;br /&gt;

&lt;div class="showcase"&gt;
&lt;a href="http://www.filepicker.io/" style="border: medium none;"&gt;&lt;img alt="Filepicker.io" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/filepicker-io.gif" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 66&lt;/sup&gt;&lt;/div&gt;
&lt;a href="http://xregexp.com/"&gt;XRegExp&lt;/a&gt;&lt;sup class="print_only"&gt; 67&lt;/sup&gt;&lt;br /&gt;An open source MIT licensed JavaScript library, XRegExp provides augmented, extensible regular expressions. The library provides a new syntax, flags, and methods beyond what browsers support natively. Also, take a look at &lt;a href="https://github.com/natefaubion/matches.js"&gt;Matches.js&lt;/a&gt;, an advanced pattern matching library for JavaScript.&lt;br /&gt;

&lt;div class="showcase"&gt;
&lt;a href="http://xregexp.com/" style="border: medium none;"&gt;&lt;img alt="XRegExp" src="http://media.smashingmagazine.com/wp-content/uploads/2012/08/js-01-128.jpg" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 68&lt;/sup&gt;&lt;/div&gt;
&lt;a href="http://demo.tutorialzine.com/2012/07/framewarp-jquery-plugin/"&gt;FrameWarp&lt;/a&gt;&lt;sup class="print_only"&gt; 69&lt;/sup&gt;&lt;br /&gt;This library helps you to show pages on your site with a CSS-driven transition effect. It has a helper function which compares the URL of the iframe with the address of the current page. If both the domain and the protocol match, Framewarp will try to access the DOM of the iframe and add the APU methods – one for hiding it, and another one for sending a message to the parent.&lt;br /&gt;

&lt;a href="http://ericbidelman.tumblr.com/post/14866798359/introducing-filer-js"&gt;Filer.js&lt;/a&gt;&lt;sup class="print_only"&gt; 70&lt;/sup&gt;&lt;br /&gt;Eric Bidelman released a wrapper library for the HTML5 Filesystem API. Filer.js reuses familiar UNIX commands and makes the HTML5 API more approachable for developers that have done file I/O in other languages. Repetitive operations (renaming, moving, duplicating) are easier to manage. You might want to check out &lt;a href="http://gregfranko.com/DownloadBuilder.js/"&gt;DownloadBuilder.js&lt;/a&gt;, a library that supports concatenation of local files and uses session storage to cache Ajax/JSONP requests.&lt;br /&gt;

&lt;div class="showcase"&gt;
&lt;a href="http://ericbidelman.tumblr.com/post/14866798359/introducing-filer-js" style="border: medium none;"&gt;&lt;img alt="Filer.js" src="http://media.smashingmagazine.com/wp-content/uploads/2012/08/js-01-120.jpg" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 71&lt;/sup&gt;&lt;/div&gt;
&lt;a href="https://github.com/d0ugal/locache"&gt;Client Side Caching For JavaScript&lt;/a&gt;&lt;sup class="print_only"&gt; 72&lt;/sup&gt;&lt;br /&gt;Server caching is useful for quick response times, but sometimes, especially when you are developing a Web application, you migh need to cache objects client-side rather than server-side. Maybe you need to cache something for offline use, or for reuse later. That’s where &lt;a href="https://github.com/d0ugal/locache"&gt;locache.js&lt;/a&gt;&lt;sup class="print_only"&gt; 73&lt;/sup&gt; comes in. It’s a JavaScript caching framework for client side caching in the browser using HTML5 local storage. The library has a memcache-similar API, no dependencies and is very small. And the best part: locache gracefully degrades when the browser doesn’t support local storage. So users with IE6 and IE7 will not get any errors, but as developers say, “caching attempts will be silently dropped and lookups will always appear to be a cache miss.” You can provide an expiration time for cached objects as well.&lt;br /&gt;

&lt;a href="https://github.com/d0ugal/locache" style="border: medium none;"&gt;&lt;img alt="JavaScript Library" class="alignnone size-full wp-image-121581" src="http://media.smashingmagazine.com/wp-content/uploads/2012/08/nl-7.jpg" title="nl-7" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 74&lt;/sup&gt;&lt;br /&gt;

&lt;h3&gt;
Last Click&lt;/h3&gt;
&lt;a href="http://responsiveviewport.com/"&gt;ReView.js&lt;/a&gt;&lt;sup class="print_only"&gt; 75&lt;/sup&gt;&lt;br /&gt;This library provides a responsive Web design viewing choice. Users can either “opt-in” or “opt-out” of responsive design states and keep the persistent view preference for each session. Developed in pure JavaScript according to the principles of core (mobile-) first progressive enhancement. You might want to check &lt;a href="https://github.com/clintonbeattie/flexinavcalc"&gt;FlexiNavCalc&lt;/a&gt;&lt;sup class="print_only"&gt; 76&lt;/sup&gt; as well, a responsive navigation library that calculates navigation item widths in percentages to ensure that the navigation holds the layout until a break-point is executed.&lt;br /&gt;

&lt;a href="http://responsiveviewport.com/" style="border: medium none;"&gt;&lt;img alt="JavaScript Library" class="alignnone size-full wp-image-121578" src="http://media.smashingmagazine.com/wp-content/uploads/2012/09/review-js.gif" title="JavaScript library" /&gt;&lt;/a&gt;&lt;sup class="print_only"&gt; 77&lt;/sup&gt;&lt;br /&gt;

&lt;a href="http://www.pockethotline.com/"&gt;A Hotline For All Your JavaScript Problems&lt;/a&gt;&lt;sup class="print_only"&gt; 78&lt;/sup&gt;&lt;br /&gt;Do you feel like giving up? Nothing makes sense anymore? Your problems seem insurmountable? Wouldn’t it be great if you could talk to someone who cares and knows your woes? Why don’t you give the friendly, supporting folk at &lt;a href="https://javascript.pockethotline.com/"&gt;JS Hotline&lt;/a&gt;&lt;sup class="print_only"&gt; 79&lt;/sup&gt; a call when your JavaScript wisdom is at an end? Garann Means created JS Hotline as a helpline for people who are stuck with a JavaScript problem. This call-service powered by &lt;a href="http://www.pockethotline.com/"&gt;Pocket Hotline&lt;/a&gt;&lt;sup class="print_only"&gt; 80&lt;/sup&gt; promises professional help to people who need advice concerning JavaScript. They’ll talk you off the ledge when you just can’t make it work. And it won’t cost you anything but a smile. &lt;br /&gt;

&lt;a href="http://www.pockethotline.com/" style="border: medium none;"&gt;&lt;img alt="JavaScript Library" class="alignnone size-full wp-image-121578" src="http://media.smashingmagazine.com/wp-content/uploads/2012/08/nl-5.jpg" title="JavaScript library" /&gt;
&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;
</description><link>http://kidaworld.blogspot.com/2012/11/useful-javascript-libraries-and-jquery.html</link><author>noreply@blogger.com (UXAWY)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8363405111659754159.post-7507989963158246484</guid><pubDate>Mon, 12 Nov 2012 13:17:00 +0000</pubDate><atom:updated>2012-11-12T05:17:36.126-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">designer</category><title>20 All Too Common Coding Pitfalls For Beginners </title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;h2&gt;
JavaScript Tips&lt;/h2&gt;
&lt;h3&gt;
1 - Unnecessary DOM Manipulation&lt;/h3&gt;
The DOM is slow. Limiting your interaction with it will greatly increase your code’s performance. Consider the following (bad) code:&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  jscript" id="highlighter_654910"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
4&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
5&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="jscript comments"&gt;// anti-pattern&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="jscript keyword"&gt;for&lt;/code&gt; &lt;code class="jscript plain"&gt;(&lt;/code&gt;&lt;code class="jscript keyword"&gt;var&lt;/code&gt; &lt;code class="jscript plain"&gt;i = 0; i &amp;lt; 100; i++){&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="jscript spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="jscript keyword"&gt;var&lt;/code&gt; &lt;code class="jscript plain"&gt;li = $(&lt;/code&gt;&lt;code class="jscript string"&gt;"&amp;lt;li&amp;gt;"&lt;/code&gt;&lt;code class="jscript plain"&gt;).html(&lt;/code&gt;&lt;code class="jscript string"&gt;"This is list item #"&lt;/code&gt; &lt;code class="jscript plain"&gt;+ (i+1));&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
&lt;code class="jscript spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="jscript plain"&gt;$(&lt;/code&gt;&lt;code class="jscript string"&gt;"#someUL"&lt;/code&gt;&lt;code class="jscript plain"&gt;).append(li);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
&lt;code class="jscript plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
This code actually &lt;i&gt;modifies&lt;/i&gt; the DOM 100 times, and unnecessarily creates 100 jQuery objects. 100! A more correct approach would be to either use a document fragment, or build up a string that contains the 100 &lt;code&gt;&amp;lt;li/&amp;gt;&lt;/code&gt; elements, and then appends that HTML to the containing element. That way, you jump into the DOM a total of once. Here’s an example:&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  jscript" id="highlighter_415945"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
4&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
5&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="jscript keyword"&gt;var&lt;/code&gt; &lt;code class="jscript plain"&gt;liststring = &lt;/code&gt;&lt;code class="jscript string"&gt;""&lt;/code&gt;&lt;code class="jscript plain"&gt;;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="jscript keyword"&gt;for&lt;/code&gt; &lt;code class="jscript plain"&gt;(&lt;/code&gt;&lt;code class="jscript keyword"&gt;var&lt;/code&gt; &lt;code class="jscript plain"&gt;i = 100; i &amp;gt; 0; i--){&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="jscript spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="jscript plain"&gt;liststring += &lt;/code&gt;&lt;code class="jscript string"&gt;"&amp;lt;li&amp;gt;This is list item #"&lt;/code&gt; &lt;code class="jscript plain"&gt;+ (99- i);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
&lt;code class="jscript plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
&lt;code class="jscript plain"&gt;document.getElementById(&lt;/code&gt;&lt;code class="jscript string"&gt;"someUL"&lt;/code&gt;&lt;code class="jscript plain"&gt;).innerHTML(liststring);&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
As noted above, with this technique, we touch the DOM only once, which is an improvement, but it also relies on string concatenation to build a large string. There’s a different way that we could approach this, using arrays.&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  jscript" id="highlighter_328223"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
4&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
5&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
6&lt;/div&gt;
&lt;div class="line number7 index6 alt2"&gt;
7&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="jscript keyword"&gt;var&lt;/code&gt; &lt;code class="jscript plain"&gt;liststring = &lt;/code&gt;&lt;code class="jscript string"&gt;"&amp;lt;li&amp;gt;"&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="jscript keyword"&gt;var&lt;/code&gt; &lt;code class="jscript plain"&gt;lis = [];&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="jscript keyword"&gt;for&lt;/code&gt; &lt;code class="jscript plain"&gt;(&lt;/code&gt;&lt;code class="jscript keyword"&gt;var&lt;/code&gt; &lt;code class="jscript plain"&gt;i = 100; i &amp;gt; 0; i--){&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
&lt;code class="jscript spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="jscript plain"&gt;lis.push(&lt;/code&gt;&lt;code class="jscript string"&gt;"This is list item #"&lt;/code&gt; &lt;code class="jscript plain"&gt;+ (99- i));&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
&lt;code class="jscript plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
&lt;code class="jscript plain"&gt;liststring += lis.join(&lt;/code&gt;&lt;code class="jscript string"&gt;"&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;"&lt;/code&gt;&lt;code class="jscript plain"&gt;) + &lt;/code&gt;&lt;code class="jscript string"&gt;"&amp;lt;/li&amp;gt;"&lt;/code&gt;&lt;code class="jscript plain"&gt;;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number7 index6 alt2"&gt;
&lt;code class="jscript plain"&gt;document.getElementById(&lt;/code&gt;&lt;code class="jscript string"&gt;"someUL"&lt;/code&gt;&lt;code class="jscript plain"&gt;).innerHTML(liststring);&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
When building large strings, storing each piece of the string as an item within an array element and calling &lt;code&gt;join()&lt;/code&gt; is more efficient than string concatenation. This is one of the fastest and easiest ways to build repetitive HTML in JavaScript without using a template library or framework.&lt;br /&gt;
&lt;h3&gt;
2 - Inconsistent Variable &amp;amp; Function Names in JavaScript&lt;/h3&gt;
This next item isn’t a performance issue, but is extremely important – especially if you are working on code that other people work on, as well. Keep your identifiers (variable and function names) consistent. Consider the following variables as an example:&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  jscript" id="highlighter_744424"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="jscript keyword"&gt;var&lt;/code&gt; &lt;code class="jscript plain"&gt;foo = &lt;/code&gt;&lt;code class="jscript string"&gt;"bar"&lt;/code&gt;&lt;code class="jscript plain"&gt;;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="jscript keyword"&gt;var&lt;/code&gt; &lt;code class="jscript plain"&gt;plant = &lt;/code&gt;&lt;code class="jscript string"&gt;"green"&lt;/code&gt;&lt;code class="jscript plain"&gt;;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="jscript keyword"&gt;var&lt;/code&gt; &lt;code class="jscript plain"&gt;car = &lt;/code&gt;&lt;code class="jscript string"&gt;"red"&lt;/code&gt;&lt;code class="jscript plain"&gt;;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
It wouldn’t make sense to add another variable, called &lt;code&gt;Something&lt;/code&gt;. This introduces inconsistency in your variable naming pattern, causing your brain to cognitively flag this variable as being different or special. This is why constants in most languages are traditionally defined with all caps.&lt;br /&gt;
You can take this a step further by maintaining similar length, grammatical structure, and explanatory nature when naming functions. For example, consider the following contrived function:&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  jscript" id="highlighter_619652"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="jscript keyword"&gt;function&lt;/code&gt; &lt;code class="jscript plain"&gt;subtractFive(number){&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="jscript spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="jscript keyword"&gt;return&lt;/code&gt; &lt;code class="jscript plain"&gt;number - 5;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="jscript plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
Naming a function that adds five to a given number should follow the same pattern, shown here:&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  jscript" id="highlighter_220101"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="jscript keyword"&gt;function&lt;/code&gt; &lt;code class="jscript plain"&gt;addFive(number){&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="jscript spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="jscript keyword"&gt;return&lt;/code&gt; &lt;code class="jscript plain"&gt;number + 5;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="jscript plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
Sometimes, you might name a function to indicate its return value. For instance, you might name a function that returns an HTML string &lt;code&gt;getTweetHTML()&lt;/code&gt;. You might also prepend a function’s name with &lt;code&gt;do&lt;/code&gt;, if the function simply performs an operation and doesn’t return a value, eg: &lt;code&gt;doFetchTweets()&lt;/code&gt;.&lt;br /&gt;
Constructor functions typically follow the tradition of classes in other languages, capitalizing the first letter:&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  jscript" id="highlighter_881982"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="jscript keyword"&gt;function&lt;/code&gt; &lt;code class="jscript plain"&gt;Dog(color){&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="jscript spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="jscript keyword"&gt;this&lt;/code&gt;&lt;code class="jscript plain"&gt;.color = color;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="jscript plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
As a general rule of thumb, you should be descriptive when naming your identifiers. Classify them together with other similar identifiers by maintaining a naming pattern that is readable and offers hints to the nature of a variable or function’s purpose.&lt;br /&gt;
&lt;h3&gt;
3 - Use &lt;code&gt;hasOwnProperty()&lt;/code&gt; in &lt;code&gt;for...in&lt;/code&gt; Loops&lt;/h3&gt;
JavaScript’s arrays are not associative; trying to use them as such is frowned upon by the community. Objects, on the other hand, can be treated as hash tables, and you can iterate over an object’s properties by using the &lt;code&gt;for...in&lt;/code&gt; loop, like so:&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  jscript" id="highlighter_192784"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="jscript keyword"&gt;for&lt;/code&gt; &lt;code class="jscript plain"&gt;(&lt;/code&gt;&lt;code class="jscript keyword"&gt;var&lt;/code&gt; &lt;code class="jscript plain"&gt;prop &lt;/code&gt;&lt;code class="jscript keyword"&gt;in&lt;/code&gt; &lt;code class="jscript plain"&gt;someObject) {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="jscript spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="jscript plain"&gt;alert(someObject[prop]); &lt;/code&gt;&lt;code class="jscript comments"&gt;// alert's value of property&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="jscript plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
The problem, however, is that the &lt;code&gt;for...in&lt;/code&gt; loop iterates over every enumerable property on the object’s prototype chain. This can be problematic if you only want to use the properties that exist on the actual object.&lt;br /&gt;
You can solve this issue by using the &lt;code&gt;hasOwnProperty()&lt;/code&gt; method. Here’s an example:&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  jscript" id="highlighter_308019"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
4&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
5&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="jscript keyword"&gt;for&lt;/code&gt; &lt;code class="jscript plain"&gt;(&lt;/code&gt;&lt;code class="jscript keyword"&gt;var&lt;/code&gt; &lt;code class="jscript plain"&gt;prop &lt;/code&gt;&lt;code class="jscript keyword"&gt;in&lt;/code&gt; &lt;code class="jscript plain"&gt;someObject) {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="jscript spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="jscript keyword"&gt;if&lt;/code&gt; &lt;code class="jscript plain"&gt;(someObject.hasOwnProperty(prop)) {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="jscript spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="jscript plain"&gt;alert(someObject[prop]); &lt;/code&gt;&lt;code class="jscript comments"&gt;// alert's value of property&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
&lt;code class="jscript spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="jscript plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
&lt;code class="jscript plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
This version only alerts the values of the properties that directly reside on &lt;code&gt;someObject&lt;/code&gt;.&lt;br /&gt;
&lt;h3&gt;
4 - Comparing Boolean Values&lt;/h3&gt;
Comparing boolean values in a condition is a waste of computation time. Take a look at the following for an example:&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  jscript" id="highlighter_316739"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
4&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
5&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="jscript keyword"&gt;if&lt;/code&gt; &lt;code class="jscript plain"&gt;(foo == &lt;/code&gt;&lt;code class="jscript keyword"&gt;true&lt;/code&gt;&lt;code class="jscript plain"&gt;) {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="jscript spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="jscript comments"&gt;// do something for true&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="jscript plain"&gt;} &lt;/code&gt;&lt;code class="jscript keyword"&gt;else&lt;/code&gt; &lt;code class="jscript plain"&gt;{&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
&lt;code class="jscript spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="jscript comments"&gt;// do something for false&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
&lt;code class="jscript plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
Notice the condition: &lt;code&gt;foo == true&lt;/code&gt;. The comparison of &lt;code&gt;foo&lt;/code&gt; and &lt;code&gt;true&lt;/code&gt; is unnecessary because &lt;code&gt;foo&lt;/code&gt; is already a boolean value (or it’s a truthy or falsey one). Instead of comparing &lt;code&gt;foo&lt;/code&gt;, simply use it as the condition, like this:&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  jscript" id="highlighter_145312"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
4&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
5&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="jscript keyword"&gt;if&lt;/code&gt; &lt;code class="jscript plain"&gt;(foo) {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="jscript spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="jscript comments"&gt;// do something for true&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="jscript plain"&gt;} &lt;/code&gt;&lt;code class="jscript keyword"&gt;else&lt;/code&gt; &lt;code class="jscript plain"&gt;{&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
&lt;code class="jscript spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="jscript comments"&gt;// do something for false&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
&lt;code class="jscript plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
To test for &lt;code&gt;false&lt;/code&gt;, use the logical NOT operator, as shown below:&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  jscript" id="highlighter_837446"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
4&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
5&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="jscript keyword"&gt;if&lt;/code&gt; &lt;code class="jscript plain"&gt;(!foo) {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="jscript spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="jscript comments"&gt;// do something if foo is false&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="jscript plain"&gt;} &lt;/code&gt;&lt;code class="jscript keyword"&gt;else&lt;/code&gt; &lt;code class="jscript plain"&gt;{&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
&lt;code class="jscript spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="jscript comments"&gt;// do something if foo is true&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
&lt;code class="jscript plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h3&gt;
5 - Event Binding&lt;/h3&gt;
Events are a complicated subject in JavaScript. Gone are the days of inline &lt;code&gt;onclick&lt;/code&gt; event handlers (except in some very rare “splash page” cases). Instead, use event bubbling and delegation.&lt;br /&gt;
Let’s imagine that you have a grid of pictures that need to launch a modal lightbox window. Here’s what you &lt;i&gt;shouldn’t&lt;/i&gt; do. Note: we’re using jQuery here, assuming you are using a similar library. If not, the same bubbling principles also apply to vanilla JavaScript.&lt;br /&gt;
The relevant HTML:&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  xml" id="highlighter_416384"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
4&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
5&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
6&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="xml plain"&gt;&amp;lt;&lt;/code&gt;&lt;code class="xml keyword"&gt;div&lt;/code&gt; &lt;code class="xml color1"&gt;id&lt;/code&gt;&lt;code class="xml plain"&gt;=&lt;/code&gt;&lt;code class="xml string"&gt;"grid-container"&lt;/code&gt;&lt;code class="xml plain"&gt;&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="xml spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="xml plain"&gt;&amp;lt;&lt;/code&gt;&lt;code class="xml keyword"&gt;a&lt;/code&gt; &lt;code class="xml color1"&gt;href&lt;/code&gt;&lt;code class="xml plain"&gt;=&lt;/code&gt;&lt;code class="xml string"&gt;"someimage.jpg"&lt;/code&gt;&lt;code class="xml plain"&gt;&amp;gt;&amp;lt;&lt;/code&gt;&lt;code class="xml keyword"&gt;img&lt;/code&gt; &lt;code class="xml color1"&gt;src&lt;/code&gt;&lt;code class="xml plain"&gt;=&lt;/code&gt;&lt;code class="xml string"&gt;"someimage-thumb.jpg"&lt;/code&gt;&lt;code class="xml plain"&gt;&amp;gt;&amp;lt;/&lt;/code&gt;&lt;code class="xml keyword"&gt;a&lt;/code&gt;&lt;code class="xml plain"&gt;&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="xml spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="xml plain"&gt;&amp;lt;&lt;/code&gt;&lt;code class="xml keyword"&gt;a&lt;/code&gt; &lt;code class="xml color1"&gt;href&lt;/code&gt;&lt;code class="xml plain"&gt;=&lt;/code&gt;&lt;code class="xml string"&gt;"someimage.jpg"&lt;/code&gt;&lt;code class="xml plain"&gt;&amp;gt;&amp;lt;&lt;/code&gt;&lt;code class="xml keyword"&gt;img&lt;/code&gt; &lt;code class="xml color1"&gt;src&lt;/code&gt;&lt;code class="xml plain"&gt;=&lt;/code&gt;&lt;code class="xml string"&gt;"someimage-thumb.jpg"&lt;/code&gt;&lt;code class="xml plain"&gt;&amp;gt;&amp;lt;/&lt;/code&gt;&lt;code class="xml keyword"&gt;a&lt;/code&gt;&lt;code class="xml plain"&gt;&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
&lt;code class="xml spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="xml plain"&gt;&amp;lt;&lt;/code&gt;&lt;code class="xml keyword"&gt;a&lt;/code&gt; &lt;code class="xml color1"&gt;href&lt;/code&gt;&lt;code class="xml plain"&gt;=&lt;/code&gt;&lt;code class="xml string"&gt;"someimage.jpg"&lt;/code&gt;&lt;code class="xml plain"&gt;&amp;gt;&amp;lt;&lt;/code&gt;&lt;code class="xml keyword"&gt;img&lt;/code&gt; &lt;code class="xml color1"&gt;src&lt;/code&gt;&lt;code class="xml plain"&gt;=&lt;/code&gt;&lt;code class="xml string"&gt;"someimage-thumb.jpg"&lt;/code&gt;&lt;code class="xml plain"&gt;&amp;gt;&amp;lt;/&lt;/code&gt;&lt;code class="xml keyword"&gt;a&lt;/code&gt;&lt;code class="xml plain"&gt;&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
&lt;code class="xml spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="xml plain"&gt;...&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
&lt;code class="xml plain"&gt;&amp;lt;/&lt;/code&gt;&lt;code class="xml keyword"&gt;div&lt;/code&gt;&lt;code class="xml plain"&gt;&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
The (bad) JavaScript:&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  jscript" id="highlighter_408112"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="jscript plain"&gt;$(&lt;/code&gt;&lt;code class="jscript string"&gt;'a'&lt;/code&gt;&lt;code class="jscript plain"&gt;).on(&lt;/code&gt;&lt;code class="jscript string"&gt;'click'&lt;/code&gt;&lt;code class="jscript plain"&gt;, &lt;/code&gt;&lt;code class="jscript keyword"&gt;function&lt;/code&gt;&lt;code class="jscript plain"&gt;() {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="jscript spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="jscript plain"&gt;callLightbox(&lt;/code&gt;&lt;code class="jscript keyword"&gt;this&lt;/code&gt;&lt;code class="jscript plain"&gt;);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="jscript plain"&gt;});&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
This code assumes that calling the lightbox involves passing an anchor element that references the full size image. Instead of binding to each anchor element, bind to the &lt;code&gt;#grid-container&lt;/code&gt; element instead.&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  jscript" id="highlighter_577157"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="jscript plain"&gt;$(&lt;/code&gt;&lt;code class="jscript string"&gt;"#grid-container"&lt;/code&gt;&lt;code class="jscript plain"&gt;).on(&lt;/code&gt;&lt;code class="jscript string"&gt;"click"&lt;/code&gt;&lt;code class="jscript plain"&gt;, &lt;/code&gt;&lt;code class="jscript string"&gt;"a"&lt;/code&gt;&lt;code class="jscript plain"&gt;, &lt;/code&gt;&lt;code class="jscript keyword"&gt;function&lt;/code&gt;&lt;code class="jscript plain"&gt;(event) {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="jscript spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="jscript plain"&gt;callLightbox(event.target);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="jscript plain"&gt;});&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
In this code, both &lt;code&gt;this&lt;/code&gt; and &lt;code&gt;event.target&lt;/code&gt; refer to the anchor element. You can use this same technique with any parent element. Just make sure to define the element that should be the event’s target.&lt;br /&gt;
&lt;h3&gt;
6 - Avoid Ternary Redundancy&lt;/h3&gt;
The overuse of ternary statements is quite common both in JavaScript and PHP.&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  jscript" id="highlighter_29151"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="jscript comments"&gt;// javascript&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="jscript keyword"&gt;return&lt;/code&gt; &lt;code class="jscript plain"&gt;foo.toString() !== &lt;/code&gt;&lt;code class="jscript string"&gt;""&lt;/code&gt; &lt;code class="jscript plain"&gt;? &lt;/code&gt;&lt;code class="jscript keyword"&gt;true&lt;/code&gt; &lt;code class="jscript plain"&gt;: &lt;/code&gt;&lt;code class="jscript keyword"&gt;false&lt;/code&gt;&lt;code class="jscript plain"&gt;;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  php" id="highlighter_443194"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="php comments"&gt;// php&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="php keyword"&gt;return&lt;/code&gt; &lt;code class="php plain"&gt;(something()) ? true : false;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
A condition expression always returns a &lt;code&gt;true&lt;/code&gt; or &lt;code&gt;false&lt;/code&gt; value, meaning you don’t need to explicitly add &lt;code&gt;true&lt;/code&gt;/&lt;code&gt;false&lt;/code&gt; as ternary values. Instead, you could simply return the condition:&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  jscript" id="highlighter_64760"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="jscript comments"&gt;// javascript&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="jscript keyword"&gt;return&lt;/code&gt; &lt;code class="jscript plain"&gt;foo.toString() !== &lt;/code&gt;&lt;code class="jscript string"&gt;""&lt;/code&gt;&lt;code class="jscript plain"&gt;;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  php" id="highlighter_687050"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="php comments"&gt;// php&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="php keyword"&gt;return&lt;/code&gt; &lt;code class="php plain"&gt;something();&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;hr /&gt;
&lt;h2&gt;
PHP Tips&lt;/h2&gt;
&lt;h3&gt;
7 - Use Ternary When Appropriate&lt;/h3&gt;
&lt;code&gt;if...else&lt;/code&gt; statements are a central part of most languages. But doing something simple, such as assigning a value to a variable based upon a condition – well, they can junk up your code. Consider the following code:&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  php" id="highlighter_113685"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
4&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
5&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
6&lt;/div&gt;
&lt;div class="line number7 index6 alt2"&gt;
7&lt;/div&gt;
&lt;div class="line number8 index7 alt1"&gt;
8&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="php keyword"&gt;if&lt;/code&gt; &lt;code class="php plain"&gt;(&lt;/code&gt;&lt;code class="php variable"&gt;$greeting&lt;/code&gt;&lt;code class="php plain"&gt;)&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="php plain"&gt;{&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$post&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;message = &lt;/code&gt;&lt;code class="php string"&gt;'Hello'&lt;/code&gt;&lt;code class="php plain"&gt;;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
&lt;code class="php keyword"&gt;else&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
&lt;code class="php plain"&gt;{&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number7 index6 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$post&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;message = &lt;/code&gt;&lt;code class="php string"&gt;'Goodbye'&lt;/code&gt;&lt;code class="php plain"&gt;;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number8 index7 alt1"&gt;
&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
This code can be reduced to one line, while still maintaining readability by using the ternary operator, like this:&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  php" id="highlighter_347328"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="php variable"&gt;$post&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;message = &lt;/code&gt;&lt;code class="php variable"&gt;$greeting&lt;/code&gt; &lt;code class="php plain"&gt;? &lt;/code&gt;&lt;code class="php string"&gt;'Hello'&lt;/code&gt; &lt;code class="php plain"&gt;: &lt;/code&gt;&lt;code class="php string"&gt;'Goodbye'&lt;/code&gt;&lt;code class="php plain"&gt;;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
It’s clear, concise, and gives you the functionality you need.&lt;br /&gt;
&lt;blockquote&gt;
As useful as the ternary operator is, the most important guideline is not to over-use it! The goal of coding is not to cramp your logic into as few lines as possible.&lt;/blockquote&gt;
&lt;h3&gt;
8 - Throw Exceptions Instead of Inception-Style Nesting&lt;/h3&gt;
Let’s face it: many levels of nesting is ugly and difficult to maintain/read. The following code is a relatively simplified example, but they get much worse over time:&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  php" id="highlighter_422166"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
4&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
5&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
6&lt;/div&gt;
&lt;div class="line number7 index6 alt2"&gt;
7&lt;/div&gt;
&lt;div class="line number8 index7 alt1"&gt;
8&lt;/div&gt;
&lt;div class="line number9 index8 alt2"&gt;
9&lt;/div&gt;
&lt;div class="line number10 index9 alt1"&gt;
10&lt;/div&gt;
&lt;div class="line number11 index10 alt2"&gt;
11&lt;/div&gt;
&lt;div class="line number12 index11 alt1"&gt;
12&lt;/div&gt;
&lt;div class="line number13 index12 alt2"&gt;
13&lt;/div&gt;
&lt;div class="line number14 index13 alt1"&gt;
14&lt;/div&gt;
&lt;div class="line number15 index14 alt2"&gt;
15&lt;/div&gt;
&lt;div class="line number16 index15 alt1"&gt;
16&lt;/div&gt;
&lt;div class="line number17 index16 alt2"&gt;
17&lt;/div&gt;
&lt;div class="line number18 index17 alt1"&gt;
18&lt;/div&gt;
&lt;div class="line number19 index18 alt2"&gt;
19&lt;/div&gt;
&lt;div class="line number20 index19 alt1"&gt;
20&lt;/div&gt;
&lt;div class="line number21 index20 alt2"&gt;
21&lt;/div&gt;
&lt;div class="line number22 index21 alt1"&gt;
22&lt;/div&gt;
&lt;div class="line number23 index22 alt2"&gt;
23&lt;/div&gt;
&lt;div class="line number24 index23 alt1"&gt;
24&lt;/div&gt;
&lt;div class="line number25 index24 alt2"&gt;
25&lt;/div&gt;
&lt;div class="line number26 index25 alt1"&gt;
26&lt;/div&gt;
&lt;div class="line number27 index26 alt2"&gt;
27&lt;/div&gt;
&lt;div class="line number28 index27 alt1"&gt;
28&lt;/div&gt;
&lt;div class="line number29 index28 alt2"&gt;
29&lt;/div&gt;
&lt;div class="line number30 index29 alt1"&gt;
30&lt;/div&gt;
&lt;div class="line number31 index30 alt2"&gt;
31&lt;/div&gt;
&lt;div class="line number32 index31 alt1"&gt;
32&lt;/div&gt;
&lt;div class="line number33 index32 alt2"&gt;
33&lt;/div&gt;
&lt;div class="line number34 index33 alt1"&gt;
34&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="php comments"&gt;// anti-pattern&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="php variable"&gt;$error_message&lt;/code&gt; &lt;code class="php plain"&gt;= null;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="php keyword"&gt;if&lt;/code&gt; &lt;code class="php plain"&gt;(&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;form_validation-&amp;gt;run())&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
&lt;code class="php plain"&gt;{&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;if&lt;/code&gt; &lt;code class="php plain"&gt;(&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;upload-&amp;gt;do_upload())&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;{&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number7 index6 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$image&lt;/code&gt; &lt;code class="php plain"&gt;= &lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;upload-&amp;gt;get_info();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number8 index7 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;if&lt;/code&gt; &lt;code class="php plain"&gt;( ! &lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;image-&amp;gt;create_thumbnail(&lt;/code&gt;&lt;code class="php variable"&gt;$image&lt;/code&gt;&lt;code class="php plain"&gt;[&lt;/code&gt;&lt;code class="php string"&gt;'file_name'&lt;/code&gt;&lt;code class="php plain"&gt;], 300, 150))&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number9 index8 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;{&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number10 index9 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$error_message&lt;/code&gt; &lt;code class="php plain"&gt;= &lt;/code&gt;&lt;code class="php string"&gt;'There was an error creating the thumbnail.'&lt;/code&gt;&lt;code class="php plain"&gt;;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number11 index10 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number12 index11 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number13 index12 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;else&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number14 index13 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;{&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number15 index14 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$error_message&lt;/code&gt; &lt;code class="php plain"&gt;= &lt;/code&gt;&lt;code class="php string"&gt;'There was an error uploading the image.'&lt;/code&gt;&lt;code class="php plain"&gt;;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number16 index15 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number17 index16 alt2"&gt;
&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number18 index17 alt1"&gt;
&lt;code class="php keyword"&gt;else&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number19 index18 alt2"&gt;
&lt;code class="php plain"&gt;{&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number20 index19 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$error_message&lt;/code&gt; &lt;code class="php plain"&gt;= &lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;form_validation-&amp;gt;error_string();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number21 index20 alt2"&gt;
&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number22 index21 alt1"&gt;
&lt;code class="php comments"&gt;// Show error messages&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number23 index22 alt2"&gt;
&lt;code class="php keyword"&gt;if&lt;/code&gt; &lt;code class="php plain"&gt;(&lt;/code&gt;&lt;code class="php variable"&gt;$error_message&lt;/code&gt; &lt;code class="php plain"&gt;!== null)&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number24 index23 alt1"&gt;
&lt;code class="php plain"&gt;{&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number25 index24 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;load-&amp;gt;view(&lt;/code&gt;&lt;code class="php string"&gt;'form'&lt;/code&gt;&lt;code class="php plain"&gt;, &lt;/code&gt;&lt;code class="php keyword"&gt;array&lt;/code&gt;&lt;code class="php plain"&gt;(&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number26 index25 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php string"&gt;'error'&lt;/code&gt; &lt;code class="php plain"&gt;=&amp;gt; &lt;/code&gt;&lt;code class="php variable"&gt;$error_message&lt;/code&gt;&lt;code class="php plain"&gt;,&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number27 index26 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;));&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number28 index27 alt1"&gt;
&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number29 index28 alt2"&gt;
&lt;code class="php comments"&gt;// Save the page&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number30 index29 alt1"&gt;
&lt;code class="php keyword"&gt;else&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number31 index30 alt2"&gt;
&lt;code class="php plain"&gt;{&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number32 index31 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$some_data&lt;/code&gt;&lt;code class="php plain"&gt;[&lt;/code&gt;&lt;code class="php string"&gt;'image'&lt;/code&gt;&lt;code class="php plain"&gt;] = &lt;/code&gt;&lt;code class="php variable"&gt;$image&lt;/code&gt;&lt;code class="php plain"&gt;[&lt;/code&gt;&lt;code class="php string"&gt;'file_name'&lt;/code&gt;&lt;code class="php plain"&gt;];&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number33 index32 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;some_model-&amp;gt;save(&lt;/code&gt;&lt;code class="php variable"&gt;$some_data&lt;/code&gt;&lt;code class="php plain"&gt;);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number34 index33 alt1"&gt;
&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
That’s some nasty code, but you can make it drastically cleaner by using exceptions, like so:&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  php" id="highlighter_318524"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
4&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
5&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
6&lt;/div&gt;
&lt;div class="line number7 index6 alt2"&gt;
7&lt;/div&gt;
&lt;div class="line number8 index7 alt1"&gt;
8&lt;/div&gt;
&lt;div class="line number9 index8 alt2"&gt;
9&lt;/div&gt;
&lt;div class="line number10 index9 alt1"&gt;
10&lt;/div&gt;
&lt;div class="line number11 index10 alt2"&gt;
11&lt;/div&gt;
&lt;div class="line number12 index11 alt1"&gt;
12&lt;/div&gt;
&lt;div class="line number13 index12 alt2"&gt;
13&lt;/div&gt;
&lt;div class="line number14 index13 alt1"&gt;
14&lt;/div&gt;
&lt;div class="line number15 index14 alt2"&gt;
15&lt;/div&gt;
&lt;div class="line number16 index15 alt1"&gt;
16&lt;/div&gt;
&lt;div class="line number17 index16 alt2"&gt;
17&lt;/div&gt;
&lt;div class="line number18 index17 alt1"&gt;
18&lt;/div&gt;
&lt;div class="line number19 index18 alt2"&gt;
19&lt;/div&gt;
&lt;div class="line number20 index19 alt1"&gt;
20&lt;/div&gt;
&lt;div class="line number21 index20 alt2"&gt;
21&lt;/div&gt;
&lt;div class="line number22 index21 alt1"&gt;
22&lt;/div&gt;
&lt;div class="line number23 index22 alt2"&gt;
23&lt;/div&gt;
&lt;div class="line number24 index23 alt1"&gt;
24&lt;/div&gt;
&lt;div class="line number25 index24 alt2"&gt;
25&lt;/div&gt;
&lt;div class="line number26 index25 alt1"&gt;
26&lt;/div&gt;
&lt;div class="line number27 index26 alt2"&gt;
27&lt;/div&gt;
&lt;div class="line number28 index27 alt1"&gt;
28&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="php keyword"&gt;try&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="php plain"&gt;{&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;if&lt;/code&gt; &lt;code class="php plain"&gt;( ! &lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;form_validation-&amp;gt;run())&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;{&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;throw&lt;/code&gt; &lt;code class="php keyword"&gt;new&lt;/code&gt; &lt;code class="php plain"&gt;Exception(&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;form_validation-&amp;gt;error_string());&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number7 index6 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;if&lt;/code&gt; &lt;code class="php plain"&gt;( ! &lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;upload-&amp;gt;do_upload())&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number8 index7 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;{&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number9 index8 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;throw&lt;/code&gt; &lt;code class="php keyword"&gt;new&lt;/code&gt; &lt;code class="php plain"&gt;Exception(&lt;/code&gt;&lt;code class="php string"&gt;'There was an error uploading the image.'&lt;/code&gt;&lt;code class="php plain"&gt;);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number10 index9 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number11 index10 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$image&lt;/code&gt; &lt;code class="php plain"&gt;= &lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;upload-&amp;gt;get_info();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number12 index11 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;if&lt;/code&gt; &lt;code class="php plain"&gt;( ! &lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;image-&amp;gt;create_thumbnail(&lt;/code&gt;&lt;code class="php variable"&gt;$image&lt;/code&gt;&lt;code class="php plain"&gt;[&lt;/code&gt;&lt;code class="php string"&gt;'file_name'&lt;/code&gt;&lt;code class="php plain"&gt;], 300, 150))&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number13 index12 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;{&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number14 index13 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;throw&lt;/code&gt; &lt;code class="php keyword"&gt;new&lt;/code&gt; &lt;code class="php plain"&gt;Exception(&lt;/code&gt;&lt;code class="php string"&gt;'There was an error creating the thumbnail.'&lt;/code&gt;&lt;code class="php plain"&gt;);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number15 index14 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number16 index15 alt1"&gt;
&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number17 index16 alt2"&gt;
&lt;code class="php comments"&gt;// Show error messages&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number18 index17 alt1"&gt;
&lt;code class="php keyword"&gt;catch&lt;/code&gt; &lt;code class="php plain"&gt;(Exception &lt;/code&gt;&lt;code class="php variable"&gt;$e&lt;/code&gt;&lt;code class="php plain"&gt;)&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number19 index18 alt2"&gt;
&lt;code class="php plain"&gt;{&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number20 index19 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;load-&amp;gt;view(&lt;/code&gt;&lt;code class="php string"&gt;'form'&lt;/code&gt;&lt;code class="php plain"&gt;, &lt;/code&gt;&lt;code class="php keyword"&gt;array&lt;/code&gt;&lt;code class="php plain"&gt;(&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number21 index20 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php string"&gt;'error'&lt;/code&gt; &lt;code class="php plain"&gt;=&amp;gt; &lt;/code&gt;&lt;code class="php variable"&gt;$e&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;getMessage(),&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number22 index21 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;));&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number23 index22 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php comments"&gt;// Stop method execution with return, or use exit&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number24 index23 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;return&lt;/code&gt;&lt;code class="php plain"&gt;;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number25 index24 alt2"&gt;
&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number26 index25 alt1"&gt;
&lt;code class="php comments"&gt;// Got this far, must not have any trouble&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number27 index26 alt2"&gt;
&lt;code class="php variable"&gt;$some_data&lt;/code&gt;&lt;code class="php plain"&gt;[&lt;/code&gt;&lt;code class="php string"&gt;'image'&lt;/code&gt;&lt;code class="php plain"&gt;] = &lt;/code&gt;&lt;code class="php variable"&gt;$image&lt;/code&gt;&lt;code class="php plain"&gt;[&lt;/code&gt;&lt;code class="php string"&gt;'file_name'&lt;/code&gt;&lt;code class="php plain"&gt;];&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number28 index27 alt1"&gt;
&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;some_model-&amp;gt;save(&lt;/code&gt;&lt;code class="php variable"&gt;$some_data&lt;/code&gt;&lt;code class="php plain"&gt;);&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
It might be the same number of lines, but it allows for considerably more readable and maintainable code. It also avoids those difficult debugging sessions, where you’ve missed a possible path through the &lt;code&gt;if&lt;/code&gt; statement. Keep it simple!&lt;br /&gt;
&lt;h3&gt;
9 - &lt;code&gt;False&lt;/code&gt;-Happy Methods&lt;/h3&gt;
&lt;blockquote class="pullquote"&gt;
Being exception-happy is far more advantageous than being false-happy.&lt;br /&gt;
&lt;div class="tutorial_image"&gt;
&lt;script type="text/javascript"&gt;google_ad_client = "pub-9093712935949486";
/* 300x250 nettuts middle tutsads */
google_ad_slot = "1775681443";
google_ad_width = 300;
google_ad_height = 250;&lt;/script&gt; &lt;script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"&gt;&lt;/script&gt;&lt;br /&gt;
&lt;ins style="border: none; display: inline-table; height: 250px; margin: 0; padding: 0; position: relative; visibility: visible; width: 300px;"&gt;&lt;ins id="aswift_0_anchor" style="border: none; display: block; height: 250px; margin: 0; padding: 0; position: relative; visibility: visible; width: 300px;"&gt;&lt;iframe allowtransparency="true" frameborder="0" height="250" hspace="0" id="aswift_0" marginheight="0" marginwidth="0" name="aswift_0" onload="var i=this.id,s=window.google_iframe_oncopy,H=s&amp;amp;&amp;amp;s.handlers,h=H&amp;amp;&amp;amp;H[i],w=this.contentWindow,d;try{d=w.document}catch(e){}if(h&amp;amp;&amp;amp;d&amp;amp;&amp;amp;(!d.body||!d.body.firstChild)){if(h.call){setTimeout(h,0)}else if(h.match){w.location.replace(h)}}" scrolling="no" style="left: 0; position: absolute; top: 0;" vspace="0" width="300"&gt;&lt;/iframe&gt;&lt;/ins&gt;&lt;/ins&gt;&lt;/div&gt;
&lt;/blockquote&gt;
Ruby or Python developers are used to watching for trivial exceptions. While that sound tedious, it’s actually quite a good thing. If anything goes wrong, an exception is thrown, and you instantly know where the problem is.&lt;br /&gt;
In PHP – and especially when using older frameworks, such as CodeIgniter – you get what I refer to as “false-happy code” (as opposed to exception-happy). Instead of having an exception get all up in your face, it just returns a &lt;code&gt;false&lt;/code&gt; value and assigns the error string to some other property. This forces you to fish it out of the class using a &lt;code&gt;get_error();&lt;/code&gt; method.&lt;br /&gt;
Being exception-happy is far more advantageous than being false-happy. If an error occurs within your code (eg: could not connect to S3 to upload an image, or a value is empty, etc.), then throw an exception. You can also throw specific types of exceptions by extending the &lt;code&gt;Exception&lt;/code&gt; class, like so:&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  php" id="highlighter_917469"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="php keyword"&gt;class&lt;/code&gt; &lt;code class="php plain"&gt;CustomException &lt;/code&gt;&lt;code class="php keyword"&gt;extends&lt;/code&gt; &lt;code class="php plain"&gt;Exception {}&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
Throwing a custom exception makes debugging considerably easier.&lt;br /&gt;
&lt;h3&gt;
Tip 10 - Use Guard Clauses&lt;/h3&gt;
It’s common to use &lt;code&gt;if&lt;/code&gt; statements to control a function or method’s execution path. It’s tempting to test a condition and execute a lot of code when the condition results in &lt;code&gt;true&lt;/code&gt;, only to simply return in the &lt;code&gt;else&lt;/code&gt; statement. For example:&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  php" id="highlighter_328523"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
4&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
5&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
6&lt;/div&gt;
&lt;div class="line number7 index6 alt2"&gt;
7&lt;/div&gt;
&lt;div class="line number8 index7 alt1"&gt;
8&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="php keyword"&gt;function&lt;/code&gt; &lt;code class="php plain"&gt;someFunction(&lt;/code&gt;&lt;code class="php variable"&gt;$param&lt;/code&gt;&lt;code class="php plain"&gt;) {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;if&lt;/code&gt; &lt;code class="php plain"&gt;(&lt;/code&gt;&lt;code class="php variable"&gt;$param&lt;/code&gt; &lt;code class="php plain"&gt;== &lt;/code&gt;&lt;code class="php string"&gt;'OK'&lt;/code&gt;&lt;code class="php plain"&gt;) {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;doSomething();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;return&lt;/code&gt; &lt;code class="php plain"&gt;true;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;} &lt;/code&gt;&lt;code class="php keyword"&gt;else&lt;/code&gt; &lt;code class="php plain"&gt;{&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;return&lt;/code&gt; &lt;code class="php plain"&gt;false;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number7 index6 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number8 index7 alt1"&gt;
&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
This kind of solution, however, represents a potential for spaghetti code. You can make this code easier to read by reversing the condition. Here’s the better version:&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  php" id="highlighter_217677"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
4&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
5&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="php keyword"&gt;function&lt;/code&gt; &lt;code class="php plain"&gt;someFunction(&lt;/code&gt;&lt;code class="php variable"&gt;$param&lt;/code&gt;&lt;code class="php plain"&gt;) {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;if&lt;/code&gt; &lt;code class="php plain"&gt;(&lt;/code&gt;&lt;code class="php variable"&gt;$param&lt;/code&gt; &lt;code class="php plain"&gt;!= &lt;/code&gt;&lt;code class="php string"&gt;'OK'&lt;/code&gt;&lt;code class="php plain"&gt;) &lt;/code&gt;&lt;code class="php keyword"&gt;return&lt;/code&gt; &lt;code class="php plain"&gt;false;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;doSomething();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;return&lt;/code&gt; &lt;code class="php plain"&gt;true;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
Isn’t that easier to read? It’s a simple change that makes a drastic difference in the readability of your code.&lt;br /&gt;
&lt;h3&gt;
Tip 11 –  Use &lt;code&gt;while&lt;/code&gt; for Simple Iterations&lt;/h3&gt;
The &lt;code&gt;for&lt;/code&gt; loop is commonly used when you need, for example, a counter. Here’s a simple &lt;code&gt;for&lt;/code&gt; loop:&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  php" id="highlighter_716610"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="php keyword"&gt;for&lt;/code&gt; &lt;code class="php plain"&gt;(&lt;/code&gt;&lt;code class="php keyword"&gt;var&lt;/code&gt; &lt;code class="php plain"&gt;i = 0; i &amp;lt; x; i++) {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;...&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
There are some very good reasons to use a &lt;code&gt;for&lt;/code&gt; loop, but a &lt;code&gt;while&lt;/code&gt; loop may be better if you just need something simple, like this:&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  php" id="highlighter_810236"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
4&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="php keyword"&gt;var&lt;/code&gt; &lt;code class="php plain"&gt;i = x;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="php keyword"&gt;while&lt;/code&gt; &lt;code class="php plain"&gt;(i--) {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;...&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
It doesn’t work in every situation, but it is an alternative.&lt;br /&gt;
&lt;h3&gt;
Tip 12 –  Keep Methods Maintainable&lt;/h3&gt;
&lt;blockquote class="pullquote"&gt;
This is easily one of the most frequent mistakes made by newcomers.&lt;/blockquote&gt;
A method is an object’s unit of work, and limiting your methods to a maintainable size makes your code easier to read and maintain. Take a look at the following monster method:&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  php" id="highlighter_548278"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
4&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
5&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
6&lt;/div&gt;
&lt;div class="line number7 index6 alt2"&gt;
7&lt;/div&gt;
&lt;div class="line number8 index7 alt1"&gt;
8&lt;/div&gt;
&lt;div class="line number9 index8 alt2"&gt;
9&lt;/div&gt;
&lt;div class="line number10 index9 alt1"&gt;
10&lt;/div&gt;
&lt;div class="line number11 index10 alt2"&gt;
11&lt;/div&gt;
&lt;div class="line number12 index11 alt1"&gt;
12&lt;/div&gt;
&lt;div class="line number13 index12 alt2"&gt;
13&lt;/div&gt;
&lt;div class="line number14 index13 alt1"&gt;
14&lt;/div&gt;
&lt;div class="line number15 index14 alt2"&gt;
15&lt;/div&gt;
&lt;div class="line number16 index15 alt1"&gt;
16&lt;/div&gt;
&lt;div class="line number17 index16 alt2"&gt;
17&lt;/div&gt;
&lt;div class="line number18 index17 alt1"&gt;
18&lt;/div&gt;
&lt;div class="line number19 index18 alt2"&gt;
19&lt;/div&gt;
&lt;div class="line number20 index19 alt1"&gt;
20&lt;/div&gt;
&lt;div class="line number21 index20 alt2"&gt;
21&lt;/div&gt;
&lt;div class="line number22 index21 alt1"&gt;
22&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="php keyword"&gt;class&lt;/code&gt; &lt;code class="php plain"&gt;SomeClass {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;function&lt;/code&gt; &lt;code class="php plain"&gt;monsterMethod() {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;if&lt;/code&gt;&lt;code class="php plain"&gt;(&lt;/code&gt;&lt;code class="php variable"&gt;$weArePilots&lt;/code&gt;&lt;code class="php plain"&gt;) {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;goAndDressUp();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;washYourTeeth();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;cleanYourWeapon();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number7 index6 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;takeYourHelmet();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number8 index7 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;if&lt;/code&gt;&lt;code class="php plain"&gt;(&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;helmetDoesNotFit())&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number9 index8 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;takeAHat();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number10 index9 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;else&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number11 index10 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;installHelmet();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number12 index11 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;chekcYourKnife();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number13 index12 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;if&lt;/code&gt;&lt;code class="php plain"&gt;(&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;myAirplain() == &lt;/code&gt;&lt;code class="php string"&gt;"F22"&lt;/code&gt;&lt;code class="php plain"&gt;)&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number14 index13 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;goToArmyAirport();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number15 index14 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;else&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number16 index15 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;goToCivilianAirport();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number17 index16 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;aim();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number18 index17 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;prepare();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number19 index18 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;fire();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number20 index19 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number21 index20 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number22 index21 alt1"&gt;
&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
Consider breaking this monster method into smaller, descriptive chunks, each being responsible for performing one well-abstracted action. This is easily one of the most frequent mistakes made by newcomers.&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  php" id="highlighter_176734"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
4&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
5&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
6&lt;/div&gt;
&lt;div class="line number7 index6 alt2"&gt;
7&lt;/div&gt;
&lt;div class="line number8 index7 alt1"&gt;
8&lt;/div&gt;
&lt;div class="line number9 index8 alt2"&gt;
9&lt;/div&gt;
&lt;div class="line number10 index9 alt1"&gt;
10&lt;/div&gt;
&lt;div class="line number11 index10 alt2"&gt;
11&lt;/div&gt;
&lt;div class="line number12 index11 alt1"&gt;
12&lt;/div&gt;
&lt;div class="line number13 index12 alt2"&gt;
13&lt;/div&gt;
&lt;div class="line number14 index13 alt1"&gt;
14&lt;/div&gt;
&lt;div class="line number15 index14 alt2"&gt;
15&lt;/div&gt;
&lt;div class="line number16 index15 alt1"&gt;
16&lt;/div&gt;
&lt;div class="line number17 index16 alt2"&gt;
17&lt;/div&gt;
&lt;div class="line number18 index17 alt1"&gt;
18&lt;/div&gt;
&lt;div class="line number19 index18 alt2"&gt;
19&lt;/div&gt;
&lt;div class="line number20 index19 alt1"&gt;
20&lt;/div&gt;
&lt;div class="line number21 index20 alt2"&gt;
21&lt;/div&gt;
&lt;div class="line number22 index21 alt1"&gt;
22&lt;/div&gt;
&lt;div class="line number23 index22 alt2"&gt;
23&lt;/div&gt;
&lt;div class="line number24 index23 alt1"&gt;
24&lt;/div&gt;
&lt;div class="line number25 index24 alt2"&gt;
25&lt;/div&gt;
&lt;div class="line number26 index25 alt1"&gt;
26&lt;/div&gt;
&lt;div class="line number27 index26 alt2"&gt;
27&lt;/div&gt;
&lt;div class="line number28 index27 alt1"&gt;
28&lt;/div&gt;
&lt;div class="line number29 index28 alt2"&gt;
29&lt;/div&gt;
&lt;div class="line number30 index29 alt1"&gt;
30&lt;/div&gt;
&lt;div class="line number31 index30 alt2"&gt;
31&lt;/div&gt;
&lt;div class="line number32 index31 alt1"&gt;
32&lt;/div&gt;
&lt;div class="line number33 index32 alt2"&gt;
33&lt;/div&gt;
&lt;div class="line number34 index33 alt1"&gt;
34&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="php keyword"&gt;class&lt;/code&gt; &lt;code class="php plain"&gt;SomeClass {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;function&lt;/code&gt; &lt;code class="php plain"&gt;monsterMethod() {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;if&lt;/code&gt;&lt;code class="php plain"&gt;(&lt;/code&gt;&lt;code class="php variable"&gt;$weArePilots&lt;/code&gt;&lt;code class="php plain"&gt;) {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;prepareYourself();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;tryHelmet();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;findYourAirport();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number7 index6 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;fightEnemy();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number8 index7 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number9 index8 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number10 index9 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;private&lt;/code&gt; &lt;code class="php keyword"&gt;function&lt;/code&gt; &lt;code class="php plain"&gt;prepareYourself() {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number11 index10 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;goAndDressUp();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number12 index11 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;washYourTeeth();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number13 index12 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;cleanYourWeapon();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number14 index13 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;chekcYourKnife();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number15 index14 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number16 index15 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;private&lt;/code&gt; &lt;code class="php keyword"&gt;function&lt;/code&gt; &lt;code class="php plain"&gt;tryHelmet() {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number17 index16 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;takeYourHelmet();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number18 index17 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;if&lt;/code&gt;&lt;code class="php plain"&gt;(&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;helmetDoesNotFit())&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number19 index18 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;takeAHat();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number20 index19 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;else&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number21 index20 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;installHelmet();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number22 index21 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number23 index22 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;private&lt;/code&gt; &lt;code class="php keyword"&gt;function&lt;/code&gt; &lt;code class="php plain"&gt;findYourAirport() {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number24 index23 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;if&lt;/code&gt;&lt;code class="php plain"&gt;(&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;myAirplain() == &lt;/code&gt;&lt;code class="php string"&gt;"F22"&lt;/code&gt;&lt;code class="php plain"&gt;)&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number25 index24 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;goToArmyAirport();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number26 index25 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;else&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number27 index26 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;goToCivilianAirport();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number28 index27 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number29 index28 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;private&lt;/code&gt; &lt;code class="php keyword"&gt;function&lt;/code&gt; &lt;code class="php plain"&gt;fightEnemy() {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number30 index29 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;aim();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number31 index30 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;prepare();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number32 index31 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;fire();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number33 index32 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number34 index33 alt1"&gt;
&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
There we go: cleaner, and easier to debug!&lt;br /&gt;
&lt;h3&gt;
Step 13 - Avoid Deep Nesting&lt;/h3&gt;
Too many levels of nesting makes code difficult to read and maintain. Consider the following:&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  php" id="highlighter_534232"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
4&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
5&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
6&lt;/div&gt;
&lt;div class="line number7 index6 alt2"&gt;
7&lt;/div&gt;
&lt;div class="line number8 index7 alt1"&gt;
8&lt;/div&gt;
&lt;div class="line number9 index8 alt2"&gt;
9&lt;/div&gt;
&lt;div class="line number10 index9 alt1"&gt;
10&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="php keyword"&gt;function&lt;/code&gt; &lt;code class="php plain"&gt;doSomething() {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;if&lt;/code&gt; &lt;code class="php plain"&gt;(&lt;/code&gt;&lt;code class="php variable"&gt;$someCondition&lt;/code&gt;&lt;code class="php plain"&gt;) {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;if&lt;/code&gt; &lt;code class="php plain"&gt;(&lt;/code&gt;&lt;code class="php variable"&gt;$someOtherCondition&lt;/code&gt;&lt;code class="php plain"&gt;) {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;if&lt;/code&gt; &lt;code class="php plain"&gt;(&lt;/code&gt;&lt;code class="php variable"&gt;$yetSomeOtherCondition&lt;/code&gt;&lt;code class="php plain"&gt;) {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;doSomethingSpecial();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number7 index6 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;doSomethingElse();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number8 index7 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number9 index8 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number10 index9 alt1"&gt;
&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
You can refer to Tip #10 to make this code easier to read by reversing some of the conditions.&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  php" id="highlighter_928564"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
4&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
5&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
6&lt;/div&gt;
&lt;div class="line number7 index6 alt2"&gt;
7&lt;/div&gt;
&lt;div class="line number8 index7 alt1"&gt;
8&lt;/div&gt;
&lt;div class="line number9 index8 alt2"&gt;
9&lt;/div&gt;
&lt;div class="line number10 index9 alt1"&gt;
10&lt;/div&gt;
&lt;div class="line number11 index10 alt2"&gt;
11&lt;/div&gt;
&lt;div class="line number12 index11 alt1"&gt;
12&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="php keyword"&gt;function&lt;/code&gt; &lt;code class="php plain"&gt;doSomething() {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;if&lt;/code&gt; &lt;code class="php plain"&gt;(!&lt;/code&gt;&lt;code class="php variable"&gt;$someCondition&lt;/code&gt;&lt;code class="php plain"&gt;) {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;return&lt;/code&gt; &lt;code class="php plain"&gt;false;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;if&lt;/code&gt; &lt;code class="php plain"&gt;(!&lt;/code&gt;&lt;code class="php variable"&gt;$someOtherCondition&lt;/code&gt;&lt;code class="php plain"&gt;) {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;return&lt;/code&gt; &lt;code class="php plain"&gt;false;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number7 index6 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number8 index7 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;if&lt;/code&gt; &lt;code class="php plain"&gt;(&lt;/code&gt;&lt;code class="php variable"&gt;$yetSomeOtherCondition&lt;/code&gt;&lt;code class="php plain"&gt;) {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number9 index8 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;doSomethingSpecial();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number10 index9 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number11 index10 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;doSomethingElse();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number12 index11 alt1"&gt;
&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
This code is considerably cleaner and produces the same results as before.&lt;br /&gt;
When you find yourself with nested &lt;code&gt;if&lt;/code&gt; statements, closely examine your code; your method may be performing more than one task. Here’s an example:&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  php" id="highlighter_540274"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
4&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
5&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
6&lt;/div&gt;
&lt;div class="line number7 index6 alt2"&gt;
7&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="php keyword"&gt;function&lt;/code&gt; &lt;code class="php plain"&gt;someFunc() {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;if&lt;/code&gt;&lt;code class="php plain"&gt;(&lt;/code&gt;&lt;code class="php variable"&gt;$oneThing&lt;/code&gt;&lt;code class="php plain"&gt;) {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;doSomething();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;if&lt;/code&gt;&lt;code class="php plain"&gt;(&lt;/code&gt;&lt;code class="php variable"&gt;$anotherThing&lt;/code&gt;&lt;code class="php plain"&gt;)&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;doSomethingElse();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number7 index6 alt2"&gt;
&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
In these cases, extract the nested methods into their own method:&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  php" id="highlighter_977221"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
4&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
5&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
6&lt;/div&gt;
&lt;div class="line number7 index6 alt2"&gt;
7&lt;/div&gt;
&lt;div class="line number8 index7 alt1"&gt;
8&lt;/div&gt;
&lt;div class="line number9 index8 alt2"&gt;
9&lt;/div&gt;
&lt;div class="line number10 index9 alt1"&gt;
10&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="php keyword"&gt;function&lt;/code&gt; &lt;code class="php plain"&gt;someFunc() {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;if&lt;/code&gt;&lt;code class="php plain"&gt;(&lt;/code&gt;&lt;code class="php variable"&gt;$oneThing&lt;/code&gt;&lt;code class="php plain"&gt;) {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;doSomething();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;doAnotherThing(&lt;/code&gt;&lt;code class="php variable"&gt;$anotherThing&lt;/code&gt;&lt;code class="php plain"&gt;);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number7 index6 alt2"&gt;
&lt;code class="php keyword"&gt;private&lt;/code&gt; &lt;code class="php plain"&gt;doAnotherThing(&lt;/code&gt;&lt;code class="php variable"&gt;$anotherThing&lt;/code&gt;&lt;code class="php plain"&gt;) {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number8 index7 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;if&lt;/code&gt;&lt;code class="php plain"&gt;(&lt;/code&gt;&lt;code class="php variable"&gt;$anotherThing&lt;/code&gt;&lt;code class="php plain"&gt;)&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number9 index8 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;doSomethingElse();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number10 index9 alt1"&gt;
&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h3&gt;
Tip 14 –  Avoid Magic Numbers and Strings&lt;/h3&gt;
Magic numbers and strings are evil. Define variables or constants with the values you want to use in your code.&lt;br /&gt;
Instead of this:&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  php" id="highlighter_503593"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
4&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
5&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="php keyword"&gt;function&lt;/code&gt; &lt;code class="php plain"&gt;someFunct() {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;order-&amp;gt;set(23);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;order-&amp;gt;addProduct(&lt;/code&gt;&lt;code class="php string"&gt;'superComputer'&lt;/code&gt;&lt;code class="php plain"&gt;);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;shoppingList-&amp;gt;add(&lt;/code&gt;&lt;code class="php string"&gt;'superComputer'&lt;/code&gt;&lt;code class="php plain"&gt;);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
Specify what those numbers and strings mean, and assign them to a variable with a meaningful name, like this:&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  php" id="highlighter_629397"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
4&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
5&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
6&lt;/div&gt;
&lt;div class="line number7 index6 alt2"&gt;
7&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="php keyword"&gt;function&lt;/code&gt; &lt;code class="php plain"&gt;someFunct() {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$orderId&lt;/code&gt; &lt;code class="php plain"&gt;= 23;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$selectedProductName&lt;/code&gt; &lt;code class="php plain"&gt;= &lt;/code&gt;&lt;code class="php string"&gt;'superComputer'&lt;/code&gt;&lt;code class="php plain"&gt;;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;order-&amp;gt;set(&lt;/code&gt;&lt;code class="php variable"&gt;$orderId&lt;/code&gt;&lt;code class="php plain"&gt;);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;order-&amp;gt;addProduct(&lt;/code&gt;&lt;code class="php variable"&gt;$selectedProductName&lt;/code&gt;&lt;code class="php plain"&gt;);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;shoppingList-&amp;gt;add(&lt;/code&gt;&lt;code class="php variable"&gt;$selectedProductName&lt;/code&gt;&lt;code class="php plain"&gt;);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number7 index6 alt2"&gt;
&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;blockquote&gt;
While some might argue that we’re needlessly creating variables, the performance hit is negligible. Readability always takes priority. Remember: don’t optimize for performance until you can describe why it’s necessary.&lt;/blockquote&gt;
&lt;h3&gt;
Step 15 - Use Built-In Array Functions&lt;/h3&gt;
Use the built-in array functions instead of &lt;code&gt;foreach()&lt;/code&gt;.&lt;br /&gt;
Not Ideal:&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  php" id="highlighter_521290"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="php keyword"&gt;foreach&lt;/code&gt; &lt;code class="php plain"&gt;(&amp;amp;&lt;/code&gt;&lt;code class="php variable"&gt;$myArray&lt;/code&gt; &lt;code class="php keyword"&gt;as&lt;/code&gt; &lt;code class="php variable"&gt;$key&lt;/code&gt; &lt;code class="php plain"&gt;=&amp;gt;&lt;/code&gt;&lt;code class="php variable"&gt;$element&lt;/code&gt;&lt;code class="php plain"&gt;) {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;if&lt;/code&gt; &lt;code class="php plain"&gt;(&lt;/code&gt;&lt;code class="php variable"&gt;$element&lt;/code&gt; &lt;code class="php plain"&gt;&amp;gt; 5) unset (&lt;/code&gt;&lt;code class="php variable"&gt;$myArray&lt;/code&gt;&lt;code class="php plain"&gt;[&lt;/code&gt;&lt;code class="php variable"&gt;$key&lt;/code&gt;&lt;code class="php plain"&gt;]);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
Better:&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  php" id="highlighter_21690"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="php variable"&gt;$myArray&lt;/code&gt; &lt;code class="php plain"&gt;= &lt;/code&gt;&lt;code class="php functions"&gt;array_filter&lt;/code&gt;&lt;code class="php plain"&gt;(&lt;/code&gt;&lt;code class="php variable"&gt;$myArray&lt;/code&gt;&lt;code class="php plain"&gt;, &lt;/code&gt;&lt;code class="php keyword"&gt;function&lt;/code&gt; &lt;code class="php plain"&gt;(&lt;/code&gt;&lt;code class="php variable"&gt;$element&lt;/code&gt;&lt;code class="php plain"&gt;) { &lt;/code&gt;&lt;code class="php keyword"&gt;return&lt;/code&gt; &lt;code class="php variable"&gt;$element&lt;/code&gt; &lt;code class="php plain"&gt;&amp;lt;= 5;});&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
PHP offers a variety of array methods. They’re confusing at first, but take a day and try to learn as many as possible.&lt;br /&gt;
&lt;h3&gt;
Tip 16 - Don’t Overuse Variables&lt;/h3&gt;
It’s easy to overuse variables, but remember that variables are stored in memory. For every variable you create, the system needs to allocate memory for that variable. Look at this code:&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  php" id="highlighter_101226"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
4&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
5&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="php keyword"&gt;public&lt;/code&gt; &lt;code class="php keyword"&gt;function&lt;/code&gt; &lt;code class="php plain"&gt;get_posts() {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$query&lt;/code&gt; &lt;code class="php plain"&gt;= &lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;db-&amp;gt;get(&lt;/code&gt;&lt;code class="php string"&gt;'posts'&lt;/code&gt;&lt;code class="php plain"&gt;);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$result&lt;/code&gt; &lt;code class="php plain"&gt;= &lt;/code&gt;&lt;code class="php variable"&gt;$query&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;result();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;return&lt;/code&gt; &lt;code class="php variable"&gt;$result&lt;/code&gt;&lt;code class="php plain"&gt;;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
The &lt;code&gt;$result&lt;/code&gt; variable isn’t necessary. The following code omits that variable:&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  php" id="highlighter_9267"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
4&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="php keyword"&gt;public&lt;/code&gt; &lt;code class="php keyword"&gt;function&lt;/code&gt; &lt;code class="php plain"&gt;get_posts() {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php variable"&gt;$query&lt;/code&gt; &lt;code class="php plain"&gt;= &lt;/code&gt;&lt;code class="php variable"&gt;$this&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;db-&amp;gt;get(&lt;/code&gt;&lt;code class="php string"&gt;'posts'&lt;/code&gt;&lt;code class="php plain"&gt;);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="php spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="php keyword"&gt;return&lt;/code&gt; &lt;code class="php variable"&gt;$query&lt;/code&gt;&lt;code class="php plain"&gt;-&amp;gt;result();&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
&lt;code class="php plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
The difference is subtle, but we were able to improve this simple example. We kept the &lt;i&gt;$query&lt;/i&gt; variable because it relates to the database, while &lt;i&gt;$result&lt;/i&gt; related more to our logic.&lt;br /&gt;
&lt;hr /&gt;
&lt;h2&gt;
General Programming Recommendations&lt;/h2&gt;
&lt;h3&gt;
Tip 17 - Rely on the Database Engine&lt;/h3&gt;
&lt;blockquote class="pullquote"&gt;
Anything less is a code smell.&lt;/blockquote&gt;
A database is designed for working with data; use its tools and abilities to make your application more efficient.&lt;br /&gt;
For example, you can avoid redundant database queries in many circumstances. Most plug-and-play user management scripts use two queries for user registration: one to check whether the e-mail/username already exists and another to actually add it to the database. A much better approach is to set the username field to &lt;code&gt;UNIQUE&lt;/code&gt;. You can then use native MySQL functions to check whether or not the record was added to the database.&lt;br /&gt;
&lt;h3&gt;
Tip 18: Properly Name Your Variables&lt;/h3&gt;
The days of naming your variables &lt;code&gt;x&lt;/code&gt;, &lt;code&gt;y&lt;/code&gt;, &lt;code&gt;z&lt;/code&gt; are over (unless, of course, you’re dealing with a coordinate system). A variable represents an important part of your logic. Don’t want to type a long name? Get a better IDE. Modern IDEs auto-complete variable names in a blink of an eye.&lt;br /&gt;
&lt;blockquote&gt;
Always be coding for six months from now. Are you certain that you’ll remember what that &lt;code&gt;$sut&lt;/code&gt; variables refers to a year from now? Likely not: be descriptive. Anything less is a code smell.&lt;/blockquote&gt;
&lt;h3&gt;
Tip 19 - Methods Represent Actions&lt;/h3&gt;
&lt;blockquote class="pullquote"&gt;
Mistakes happen; the key is to learn from them.&lt;/blockquote&gt;
Name your methods with verbs representing the action they perform. The main concept is the exact opposite of the variable naming scheme. Use a short, but descriptive, name in a large scope (ie: public methods), and use a longer and more detailed name in a short scope (ie: private / protected methods). This helps make your code read like well written prose.&lt;br /&gt;
Also avoid any language other than English, when naming your methods. It’s annoying to read function names like 做些什麼() or делатьчтото() in your project. It may be impossible for other programmers to understand your intent. While it might seem arrogant, for better or worse, English is the adopted language of code. Try to use it, if we’re working on a large team.&lt;br /&gt;
&lt;h3&gt;
Tip 20: Structure Recommendations&lt;/h3&gt;
Finally, code structure is just as important to readability and maintainability as anything else we’ve talked about today. Here are two recommendations:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Indent with four or two space-width tabs. Anything more, such as eight spaces, is too much and will make your code difficult to read.&lt;/li&gt;
&lt;li&gt;Set a reasonable line-width and respect it. Forty characters in a line? We’re not in the ’70s any more; set your limit to 120 characters, put a mark on the screen, and force yourself or your IDE to respect that limit. 120 characters gives you a nice width without making you scroll.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;
Conclusion&lt;/h2&gt;
&lt;blockquote&gt;
“I’ve never made a stupid programming mistake.” — No one, ever.&lt;/blockquote&gt;
Mistakes happen; the key is to learn from them. We at Nettuts+ have made, and will continue to make, mistakes. Our hope is that you learn from our mistakes so that you can avoid them in the future. But, to be honest, the best way to learn best practices is to make the mistakes yourself!&lt;br /&gt;
Thanks for reading!&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://kidaworld.blogspot.com/2012/11/20-all-too-common-coding-pitfalls-for.html</link><author>noreply@blogger.com (UXAWY)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8363405111659754159.post-3314900051379758753</guid><pubDate>Mon, 12 Nov 2012 13:04:00 +0000</pubDate><atom:updated>2012-11-12T05:04:59.722-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">designer</category><title>10 Tips for Writing for Designers</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/writing.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;Ever get that feeling that some members of your creative team just aren’t quite with the program? It is entirely likely. Sending out communications and messages that will reach your whole team can be somewhat tricky because of the differences in how people think. &lt;/p&gt;
&lt;p&gt;Creatives sometimes tend to be a little more free-thinking and less-structured than some of their office counterparts. Research has shown that people who use more right brain functions, such as designers and creative thinkers, also respond to and process the same information differently than left-brain thinkers, who tend to be more organized and logic-oriented. (Some studies have even shown that the highest rates of dyslexia, which affects reading and comprehension, have been found in right-brain thinkers.) With just a few tweaks, you can more effectively get your message across to everyone.&lt;/p&gt;
&lt;p&gt;&lt;span id="more-31478"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;1. Stay on Topic&lt;/h2&gt;
&lt;p&gt;Send out communications with a purpose. Determine what your message is and stick to it. Long memos or emails can be overwhelming to read when time is a concern or deadlines are approaching. Put together your message and set it aside for a while before hitting the “send” button. Come back and reread it. Edit closely. Get rid of all the extra information and keep the message on point (even if you save some information for a future memo). &lt;/p&gt;
&lt;h2&gt;2. Messages Should Have Hierarchy&lt;/h2&gt;
&lt;p&gt;Big words do seem more important. Use headlines and big words to stress important information. Structure emails and memos with two to three different font sizes to stress important points and make for easier reading. Use the largest size for the most important information and use more standard sizing for the body of the message. Be careful not to “over-design” your message. Going crazy with fonts and colors will only cause distractions.&lt;/p&gt;
&lt;h2&gt;3. Show, Rather than Tell&lt;/h2&gt;
&lt;p&gt;Provide examples of what you like and what you are looking for when detailing projects to the design group. Communication is about more than words; remember that when working with your visual thinkers. Show the idea. Send out links or attach images that help convey your message. Use visual examples in your writing to describe what you are looking for. Remind the designer of a project that you liked and how this project might use a similar (or vastly different) approach.&lt;/p&gt;
&lt;h2&gt;4. Keep it Short&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://www.flickr.com/photos/patsch/4397655367/" target="_blank"&gt;
&lt;/a&gt;&lt;/p&gt;&lt;div class="tutorialimage"&gt;&lt;a href="http://www.flickr.com/photos/patsch/4397655367/" target="_blank"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/memos.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://www.flickr.com/photos/patsch/4397655367/" target="_blank"&gt;
&lt;/a&gt;&lt;p&gt;&lt;a href="http://www.flickr.com/photos/patsch/4397655367/" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Bullet points are one of the most effective ways to cover a lot of information in a digestible format. Don’t feel the need to write a manifesto; highlight necessary information and encourage feedback. Edit, edit, edit. If you can say it in 10 words, don’t use 30. Keep sentences short and to the point. Delivering too many messages at once can keep your point from being understood.&lt;/p&gt;
&lt;h2&gt;5. Watch the Jargon&lt;/h2&gt;
&lt;p&gt;In every business, there is a set of lingo that comes with the territory. But does the business lingo translate to the creative team? Avoid uncommon phrasing or too much inside talk when discussing projects or ideas. Remember members of your creative team may not have a background in your specific industry. Using common language and descriptions will help keep everyone communicating on the same page. &lt;/p&gt;
&lt;p&gt;Business catch words such as “strategize,” “utilization” and “expedite” might work better as “plan,” “use” and “speed up.” Stay away from emoticons and casual phrasing as well. “OMG” or “LOL” in an email is likely to cause a serious round of eye rolls from the group and can take away from the seriousness of almost any message.&lt;/p&gt;
&lt;h2&gt;6. Don’t Assume Anything and Explain Specifics&lt;/h2&gt;
&lt;p&gt;Never guess that someone knows what you are talking about. When outlining or explaining new information make sure the designer has a clear idea of where you are coming from. In contract or freelance situations, explain a bit about your company, goals and market. Set a clear outline of what the project and design is supposed to accomplish. Even if a designer has done a similar project in the past, provide an overview of the client or project.&lt;/p&gt;
&lt;p&gt;In most projects, there are some absolutes. Color and typography selections are sometimes items that can’t be changed when looking at design projects. Make sure specifics are clearly communicated. If your company’s logo is blue, for example, state the color values. You will not end up with an odd color and project rework when non-negotiables are determined in advance. In addition to being specific, be accurate and aware of grammar and context. It can only add to your credibility.&lt;/p&gt;
&lt;h2&gt;7. Write with Action&lt;/h2&gt;
&lt;p&gt;Use active words in your message. Start sentences words that engage. Consider structuring a what’s next memo as a to-do list. Tell rather than ask when it comes to things that need to get gone. Rather than “can you make that logo blue to match the company’s website?” say “Add blue to the logo so it is more on target with the design.”&lt;/p&gt;
&lt;h2&gt;8. Take a Walk&lt;/h2&gt;
&lt;p&gt;Sometimes the best written communications also need a push. Get up and pay your designer a visit and take the memo with you. Go over information together and make sure that all the details are clear. Brainstorm for a few minutes to show that you are interested in what the designer has to say. Afterward, make sure to follow up with any new instructions or changes from the initial message.&lt;/p&gt;
&lt;h2&gt;9. All Designers are Different&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://www.flickr.com/photos/topgold/6251050273/" target="_blank"&gt;
&lt;/a&gt;&lt;/p&gt;&lt;div class="tutorialimage"&gt;&lt;a href="http://www.flickr.com/photos/topgold/6251050273/" target="_blank"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/brains.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://www.flickr.com/photos/topgold/6251050273/" target="_blank"&gt;
&lt;/a&gt;&lt;p&gt;&lt;a href="http://www.flickr.com/photos/topgold/6251050273/" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A print ad campaign by Mercedes-Benz exemplified differences in thinking by showcasing the differences in left- and right-brain thinkers. Keep this principle in mind as you write and remember designers tend to employ that loose, colorful, free-flowing style of comprehension and thinking.&lt;/p&gt;
&lt;p&gt;Understand that your message can come across in a variety of ways. Keep the agenda simple and context plain and clear. Don’t try to make jokes or be funny in text; they might not cause your recipient to giggle. Just because designers may communicate in a way that is unlike accountants, don’t dumb things down. Don’t assume that because you are writing for a designer, that he or she won’t “get it;” plenty of designers are also good writers. &lt;/p&gt;
&lt;h2&gt;10. Break the Rules on Purpose&lt;/h2&gt;
&lt;p&gt;Sometimes it is OK to start a sentence with “And.” And sometimes it is an effective writing device. Breaking some of the stodgy rules of communication can make your message feel a little less like a list of directives and more like a written conversation. Every memo or email does not have to follow the business-letter model; sometimes a more casual approach is appreciated. If your message feels too formal, back up for a minute and rewrite: Write as you talk.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Clear communication is key when working with any different number of people, but understanding how the thought processes of designers can differ can help you deliver a clearer message. Remember that many designers and creative personality types think using a different side of the brain than more analytical thinkers and may receive written communications differently. &lt;/p&gt;
&lt;p&gt;Work to establish a clear hierarchy in your message and think about ways to more visually deliver information. Keep messages on task and edited so that information is direct and concise. Finally, make sure to always follow up any written communication with a conversation; direct contact can always go a long way
&lt;br /&gt;&lt;/div&gt;
</description><link>http://kidaworld.blogspot.com/2012/11/10-tips-for-writing-for-designers.html</link><author>noreply@blogger.com (UXAWY)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8363405111659754159.post-5656370776432461069</guid><pubDate>Mon, 12 Nov 2012 13:04:00 +0000</pubDate><atom:updated>2012-11-12T05:04:08.809-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">designer</category><title>How to Sell Your Design Idea</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/sellidea.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;Sometimes getting others to visualize your great idea is not so simple and takes some “selling” on your part. It may even take advance (or free) mock-up work to help some of the non-visual people in the room get on the same page with your idea.&lt;/p&gt;
&lt;p&gt;Here are a few things you can do to help you get your idea on the fast-track to approval and how to really sell your design concept.&lt;/p&gt;
&lt;p&gt;&lt;span id="more-31766"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Show, Rather Than Tell&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://www.flickr.com/photos/unthinkingly/3012285924/" target="_blank"&gt;
&lt;/a&gt;&lt;/p&gt;&lt;div class="tutorialimage"&gt;&lt;a href="http://www.flickr.com/photos/unthinkingly/3012285924/" target="_blank"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/blowNYT.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://www.flickr.com/photos/unthinkingly/3012285924/" target="_blank"&gt;
&lt;/a&gt;&lt;p&gt;&lt;a href="http://www.flickr.com/photos/unthinkingly/3012285924/" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.nytimes.com/" target="_blank"&gt;
&lt;/a&gt;&lt;/p&gt;&lt;div class="tutorialimage"&gt;&lt;a href="http://www.nytimes.com/" target="_blank"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/NYTcom.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://www.nytimes.com/" target="_blank"&gt;
&lt;/a&gt;&lt;p&gt;&lt;a href="http://www.nytimes.com/" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It is easy to talk about an idea, but design is a visual concept. It can also be tough to visualize someone else’s idea or concept. Do some work for the group before you present a new idea. Sketch out a rough layout or put together a mock site. Show the group what colors and fonts you are thinking of using. Make sure to really show the part of the design that is new and fresh. New concepts should be the most developed in your visual presentation.&lt;/p&gt;
&lt;p&gt;Don’t, though, spend too much time on your “dummy” project. Remember not all of your ideas will be adopted and you don’t want to lose too many work hours on a mock-up. Put together a clean, simple mock for the presentation; you don’t need a full-blown “finished” project to share.&lt;/p&gt;
&lt;p&gt;Know your audience. Is the group made of other visual people? Understand whether a sketch is enough to explain a concept or whether you need to develop a more tangible concept. Make sure to bring plenty of copies (or show your design on a screen) so that everyone has access to the visual presentation.&lt;/p&gt;
&lt;h2&gt;Proven Track Record&lt;/h2&gt;
&lt;p&gt;One of the best ways to gain credibility and push new ideas is to prove yourself as a designer every day. Doing quality work and having a proven track record at your company or among clients is one of the best sales tools you can have.&lt;/p&gt;
&lt;p&gt;There is no shame in showcasing some of your most successful projects when tackling a new task. As part of your pitch presentation, spend just a few minutes discussing other projects that you developed and why they were successful. Show off a design example or two and explain why it worked. &lt;/p&gt;
&lt;p&gt;Display confidence and loyalty. You must believe in your work for others to do the same. &lt;/p&gt;
&lt;h2&gt;Recruit&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://www.flickr.com/photos/andrewkelsall/4259116411/" target="_blank"&gt;
&lt;/a&gt;&lt;/p&gt;&lt;div class="tutorialimage"&gt;&lt;a href="http://www.flickr.com/photos/andrewkelsall/4259116411/" target="_blank"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/kelsall.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://www.flickr.com/photos/andrewkelsall/4259116411/" target="_blank"&gt;
&lt;/a&gt;&lt;p&gt;&lt;a href="http://www.flickr.com/photos/andrewkelsall/4259116411/" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Develop positive relationships and create open lines of communication with everyone you associate with professionally. (It does not hurt to keep this in mind in your personal life as well; in the age of social media so many lines can cross unintentionally.) You are our own commodity in the design business and need to recruit other professionals who trust in your ability.&lt;/p&gt;
&lt;p&gt;Show your sketches to trusted peers in advance and take the suggestions into account. By working in advance and collecting other opinions, others will feel like they have had an impact on the design and are more likely to buy in to a concept.&lt;/p&gt;
&lt;p&gt;This network will help you sell your ideas as personal backers. They know you and your work. They understand your work ethic and can vouch for your creativity. A strong circle of “recruiters” can open the way for you to work with new people and land projects that you might not have had access to otherwise.&lt;/p&gt;
&lt;p&gt;Don’t wait to network. Start building relationships even when you are not in the middle of a project. Keep your portfolio up-to-date and always mention current projects when you meet with past clients. You never know when a passing meeting could send a new project your way.&lt;/p&gt;
&lt;h2&gt;Present Options&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://www.flickr.com/photos/philmanker/5182737796/" target="_blank"&gt;
&lt;/a&gt;&lt;/p&gt;&lt;div class="tutorialimage"&gt;&lt;a href="http://www.flickr.com/photos/philmanker/5182737796/" target="_blank"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/manker.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://www.flickr.com/photos/philmanker/5182737796/" target="_blank"&gt;
&lt;/a&gt;&lt;p&gt;&lt;a href="http://www.flickr.com/photos/philmanker/5182737796/" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Design is a concept-based business. There are no definite answers when presenting visuals. Sometimes the best way to sell your idea is to present multiple variations of it.&lt;/p&gt;
&lt;p&gt;Show that your concept is flexible and that changes are easily adapted. Instead of bringing just a single sketch to a pitch meeting bring multiple options. There is no magic number, but three different design choices is a good starting point. Although the options do not have to be vastly different, make sure the changes are obvious. You want the options to look like options and not just slight tweaks to a single design.&lt;/p&gt;
&lt;p&gt;Discuss how other changes would work with your design and promote its flexibility. How would other colors or fonts work with the concept? How would you incorporate a much larger or smaller logo? For web design projects also explain how the design will work for other applications: Will it translate to mobile or tablet design? &lt;/p&gt;
&lt;h2&gt;Accept Criticism and Suggestions&lt;/h2&gt;
&lt;p&gt;It can be hard to hear criticism about your design but understand that comes with the territory when you are working in a field without absolutes. Graciously accept constructive criticism and suggestions even if you don’t agree with what you are hearing. People generally want to work with other people who can collaborate. Combative words will not help you gain respect and trust when taking on a new project.&lt;/p&gt;
&lt;p&gt;Accept new ideas and discuss the pros and cons as they relate to the project. Understand that the client must be happy with the final result. If suggestions are not something you can work with and implement, you must decide if they project is something that you should take on.&lt;/p&gt;
&lt;h2&gt;Patience&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://www.flickr.com/photos/nirak/3574129389/" target="_blank"&gt;
&lt;/a&gt;&lt;/p&gt;&lt;div class="tutorialimage"&gt;&lt;a href="http://www.flickr.com/photos/nirak/3574129389/" target="_blank"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/karindalziel.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://www.flickr.com/photos/nirak/3574129389/" target="_blank"&gt;
&lt;/a&gt;&lt;p&gt;&lt;a href="http://www.flickr.com/photos/nirak/3574129389/" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Finally, you might have to wait and revise and wait and revise. Very few final designs look like that first sketch. Understand that sometimes the process can take time. Be patient and work to make revisions or changes. Some projects require many layers of approval. Give the project time to get through the cycle before you give up. Make follow-up calls or send quick emails to track the project’s progress.&lt;/p&gt;
&lt;p&gt;Be patient with other projects. Don’t try to push the design envelope with every task you are assigned. Remember the boy who cried wolf? If you cry redesign on every project, you will not be taken as seriously when you have a concept that really works. Push for something new and unique when it is called for, but also know when to hold back.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Having an idea for a great design is not enough. For that concept to see the light of day, you have to sell it.&lt;/p&gt;
&lt;p&gt;Be ready to show off your concept to potential internal or external clients, present design options for review and be patient on the way to success. Remember that not every project needs to be started from scratch and you have to show solid work before you get to tackle new things. Establish strong networks and a proven track record with your work so that your design projects will be accepted for publication.&lt;/p&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://kidaworld.blogspot.com/2012/11/how-to-sell-your-design-idea.html</link><author>noreply@blogger.com (UXAWY)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8363405111659754159.post-4699900025053092199</guid><pubDate>Mon, 12 Nov 2012 13:02:00 +0000</pubDate><atom:updated>2012-11-12T05:02:49.189-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">designer</category><title>10 Things to Learn From Failure</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/10failure.jpg" width="510" /&gt;&lt;/div&gt;
We’ve all had them – the dreaded unsuccessful or failed project – and we’ve all had to bounce back. From graphics busts to web disasters, some good can come from projects you’d rather forget. Even big companies, such as Gap with a logo change and subsequent reversal in early 2011, have had to deal with design snafus. &lt;br /&gt;
Start the recovery process by taking a minute to figure out what went wrong and then make a resolution to gain something from the process. Learn how to improve yourself, your team and your next project. Although you should not dwell on it too long, here are 10 things you can learn from failed projects.&lt;br /&gt;
&lt;span id="more-32116"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;i&gt;Like the article? Be sure to subscribe to our &lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159"&gt;RSS feed&lt;/a&gt; and follow us on &lt;a href="http://twitter.com/designshack" target="_blank"&gt;Twitter&lt;/a&gt; to stay up on recent content.&lt;/i&gt;&lt;br /&gt;
&lt;h2&gt;
1. Accept Credit and Criticism&lt;/h2&gt;
It is usually easy to take credit for projects that turn out as planned but a little tougher to accept the critical comments that come with failure. How you handle these conversations will build the framework for your next project with the same client. Smile and accept criticism with the same poise you would handle credit. &lt;br /&gt;
If a project fails, ask for feedback. Understanding what did not work and why can help you develop as a designer and improve your skills for the next project.&lt;br /&gt;
&lt;h2&gt;
2. Determine What Went Wrong&lt;/h2&gt;
Make a short list of both things that worked and those that did not over the course of a project. Can you pinpoint where things went wrong? Was the timeline too short? Were the parameters or client’s wishes unclear?&lt;br /&gt;
Sometimes there is no clear answer here and you just have to move on. Further, design can be very much a matter of taste and sometimes a designer and client fail to get on the same page with a project. You could consider the project some of your best work while it does not meet the client’s needs at all.&lt;br /&gt;
&lt;h2&gt;
3. Communication is Key&lt;/h2&gt;
&lt;a href="http://www.flickr.com/photos/shoesfullofdust/3803571395/" target="_blank"&gt;
&lt;/a&gt;
&lt;div class="tutorialimage"&gt;
&lt;a href="http://www.flickr.com/photos/shoesfullofdust/3803571395/" target="_blank"&gt;&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/sketch1.jpg" width="510" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a href="http://www.flickr.com/photos/shoesfullofdust/3803571395/" target="_blank"&gt;
&lt;/a&gt;
&lt;a href="http://www.flickr.com/photos/shoesfullofdust/3803571395/" target="_blank"&gt;&lt;/a&gt;&lt;br /&gt;
Start each project by building a relationship with everyone involved. Make sure to keep communication channels open so that all ideas are discussed and understood among everyone working on the project. Make your clients know your work style and have seen some of your previous projects before you get started. Discuss both parties’ needs and make sure your styles gel before you start a project.&lt;br /&gt;
Often when projects don’t come together, you can track some of the issue back to lack of understanding and communication. Think about how information was communicated during each phase of an unsuccessful project: Were all the details clearly stated?&lt;br /&gt;
Use all the tools at your disposal – email, visuals and make sure to get away from your desk and talk to clients face-to-face. Show them how the project is coming along before you get to the final product.&lt;br /&gt;
&lt;h2&gt;
4. The Client is Always Right&lt;/h2&gt;
Projects-for-pay are not about your ego. To ensure success, you must build/design what is wanted by someone else. You may have the better eye for what looks best, but you can’t always be right. You can explain why something works but in the end, concede to the client’s wishes.&lt;br /&gt;
&lt;h2&gt;
5. Revise, Revise, Revise&lt;/h2&gt;
&lt;a href="http://blakeallendesign.com/" target="_blank"&gt;
&lt;/a&gt;
&lt;div class="tutorialimage"&gt;
&lt;a href="http://blakeallendesign.com/" target="_blank"&gt;&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/ballen1.jpg" width="510" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a href="http://blakeallendesign.com/" target="_blank"&gt;
&lt;/a&gt;
&lt;div class="tutorialimage"&gt;
&lt;a href="http://blakeallendesign.com/" target="_blank"&gt;&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/ballen2.jpg" width="510" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a href="http://blakeallendesign.com/" target="_blank"&gt;
&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://blakeallendesign.com/" target="_blank"&gt;&lt;/a&gt;&lt;br /&gt;
Like Rome, good design is not built in a day. Rarely does your first sketch look like a finished project. Continue working and evaluating. Many times failed projects end up falling apart because of time constraints, tight or missed deadlines and the lack of revision that results from the two. &lt;br /&gt;
Provide clients with multiple options for a project design. Working up only one idea will put you in a like it or leave it situation; you are likely to find more success with several plans.&lt;br /&gt;
Look at the subtle, but noticeable, differences in versions of the Blake Allen Design website. Items such as logo and branding are static (in design but not size) while things such as use of color vary. The site also changed from more of a minimalist theme with lots of open spaces to a more filled, symmetrical layout.&lt;br /&gt;
&lt;h2&gt;
6. Manage Your Time&lt;/h2&gt;
Time management is one of the most important skills you will develop. Think of it this way. You just finished a project you loved and the client loved but you spent three times the allotted schedule on it. As a freelancer, you would have failed because you spent a disproportionate time-to-fee ratio. In other words, you aren’t making money on the project.&lt;br /&gt;
Look at how you spent your hours. Track your time by logging what you are doing and how long it takes. What you may discover is that you are underestimating your time to complete a project of that you got distracted by other things while working – Facebook, email and Twitter are common culprits. Use this information to replan your work habits. &lt;br /&gt;
&lt;h2&gt;
7. Beat Deadlines&lt;/h2&gt;
&lt;a href="http://www.flickr.com/photos/betchaboy/5384353972/" target="_blank"&gt;
&lt;/a&gt;
&lt;div class="tutorialimage"&gt;
&lt;a href="http://www.flickr.com/photos/betchaboy/5384353972/" target="_blank"&gt;&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/deadline.jpg" width="510" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a href="http://www.flickr.com/photos/betchaboy/5384353972/" target="_blank"&gt;
&lt;/a&gt;
&lt;a href="http://www.flickr.com/photos/betchaboy/5384353972/" target="_blank"&gt;&lt;/a&gt;&lt;br /&gt;
Finish early. Give clients a preview of what you are working on. Plan some time in for additional changes.&lt;br /&gt;
By beating deadlines, you can eliminate the element of surprise that comes with turning in an unseen project at the last minute. You are giving yourself more leeway to retool certain elements, such as colors, fonts or even overall makeup. Revise, revise, revise (see No. 5).&lt;br /&gt;
&lt;h2&gt;
8. Research More&lt;/h2&gt;
Part of your design work isn’t really design at all. Did you fully understand your project before drawing out the first sketches? Did you grasp what the client envisioned?&lt;br /&gt;
Do your homework. Read about your client. Look at their past published design projects. What were the themes, color schemes and font selections? Did the client like the result or do they want a dramatic change? Find out why. Understanding where they have been with their look can help you understand what direction is sought during your project.&lt;br /&gt;
&lt;h2&gt;
9. Push the Limits&lt;/h2&gt;
People and businesses can get comfortable in what they know. The same is true for designers. It is likely that your work has a signature item – a look, a color or an effect. Push yourself to try something new. &lt;br /&gt;
But also do the same for the client. They chose you to do the work for a reason. Work with the client to help them also select a visual that is a little more edgy than they are used to. Create visuals that are not replicas of past projects while maintaining consistent elements that identify branding and identity. &lt;br /&gt;
Calculated design risks can pay off but they are also called risks for a reason. Understand the potential benefits and costs from the start. Pushing a client too far can result in a damaged or even broken relationship. Pushing each others’ limits should be a collaborative process. But don’t be pushy with an idea that you are unwilling to change or develop further.&lt;br /&gt;
&lt;h2&gt;
10. Try Again&lt;/h2&gt;
Sometimes we just fail. The reasons may be many, or few or unknown. Accept it. Move on.&lt;br /&gt;
Salvage what you can for the next project. Sometimes you create something that gets thrown out in the revision process (or altogether in some cases) and it would have a great use elsewhere. Did you develop a great color palette or set of style sheets for a website? File those items away for use later. There is no point in starting from scratch again when you have some of the parts right there that might work in your next project.&lt;br /&gt;
&lt;h2&gt;
Conclusion&lt;/h2&gt;
Don’t get too discouraged when a project does not work out. Failure is a part of everything and no matter how many successes you have, at some point you will encounter face dealing with an unsuccessful design project.&lt;br /&gt;
Try to take lessons away that will make your next project more successful. Getting feedback and setting aside a little time for personal and design evaluation can help you with the next project. Don’t argue or dwell on mistakes or matters of taste. Focus on the things you can change and do better the next time around.&lt;br /&gt;
How do you deal with failure? Share your tips for learning from it with us.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://kidaworld.blogspot.com/2012/11/10-things-to-learn-from-failure.html</link><author>noreply@blogger.com (UXAWY)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8363405111659754159.post-6082703130069896459</guid><pubDate>Mon, 12 Nov 2012 13:02:00 +0000</pubDate><atom:updated>2012-11-12T05:02:16.004-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">design</category><title>Interesting Trends in UI Design</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/ds-ui-trends-0.jpg" width="510" /&gt;&lt;/div&gt;
I’m always on the lookout for new design trends. It’s fascinating to me how certain ideas get picked up by so many designers and implemented in countless different ways. &lt;br /&gt;
Today we’re going to specifically explore the world of user interface design and see if we can spot any currently popular trends. Almost more than any other area of design, interfaces are extremely subject to the ever changing whims of designers and if you’re not in the loop, you could find yourself creating UI that feels outdated. Read on to see what’s trending!&lt;br /&gt;
&lt;span id="more-32057"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2&gt;
Are Trends Good Or Bad?&lt;/h2&gt;
People typically read trends posts in one of two ways: as a list of examples of things to try or as a list of clichés to avoid. Which is the correct way? If something is a trend, does that mean it’s good or bad?&lt;br /&gt;
My answer is that trends in general are fairly neutral. They’re not necessarily intrinsically good or bad, they simply represent what lots of people think is cool at the moment. That being said, trends often reach the point where they’re so overused that they leave a bad taste in your mouth. &lt;br /&gt;
For this reason, I always recommend that every designer constantly look around and take note of what’s currently popular in design. Being familiar with these constructs will make it easier to do your job, whether you’re looking to fit in with the crowd or do something completely unique (you have to know what isn’t unique to create something that is).&lt;br /&gt;
With that in mind, let’s check out those trends!&lt;br /&gt;
&lt;h2&gt;
iOS Inspired Everything&lt;/h2&gt;
It’s difficult to say that Apple’s iOS platform “owns” a certain aesthetic, but generally the hard working developers behind the great iPhone and iPad apps we all know and love have carved out a pretty specific visual style, perhaps led by Apple, or perhaps Apple is following the third party guys.&lt;br /&gt;
Regardless, from rethought widescreen multi-column layouts to what some have deemed an overly skeuomorphic aesthetic, you can typically identify an iOS interface when you see one. At least that’s how it used to be. With Lion and the upcoming Mountain Lion, Apple has been integrating similar visual ideas into OS X, and they’re certainly not the only ones jumping on the idea of bringing this style to desktop UI design.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;a href="http://dribbble.com/shots/488059-Skindler-web-UI"&gt;&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/ds-ui-trends-1.jpg" width="510" /&gt;&lt;/a&gt;&lt;/div&gt;
The gorgeous Dribbble shot from &lt;a href="http://dribbble.com/shots/488059-Skindler-web-UI"&gt;Robert van Klinken &lt;/a&gt; above is a perfect example. Given the design of the buttons and the use of stitching, I would swear this was an iPad app. However, it’s actually a design for a web-based productivity app for desktop computers.&lt;br /&gt;
Even if we take a step back from the faux realism style, there are plenty of other examples of Apple-inspired web application UIs. The shot below from &lt;a href="http://dribbble.com/shots/181671-Project-Collaboration-App"&gt;Pontus Johansson&lt;/a&gt; is similar to the increasingly subtle gradients in Finder windows and app chromes from OS X. &lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;a href="http://dribbble.com/shots/181671-Project-Collaboration-App"&gt;&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/ds-ui-trends-2.jpg" width="510" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h2&gt;
Wooden Backgrounds&lt;/h2&gt;
This one is by no means new, Garage Band showcased a sort of wooden texture ages ago and I’m sure there are plenty of other examples before that. However, this trend is definitely at the height of its popularity. In fact, it’s probably the closest thing 2012 has to the overused glossy web 2.0 look from a few years ago.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/ds-ui-trends-3.jpg" width="510" /&gt;&lt;/div&gt;
&lt;i&gt;Designers: &lt;a href="http://dribbble.com/shots/344357-2012-Web-App-Draft-002"&gt;Ix Techau&lt;/a&gt;, &lt;a href="http://dribbble.com/shots/227927-Tasks"&gt;Pontus Johansson&lt;/a&gt;&lt;/i&gt;, &lt;a href="http://dribbble.com/shots/380120-Web-app-UI"&gt;Pavel Maček&lt;/a&gt;, &lt;a href="http://dribbble.com/shots/398764-Options-Tray"&gt;Levi Wintering&lt;/a&gt;, and &lt;a href="http://dribbble.com/shots/292142-Web-App-Dashboard-Profile"&gt;Max Schwartz&lt;/a&gt;.&lt;br /&gt;
The long and short of it: wood is the UI texture of choice at the moment (though linen/canvas textures are also extremely popular). You’ll see it in iOS apps, Mac apps, web apps, Android apps; everywhere. One of the things feeding this tendency is the widespread availability of really fantastic and free textures. &lt;br /&gt;
Much of this started with a &lt;a href="http://dribbble.com/shots/31901-Hand-Crafted-Wood-Texture"&gt;Matthew Skiles&lt;/a&gt; shot that was uploaded to Dribbble way back in July of 2010. It was beautiful, detailed and free to use in any project without attribution.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;a href="http://dribbble.com/shots/31901-Hand-Crafted-Wood-Texture"&gt;&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/ds-ui-trends-4.jpg" width="510" /&gt;&lt;/a&gt;&lt;/div&gt;
The result was quite a few apps picking this up for their interfaces, which led to others releasing similar free textures and those being picked up by interface designers, and the cycle is still continuing two years later! Do I think this trend is overused? You bet. Have I jumped on board myself? &lt;a href="http://dribbble.com/shots/420597-Seamless-Wood-Texture"&gt;Of course!&lt;/a&gt;&lt;br /&gt;
&lt;h2&gt;
Retro Interfaces&lt;/h2&gt;
All the trends that we’ve pointed out so far seem to be taking the “realism” perspective of making software interfaces feel like real world physical interfaces. Within this tendency, there are sever sub-niches as well, the most drooled over of which tends to be anything retro.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/ds-ui-trends-5.jpg" width="510" /&gt;&lt;/div&gt;
&lt;i&gt;Designers: &lt;a href="http://dribbble.com/shots/187742-SnoozeFail-Main-v2"&gt;Callum Chapman&lt;/a&gt;, &lt;a href="http://dribbble.com/shots/127434-iPhone-App-UI"&gt;Mike | Creative Mints&lt;/a&gt;, &lt;a href="http://dribbble.com/shots/296729-Retro-Radio"&gt;Gökhan Kurt&lt;/a&gt;, and &lt;a href="http://dribbble.com/shots/200734-Audio-Equipment-UI"&gt;Gianluca Divisi&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;
Designers absolutely love rebuilding the devices from decades past using pixels. There are definitely ups and downs within this area of UI. Some of the interfaces end up feeling rushed and clunky, with the retro aspect being more of an annoying hindrance than something that actually furthers the experience.&lt;br /&gt;
That being said, some retro interfaces are flat out delightful to use. Here the retro component is the key aspect to the enjoyable nature of the application. For instance, in the Mac app “&lt;a href="http://itunes.apple.com/us/app/instant/id482262245?mt=12"&gt;Instant&lt;/a&gt;“, you drag your photos to an old Polaroid camera, which then spits out the photo while you wait for it to “develop” just like in the old days. It’s not ideal for normal photo processing but for making retro Polaroid shots, it’s super fun.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;a href="http://itunes.apple.com/us/app/instant/id482262245?mt=12"&gt;&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/ds-ui-trends-6.jpg" width="510" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h2&gt;
Notification Boxes&lt;/h2&gt;
I’m always fascinated when a basic shape suddenly takes off and becomes popular. In a &lt;a href="http://designshack.net/articles/layouts/popular-web-design-trends-in-2011-over-50-inspiring-examples/"&gt;post from last year&lt;/a&gt;, we looked at how ribbon shapes were taking over the web. These days, I’m seeing tons and tons of this shape, which I’ll refer to as a notification box for lack of a better term.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/ds-ui-trends-7.jpg" width="510" /&gt;&lt;/div&gt;
As you can see, it’s basically just a box with a triangle popping out of it. The triangle helps tie the contents of the box to a form, button or other piece of content and can be located on any edge of the box. Don’t believe me that this shape is suddenly super popular? Here are a few examples that I found in about two minutes of searching. &lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/ds-ui-trends-8.jpg" width="510" /&gt;&lt;/div&gt;
&lt;i&gt;Designers: &lt;a href="http://dribbble.com/shots/76599-Contextual-menus-for-Miro-4-OSX-app-interface-UI-UX-"&gt;Morgan Allan Knutson &lt;/a&gt;, &lt;a href="http://dribbble.com/shots/376200-Calendar-UI"&gt;Jason Wu &lt;/a&gt;, &lt;a href="http://dribbble.com/shots/309067-Share-Social-icons-for-Pokki-website-UI"&gt;Justalab&lt;/a&gt;  and &lt;a href="http://dribbble.com/shots/190352-Me-Dark-Ui-Form-elements"&gt;Mikael Eidenberg &lt;/a&gt;&lt;/i&gt;&lt;br /&gt;
I can’t seem to locate it now, but I even saw an little web app the other day that allows users to customize and generate this shape in pure HTML and CSS. It’s funny how little things like this catch on and suddenly you see them everywhere. &lt;br /&gt;
&lt;b&gt;Update:&lt;/b&gt; The aforementioned site is &lt;a href="http://cssarrowplease.com/"&gt;CSSArrowPlease&lt;/a&gt;. Thanks to commenter Jack for pointing this out!&lt;br /&gt;
&lt;h2&gt;
Snow White UI&lt;/h2&gt;
The “minimal” movement is alive and well in the UI world, with many designers taking the route of going almost completely colorless and instead opting for a completely light gray or white color scheme. &lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/ds-ui-trends-9.jpg" width="510" /&gt;&lt;/div&gt;
&lt;i&gt;Designers: &lt;a href="http://dribbble.com/shots/375062-Simple-UI-Kit"&gt;Matt Gentile&lt;/a&gt;, &lt;a href="http://dribbble.com/shots/502427-Anarchy-UI-Kit"&gt;Daryl Ginn&lt;/a&gt;, &lt;a href="http://dribbble.com/shots/98897-Chutzpah-UI-Design-Kit-free-resource-"&gt;Morgan Allan Knutson&lt;/a&gt;, &lt;a href="http://dribbble.com/shots/445278-Ui-Parade-Modal"&gt;Norm&lt;/a&gt;
&lt;/i&gt;&lt;br /&gt;
As you can see in the examples above, buttons and form elements are prime territory for this trend. Subtle gradients, single pixel outlines and shadows that are often inset define the aesthetic. The result is a very light, airy experience that feels fairly formal. &lt;br /&gt;
It’s also interesting to note the ever increasing popularity of &lt;a href="http://designshack.net/articles/freebies/weekly-freebies-20-fantastic-free-psd-ui-kits/"&gt;UI kits&lt;/a&gt;. I’m not sure who the first person was to toss a bunch of UI elements into a free download, but the idea has certainly caught on and continues to be a favorite of freebie finders everywhere. &lt;br /&gt;
&lt;h2&gt;
What Trends Have You Seen In UI Design?&lt;/h2&gt;
This collection is a completely random scattering of ideas that I’ve been seeing a lot lately. I’m sure I’ve missed a ton of other popular trends that UI designers are jumping onto and I’d love to hear your feedback.&lt;br /&gt;
What types of design have you been seeing a lot of recently? Do you also find that the minimalism of a few years ago (e.g., Google) has led to a dramatic response of realistic interfaces like those coming from the Apple iOS/OS X camp? Leave a comment and let us know!&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://kidaworld.blogspot.com/2012/11/interesting-trends-in-ui-design.html</link><author>noreply@blogger.com (UXAWY)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8363405111659754159.post-3076238144173618250</guid><pubDate>Mon, 12 Nov 2012 13:01:00 +0000</pubDate><atom:updated>2012-11-12T05:01:31.571-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">designer</category><category domain="http://www.blogger.com/atom/ns#">freelance</category><title>The Freelancer’s Secret to Learning Any New Skill</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/troublelearning-0.jpg" width="510" /&gt;&lt;/div&gt;
As a designer, developer and all around creative person, there are some skills that likely came very naturally to you. The learning experience just sucked you in and you enjoyed yourself enough that you picked up this new talent in an impressively brief timespan.&lt;br /&gt;
Other skills however, prove to be more difficult. Sometimes you can feel like your brain is simply full and that there’s no more room for this old dog to learn a new trick. How do you overcome this mental block and force yourself to learn that new skill you’ve been wanting to pick up? There’s a secret that many freelancers know well that is a sure fire way to learn almost anything new in your given field. Read on to see what it is!&lt;br /&gt;
&lt;span id="more-31948"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2&gt;
The Problem&lt;/h2&gt;
&lt;div class="tutorialimage"&gt;
&lt;a href="http://www.bigstockphoto.com/image-13493066/stock-photo-creativity-problems"&gt;&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/troublelearning-1.jpg" width="510" /&gt;&lt;/a&gt;&lt;/div&gt;
Let’s say you’re a great designer and have some impressive HTML/CSS chops, but can’t write a line of JavaScript to save your life. “No problem” you think, “I learned all of that other stuff, I can do this!”&lt;br /&gt;
So you fire up Lynda.com, start watching some video tutorials, and then remember that you should definitely tweet about how great Lynda is for learning new stuff, which leads to a solid hour of messing around on Twitter because, let’s face it, those videos had you bored out of your mind.&lt;br /&gt;
No matter, what you really need is a book. A good old paper and ink lesson doesn’t have all the distractions of your computer. So you head to Amazon, buy the best manual you can find, then take a break for a few days while you wait for it to arrive. When it does arrive, you block out a few hours, find a nice comfy chair in a quiet spot, crack open the book, then awake an hour later to find your face cemented to the pages with drool. &lt;br /&gt;
What’s the matter with you? Have you suddenly become educationally incompetent? Why was learning so easy at the start of your career and so difficult now? Should you keep searching for alternative learning techniques or does the problem lie elsewhere?&lt;br /&gt;
&lt;h2&gt;
But I’m Normally So Productive!&lt;/h2&gt;
&lt;div class="tutorialimage"&gt;
&lt;a href="http://www.bigstockphoto.com/image-20319509/stock-photo-male-hands-typing-on-a-laptop"&gt;&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/troublelearning-2.jpg" width="510" /&gt;&lt;/a&gt;&lt;/div&gt;
For me, and I’m sure a ton of others, the problem in situations like these turned out not to be so much the method of education as the circumstances surrounding the education.&lt;br /&gt;
I’m a workaholic who juggles at least three jobs at any given time, often several more. At work, I strive on stress and leverage my psychological need to meet deadlines at all costs to stay productive. If we remove that stress from the equation, I’m not really the same person. &lt;br /&gt;
When I’m casually attempting to learn something in my free time, I don’t feel pressured to produce. Consequently, I’m prone to distraction, procrastination, and all other manner of avoidance that leads to my ultimate frustration at my inability to pick up a new skill. This effect is exponentially worsened by all of that work-related stress, which leads me to drop the education attempt in favor of simply using my free time to work more.&lt;br /&gt;
&lt;h2&gt;
Necessity Is The Mother of Education&lt;/h2&gt;
&lt;div class="tutorialimage"&gt;
&lt;a href="http://www.bigstockphoto.com/image-13176416/stock-photo-educational-theme:-tired-student-in-a-classroom"&gt;&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/troublelearning-3.jpg" width="510" /&gt;&lt;/a&gt;&lt;/div&gt;
I recently had a revelation regarding my ideal environment for learning. It all started with a job offer. Someone approached me and asked me to take on a huge project that involved producing over a dozen professional quality videos.&lt;br /&gt;
Let’s be clear, I’m a designer and a photographer, but I’m definitely not a video guy. I’ve always been fascinated by the lure of video, but have never really had the time to jump in and  master the art. In fact, I had never really done any video work at all, even on a personal, home movie level. I know there’s a “record” button on my beloved 5D Mark II, but I had never used it.&lt;br /&gt;
The time requirements for this project were beyond what I could really commit to, the deadline was sooner than I wanted it to be and the requisite skills were way out of my ballpark. I literally had no idea how I would deliver what they were asking me to produce. My answer: “Sure! I’d love to!”&lt;br /&gt;
&lt;h3&gt;
The Missing Ingredient&lt;/h3&gt;
&lt;div class="tutorialimage"&gt;
&lt;a href="http://www.bigstockphoto.com/image-166246/stock-photo-flasks-in-laboratory"&gt;&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/troublelearning-4.jpg" width="510" /&gt;&lt;/a&gt;&lt;/div&gt;
Right away I found that I was in over my head. I quickly realized that I needed more equipment than a camera (microphones, backdrops, lights, etc.), and that getting the setup that I wanted would be costly, time consuming and frustrating. I also realized that I didn’t possess the software necessary for such a feat, nor did I have any experience with any video editing software. In short, I was screwed. My stress indicators lit up like a Christmas tree. &lt;br /&gt;
And there it was. My secret serum for education was finally present. Faced with the fact that I had promised to deliver a product, I realized that I had given myself no out, no room for slacking off or getting distracted. The situation I had created was strictly sink or swim. I was staking my reputation with some important people on this project so I took the only available course of action that I could see: I worked my butt off. &lt;br /&gt;
I did a ton of research, decided on some equipment, created a project outline, filmed what I needed to film and spent ages on an outdated Mac that’s horrible for video, chopping it all up and piecing it together in between spinning beach balls and progress bars. Eventually, I had my first video. The process was brutal, but I had done it. The fruits of my labor were clear as day. That little victory was so incredibly encouraging that I pressed on. Video two was even easier! After that, I really hit my stride and things became much smoother. &lt;br /&gt;
&lt;h2&gt;
The Secret To Learning Anything&lt;/h2&gt;
&lt;div class="tutorialimage"&gt;
&lt;a href="http://www.bigstockphoto.com/image-7265957/stock-photo-secret"&gt;&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/troublelearning-5.jpg" width="510" /&gt;&lt;/a&gt;&lt;/div&gt;
The moral of this story is clear: if I want to learn something, the best way for me to do it is to get a job doing it. Looking back over my career, I could suddenly see that literally all of my notable skills had evolved along similar lines.&lt;br /&gt;
I landed an amazing print design gig at the age of 18, despite the fact that I didn’t know how design worked in the least. I had to learn, and quick, so I did. Similarly, I wasn’t able to make the jump to web design and coding until I landed a job that required me to pick it up. Photography was the same, I knew how to take a picture but didn’t really understand my camera on a deep level or learn about professional post-processing workflows until a friend asked me to help him shoot a few weddings. &lt;br /&gt;
I would wager that I’m not the only one who tends to learn under duress better than in a casual, no-stress environment. Even formal education applies these constructs through homework with tight deadlines and difficult testing procedures. In college I pulled a 4.0 not because I was particularly smart, but because I felt pressured to do get my work done to the best of my ability. &lt;br /&gt;
&lt;h2&gt;
Find a Gig That Challenges You&lt;/h2&gt;
&lt;div class="tutorialimage"&gt;
&lt;a href="http://www.bigstockphoto.com/image-5307117/stock-photo-man-looking-at-computer-in-desperation"&gt;&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/troublelearning-6.jpg" width="510" /&gt;&lt;/a&gt;&lt;/div&gt;
My message here is simple: if you want to learn something new, find someone who will pay you to do it and commit to a deadline. Nothing will push you to greatness quite like the fear of failure and embarassment. &lt;br /&gt;
It’s probably one of the more intense methods of self-forced learning that you can find, but you’ll find that once you pull it off, you’ll have an immense amount of pride in what you were able to produce, not to mention an awesome new bullet point for the skills section of your resume!&lt;br /&gt;
&lt;h3&gt;
Results May Very&lt;/h3&gt;
I fully realize that it’s not possible to paint every creative on the planet with such a broad stroke. There are no doubt plenty of people out there who fold up like origami under stress and are more prone to miss the deadline and/or drop the project than complete it.&lt;br /&gt;
Though I question your choice of profession if this describes you, I do think you can be helped by my story as well. Focus on the part where I examined the situations from my past where I was able to pick up a new skill and looked for a common thread. Perform this analysis on your own skill set. The circumstances that successfully worked for you in the past will likely work again, you just have to manufacture a similar situation. Your goal is merely to find your particular learning style and exploit it. Mine is a crazy kamikaze death dive where I pull out at the last second and somehow walk away unscathed and better for the experience, yours might be something much more relaxed and stress-free. Though I do recommend that you give my way a shot at least once, because it really is quite effective. &lt;br /&gt;
&lt;h2&gt;
How Do You Learn Best?&lt;/h2&gt;
There you have it, I have single handedly broken down the wall standing between you and expanding your collection of professional skills. You’re welcome. &lt;br /&gt;
On a serious note, I’d love to hear what you think about all this. Do you find that the best way to learn a new skill is to take on a job that requires it? Why or why not?&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://kidaworld.blogspot.com/2012/11/the-freelancers-secret-to-learning-any.html</link><author>noreply@blogger.com (UXAWY)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8363405111659754159.post-9084225522242730903</guid><pubDate>Mon, 12 Nov 2012 13:00:00 +0000</pubDate><atom:updated>2012-11-12T05:00:18.992-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">css</category><title>The 30 CSS Selectors you Must Memorize</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
1. &lt;/div&gt;
*&lt;br /&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;*&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&lt;span class="keyword"&gt;margin&lt;/span&gt;:&amp;nbsp;0;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&lt;span class="keyword"&gt;padding&lt;/span&gt;:&amp;nbsp;0;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;* {
 margin: 0;
 padding: 0;
}
&lt;/pre&gt;
Let’s knock the obvious ones out, for the beginners, before we move onto the more advanced selectors.&lt;br /&gt;
The star symbol will target every single element on the page. Many developers will use this trick to zero out the &lt;code&gt;margin&lt;/code&gt;s and &lt;code&gt;padding&lt;/code&gt;. While this is certainly fine for quick tests, I’d advise you to never use this in production code. It adds too much &lt;i&gt;weight&lt;/i&gt; on the browser, and is unnecessary.&lt;br /&gt;
The &lt;code&gt;*&lt;/code&gt; can also be used with child selectors.&lt;br /&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;&lt;span class="colors"&gt;#contai&lt;/span&gt;ner&amp;nbsp;*&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&lt;span class="keyword"&gt;border&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;1px&lt;/span&gt;&amp;nbsp;&lt;span class="string"&gt;solid&lt;/span&gt;&amp;nbsp;&lt;span class="string"&gt;black&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;#container * {
 border: 1px solid black;
}
&lt;/pre&gt;
This will target every single element that is a child of the &lt;code&gt;#container&lt;/code&gt; &lt;code&gt;div&lt;/code&gt;. Again, try not to use this technique very much, if ever.&lt;br /&gt;
&lt;h5&gt;
 &lt;a href="http://d2o0t5hpnwv4c1.cloudfront.net/840_cssSelectors/selectors/star.html" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','d2o0t5hpnwv4c1.cloudfront.net']);"&gt;View Demo &lt;/a&gt;&lt;/h5&gt;
&lt;h3&gt;
 Compatibility&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;IE6+&lt;/li&gt;
&lt;li&gt;Firefox&lt;/li&gt;
&lt;li&gt;Chrome&lt;/li&gt;
&lt;li&gt;Safari&lt;/li&gt;
&lt;li&gt;Opera&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;
 2. #X&lt;/h2&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;&lt;span class="colors"&gt;#contai&lt;/span&gt;ner&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;width&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;960px&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;margin&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;auto&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;#container {
   width: 960px;
   margin: auto;
}
&lt;/pre&gt;
Prefixing the hash symbol to a selector allows us to target by &lt;code&gt;id&lt;/code&gt;. This is easily the most common usage, however be cautious when using &lt;code&gt;id&lt;/code&gt; selectors.&lt;br /&gt;
&lt;blockquote&gt;
Ask yourself: do I absolutely need to apply an &lt;code&gt;id&lt;/code&gt; to this element in order to target it?&lt;/blockquote&gt;
&lt;code&gt;id&lt;/code&gt; selectors are rigid and don’t allow for reuse. If possible, first try to use a tag name, one of the new HTML5 elements, or even a pseudo-class.&lt;br /&gt;
&lt;h5&gt;
 &lt;a href="http://d2o0t5hpnwv4c1.cloudfront.net/840_cssSelectors/selectors/id.html" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','d2o0t5hpnwv4c1.cloudfront.net']);"&gt;View Demo &lt;/a&gt;&lt;/h5&gt;
&lt;h3&gt;
 Compatibility&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;IE6+&lt;/li&gt;
&lt;li&gt;Firefox&lt;/li&gt;
&lt;li&gt;Chrome&lt;/li&gt;
&lt;li&gt;Safari&lt;/li&gt;
&lt;li&gt;Opera&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;
 3. .X&lt;/h2&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;.error&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;color&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;red&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;.error {
  color: red;
}
&lt;/pre&gt;
This is a &lt;code&gt;class&lt;/code&gt; selector. The difference between &lt;code&gt;id&lt;/code&gt;s and &lt;code&gt;class&lt;/code&gt;es is that, with the latter, you can target multiple elements. Use &lt;code&gt;class&lt;/code&gt;es when you want your styling to apply to a group of elements. Alternatively, use &lt;code&gt;id&lt;/code&gt;s to find a needle-in-a-haystack, and style only that specific element.&lt;br /&gt;
&lt;h5&gt;
 &lt;a href="http://d2o0t5hpnwv4c1.cloudfront.net/840_cssSelectors/selectors/class.html" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','d2o0t5hpnwv4c1.cloudfront.net']);"&gt;View Demo &lt;/a&gt;&lt;/h5&gt;
&lt;h3&gt;
 Compatibility&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;IE6+&lt;/li&gt;
&lt;li&gt;Firefox&lt;/li&gt;
&lt;li&gt;Chrome&lt;/li&gt;
&lt;li&gt;Safari&lt;/li&gt;
&lt;li&gt;Opera&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;
 4. X Y&lt;/h2&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;li&amp;nbsp;a&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;text-decoration&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;none&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;li a {
  text-decoration: none;
}
&lt;/pre&gt;
The next most comment selector is the &lt;code&gt;descendant&lt;/code&gt; selector. When you need to be more specific with your selectors, you use these. For example, what if, rather than targeting &lt;i&gt;all&lt;/i&gt; anchor tags, you only need to target the anchors which are within an unordered list? This is specifically when you’d use a descendant selector.&lt;br /&gt;
&lt;blockquote&gt;
&lt;b&gt;Pro-tip&lt;/b&gt; – If your selector looks like &lt;code&gt;X Y Z A B.error&lt;/code&gt;, you’re doing it wrong. Always ask yourself if it’s absolutely necessary to apply all of that &lt;i&gt;weight&lt;/i&gt;.&lt;/blockquote&gt;
&lt;h5&gt;
 &lt;a href="http://d2o0t5hpnwv4c1.cloudfront.net/840_cssSelectors/selectors/descend.html" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','d2o0t5hpnwv4c1.cloudfront.net']);"&gt;View Demo &lt;/a&gt;&lt;/h5&gt;
&lt;h3&gt;
 Compatibility&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;IE6+&lt;/li&gt;
&lt;li&gt;Firefox&lt;/li&gt;
&lt;li&gt;Chrome&lt;/li&gt;
&lt;li&gt;Safari&lt;/li&gt;
&lt;li&gt;Opera&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;
 5. X&lt;/h2&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;a&amp;nbsp;{&amp;nbsp;&lt;span class="keyword"&gt;color&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;red&lt;/span&gt;;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;ul&amp;nbsp;{&amp;nbsp;&lt;span class="keyword"&gt;margin-left&lt;/span&gt;:&amp;nbsp;0;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;a { color: red; }
ul { margin-left: 0; }
&lt;/pre&gt;
What if you want to target all elements on a page, according to their &lt;code&gt;type&lt;/code&gt;, rather than an &lt;code&gt;id&lt;/code&gt; or &lt;code&gt;class&lt;/code&gt;name? Keep it simple, and use a type selector. If you need to target all unordered lists, use &lt;code&gt;ul {}&lt;/code&gt;.&lt;br /&gt;
&lt;h5&gt;
 &lt;a href="http://d2o0t5hpnwv4c1.cloudfront.net/840_cssSelectors/selectors/tagName.html" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','d2o0t5hpnwv4c1.cloudfront.net']);"&gt;View Demo &lt;/a&gt;&lt;/h5&gt;
&lt;h3&gt;
 Compatibility&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;IE6+&lt;/li&gt;
&lt;li&gt;Firefox&lt;/li&gt;
&lt;li&gt;Chrome&lt;/li&gt;
&lt;li&gt;Safari&lt;/li&gt;
&lt;li&gt;Opera&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;
 6. X:visited and X:link&lt;/h2&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;a:link&amp;nbsp;{&amp;nbsp;&lt;span class="keyword"&gt;color&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;red&lt;/span&gt;;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;a:visted&amp;nbsp;{&amp;nbsp;&lt;span class="keyword"&gt;color&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;purple&lt;/span&gt;;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;a:link { color: red; }
a:visted { color: purple; }
&lt;/pre&gt;
We use the &lt;code&gt;:link&lt;/code&gt; pseudo-class to target all anchors tags which have yet to be clicked on.&lt;br /&gt;
Alternatively, we also have the &lt;code&gt;:visited&lt;/code&gt; pseudo class, which, as you’d expected, allows us to apply specific styling to only the anchor tags on the page which &lt;i&gt;have&lt;/i&gt; been clicked on, or &lt;i&gt;visited&lt;/i&gt;.&lt;br /&gt;
&lt;h5&gt;
 &lt;a href="http://d2o0t5hpnwv4c1.cloudfront.net/840_cssSelectors/selectors/links.html" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','d2o0t5hpnwv4c1.cloudfront.net']);"&gt;View Demo &lt;/a&gt;&lt;/h5&gt;
&lt;h3&gt;
 Compatibility&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;IE7+&lt;/li&gt;
&lt;li&gt;Firefox&lt;/li&gt;
&lt;li&gt;Chrome&lt;/li&gt;
&lt;li&gt;Safari&lt;/li&gt;
&lt;li&gt;Opera&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;
7. X + Y&lt;/h2&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;ul&amp;nbsp;+&amp;nbsp;p&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;color&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;red&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;ul + p {
   color: red;
}
&lt;/pre&gt;
This is referred to as an adjacent selector. It will select &lt;i&gt;only&lt;/i&gt; the element that is immediately preceded by the former element. In this case, only the first paragraph after each &lt;code&gt;ul&lt;/code&gt; will have red text.&lt;br /&gt;
&lt;h5&gt;
 &lt;a href="http://d2o0t5hpnwv4c1.cloudfront.net/840_cssSelectors/selectors/adjacent.html" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','d2o0t5hpnwv4c1.cloudfront.net']);"&gt;View Demo &lt;/a&gt;&lt;/h5&gt;
&lt;h3&gt;
 Compatibility&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;IE7+&lt;/li&gt;
&lt;li&gt;Firefox&lt;/li&gt;
&lt;li&gt;Chrome&lt;/li&gt;
&lt;li&gt;Safari&lt;/li&gt;
&lt;li&gt;Opera&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;
8. X &amp;gt; Y&lt;/h2&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;div&lt;span class="colors"&gt;#contai&lt;/span&gt;ner&amp;nbsp;&amp;gt;&amp;nbsp;ul&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;border&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;1px&lt;/span&gt;&amp;nbsp;&lt;span class="string"&gt;solid&lt;/span&gt;&amp;nbsp;&lt;span class="string"&gt;black&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;div#container &amp;gt; ul {
  border: 1px solid black;
}
&lt;/pre&gt;
The difference between the standard &lt;code&gt;X Y&lt;/code&gt; and &lt;code&gt;X &amp;gt; Y&lt;/code&gt; is that the latter will only select direct children. For example, consider the following markup.&lt;br /&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-xml" start="1"&gt;
&lt;li class="alt"&gt;&lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;div&lt;/span&gt;&amp;nbsp;&lt;span class="attribute"&gt;id&lt;/span&gt;=&lt;span class="attribute-value"&gt;"container"&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;ul&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;li&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;List&amp;nbsp;Item&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;ul&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;li&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;Child&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;li&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;ul&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;li&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;li&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;List&amp;nbsp;Item&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;li&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;li&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;List&amp;nbsp;Item&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;li&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;li&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;List&amp;nbsp;Item&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;li&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;ul&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;div&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="html" name="code" style="display: none;"&gt;   &amp;lt;div id="container"&amp;gt;
      &amp;lt;ul&amp;gt;
         &amp;lt;li&amp;gt; List Item
           &amp;lt;ul&amp;gt;
              &amp;lt;li&amp;gt; Child &amp;lt;/li&amp;gt;
           &amp;lt;/ul&amp;gt;
         &amp;lt;/li&amp;gt;
         &amp;lt;li&amp;gt; List Item &amp;lt;/li&amp;gt;
         &amp;lt;li&amp;gt; List Item &amp;lt;/li&amp;gt;
         &amp;lt;li&amp;gt; List Item &amp;lt;/li&amp;gt;
      &amp;lt;/ul&amp;gt;
   &amp;lt;/div&amp;gt;
&lt;/pre&gt;
A selector of &lt;code&gt;#container &amp;gt; ul&lt;/code&gt; will only target the &lt;code&gt;ul&lt;/code&gt;s which are direct children of the &lt;code&gt;div&lt;/code&gt; with an &lt;code&gt;id&lt;/code&gt; of &lt;code&gt;container&lt;/code&gt;. It will not target, for instance, the &lt;code&gt;ul&lt;/code&gt; that is a child of the first &lt;code&gt;li&lt;/code&gt;.&lt;br /&gt;
For this reason, there are performance benefits in using the child combinator. In fact, it’s recommended particularly when working with JavaScript-based CSS selector engines.&lt;br /&gt;
&lt;h5&gt;
 &lt;a href="http://d2o0t5hpnwv4c1.cloudfront.net/840_cssSelectors/selectors/childcombinator.html" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','d2o0t5hpnwv4c1.cloudfront.net']);"&gt;View Demo &lt;/a&gt;&lt;/h5&gt;
&lt;h3&gt;
 Compatibility&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;IE7+&lt;/li&gt;
&lt;li&gt;Firefox&lt;/li&gt;
&lt;li&gt;Chrome&lt;/li&gt;
&lt;li&gt;Safari&lt;/li&gt;
&lt;li&gt;Opera&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;
 9. X ~ Y&lt;/h2&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;ul&amp;nbsp;~&amp;nbsp;p&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;color&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;red&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;ul ~ p {
   color: red;
}
&lt;/pre&gt;
This sibling combinator is similar to &lt;code&gt;X + Y&lt;/code&gt;, however, it’s less strict. While an adjacent selector (&lt;code&gt;ul + p&lt;/code&gt;) will only select the first element that is &lt;i&gt;immediately&lt;/i&gt; preceded by the former selector, this one is more generalized. It will select, referring to our example above, any &lt;code&gt;p&lt;/code&gt; elements, as long as they follow a &lt;code&gt;ul&lt;/code&gt;.&lt;br /&gt;
&lt;h5&gt;
 &lt;a href="http://d2o0t5hpnwv4c1.cloudfront.net/840_cssSelectors/selectors/generalcombinator.html" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','d2o0t5hpnwv4c1.cloudfront.net']);"&gt;View Demo &lt;/a&gt;&lt;/h5&gt;
&lt;h3&gt;
 Compatibility&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;IE7+&lt;/li&gt;
&lt;li&gt;Firefox&lt;/li&gt;
&lt;li&gt;Chrome&lt;/li&gt;
&lt;li&gt;Safari&lt;/li&gt;
&lt;li&gt;Opera&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;
 10. X[title]&lt;/h2&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;a[title]&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;color&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;green&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;a[title] {
   color: green;
}
&lt;/pre&gt;
Referred to as an &lt;i&gt;attributes selector&lt;/i&gt;, in our example above, this will only select the anchor tags that have a &lt;code&gt;title&lt;/code&gt; attribute. Anchor tags which do not will not receive this particular styling. But, what if you need to be more specific? Well…&lt;br /&gt;
&lt;h5&gt;
 &lt;a href="http://d2o0t5hpnwv4c1.cloudfront.net/840_cssSelectors/selectors/attributes.html" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','d2o0t5hpnwv4c1.cloudfront.net']);"&gt;View Demo &lt;/a&gt;&lt;/h5&gt;
&lt;h3&gt;
 Compatibility&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;IE7+&lt;/li&gt;
&lt;li&gt;Firefox&lt;/li&gt;
&lt;li&gt;Chrome&lt;/li&gt;
&lt;li&gt;Safari&lt;/li&gt;
&lt;li&gt;Opera&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;
 11. X[href="foo"]&lt;/h2&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;a[href=&lt;span class="string"&gt;"http://net.tutsplus.com"&lt;/span&gt;]&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;color&lt;/span&gt;:&amp;nbsp;&lt;span class="colors"&gt;#1f6053&lt;/span&gt;;&amp;nbsp;&lt;span class="comment"&gt;/*&amp;nbsp;nettuts&amp;nbsp;green&amp;nbsp;*/&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;a[href="http://net.tutsplus.com"] {
  color: #1f6053; /* nettuts green */
}
&lt;/pre&gt;
The snippet above will style all anchor tags which link to &lt;i&gt;http://net.tutsplus.com&lt;/i&gt;; they’ll receive our branded green color. All other anchor tags will remain unaffected.&lt;br /&gt;
&lt;blockquote&gt;
Note that we’re wrapping the value in quotes. Remember to also do this when using a JavaScript CSS selector engine. When possible, always use CSS3 selectors over unofficial methods.&lt;/blockquote&gt;
This works well, though, it’s a bit rigid. What if the link does indeed direct to Nettuts+, but, maybe, the path is &lt;i&gt;nettuts.com&lt;/i&gt; rather than the full url? In those cases we can use a bit of the regular expressions syntax.&lt;br /&gt;
&lt;h5&gt;
 &lt;a href="http://d2o0t5hpnwv4c1.cloudfront.net/840_cssSelectors/selectors/attributes2.html" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','d2o0t5hpnwv4c1.cloudfront.net']);"&gt;View Demo &lt;/a&gt;&lt;/h5&gt;
&lt;h3&gt;
 Compatibility&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;IE7+&lt;/li&gt;
&lt;li&gt;Firefox&lt;/li&gt;
&lt;li&gt;Chrome&lt;/li&gt;
&lt;li&gt;Safari&lt;/li&gt;
&lt;li&gt;Opera&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;
 12. X[href*="nettuts"]&lt;/h2&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;a[href*=&lt;span class="string"&gt;"tuts"&lt;/span&gt;]&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;color&lt;/span&gt;:&amp;nbsp;&lt;span class="colors"&gt;#1f6053&lt;/span&gt;;&amp;nbsp;&lt;span class="comment"&gt;/*&amp;nbsp;nettuts&amp;nbsp;green&amp;nbsp;*/&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;a[href*="tuts"] {
  color: #1f6053; /* nettuts green */
}
&lt;/pre&gt;
There we go; that’s what we need. The star designates that the proceeding value must appear &lt;i&gt;somewhere&lt;/i&gt; in the attribute’s value. That way, this covers &lt;i&gt;nettuts.com&lt;/i&gt;, &lt;i&gt;net.tutsplus.com,&lt;/i&gt; and even &lt;i&gt;tutsplus.com&lt;/i&gt;.&lt;br /&gt;
Keep in mind that this is a broad statement. What if the anchor tag linked to some non-Envato site with the string &lt;i&gt;tuts&lt;/i&gt; in the url? When you need to be more specific, use &lt;code&gt;^&lt;/code&gt; and &lt;code&gt;&amp;amp;&lt;/code&gt;, to reference the beginning and end of a string, respectively.&lt;br /&gt;
&lt;h5&gt;
 &lt;a href="http://d2o0t5hpnwv4c1.cloudfront.net/840_cssSelectors/selectors/attributes3.html" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','d2o0t5hpnwv4c1.cloudfront.net']);"&gt;View Demo &lt;/a&gt;&lt;/h5&gt;
&lt;h3&gt;
 Compatibility&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;IE7+&lt;/li&gt;
&lt;li&gt;Firefox&lt;/li&gt;
&lt;li&gt;Chrome&lt;/li&gt;
&lt;li&gt;Safari&lt;/li&gt;
&lt;li&gt;Opera&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;
 13.  X[href^="http"]&lt;/h2&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;a[href^=&lt;span class="string"&gt;"http"&lt;/span&gt;]&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;background&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;url&lt;/span&gt;(path/to/external/&lt;span class="string"&gt;icon&lt;/span&gt;.png)&amp;nbsp;&lt;span class="string"&gt;no-repeat&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;padding-left&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;10px&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;a[href^="http"] {
   background: url(path/to/external/icon.png) no-repeat;
   padding-left: 10px;
}
&lt;/pre&gt;
Ever wonder how some websites are able to display a little icon next to the links which are external? I’m sure you’ve seen these before; they’re nice reminders that the link will direct you to an entirely different website.&lt;br /&gt;
This is a cinch with the carat symbol. It’s most commonly used in regular expressions to designate the beginning of a string. If we want to target all anchor tags that have a &lt;code&gt;href&lt;/code&gt; which begins with &lt;code&gt;http&lt;/code&gt;, we could use a selector similar to the snippet shown above.&lt;br /&gt;
&lt;blockquote&gt;
Notice that we’re not searching for &lt;code&gt;http://&lt;/code&gt;; that’s unnecessary, and doesn’t account for the urls that begin with &lt;code&gt;https://&lt;/code&gt;.&lt;/blockquote&gt;
Now, what if we wanted to instead style all anchors which link to, say, a photo? In those cases, let’s search for the &lt;i&gt;end&lt;/i&gt; of the string.&lt;br /&gt;
&lt;h5&gt;
 &lt;a href="http://d2o0t5hpnwv4c1.cloudfront.net/840_cssSelectors/selectors/attributes4.html" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','d2o0t5hpnwv4c1.cloudfront.net']);"&gt;View Demo &lt;/a&gt;&lt;/h5&gt;
&lt;h3&gt;
 Compatibility&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;IE7+&lt;/li&gt;
&lt;li&gt;Firefox&lt;/li&gt;
&lt;li&gt;Chrome&lt;/li&gt;
&lt;li&gt;Safari&lt;/li&gt;
&lt;li&gt;Opera&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;
 14. X[href$=".jpg"]&lt;/h2&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;a[href$=&lt;span class="string"&gt;".jpg"&lt;/span&gt;]&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;color&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;red&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;a[href$=".jpg"] {
   color: red;
}
&lt;/pre&gt;
Again, we use a regular expressions symbol, &lt;code&gt;$&lt;/code&gt;, to refer to the end of a string. In this case, we’re searching for all anchors which link to an image — or at least a url that ends with &lt;code&gt;.jpg&lt;/code&gt;. Keep in mind that this certainly won’t work for &lt;code&gt;gifs&lt;/code&gt; and &lt;code&gt;pngs&lt;/code&gt;.&lt;br /&gt;
&lt;h5&gt;
 &lt;a href="http://d2o0t5hpnwv4c1.cloudfront.net/840_cssSelectors/selectors/attributes5.html" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','d2o0t5hpnwv4c1.cloudfront.net']);"&gt;View Demo &lt;/a&gt;&lt;/h5&gt;
&lt;h3&gt;
 Compatibility&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;IE7+&lt;/li&gt;
&lt;li&gt;Firefox&lt;/li&gt;
&lt;li&gt;Chrome&lt;/li&gt;
&lt;li&gt;Safari&lt;/li&gt;
&lt;li&gt;Opera&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;
 15. X[data-*="foo"]&lt;/h2&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;a[data-filetype=&lt;span class="string"&gt;"image"&lt;/span&gt;]&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;color&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;red&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;a[data-filetype="image"] {
   color: red;
}
&lt;/pre&gt;
Refer back to number eight; how do we compensate for all of the various image types: &lt;code&gt;png&lt;/code&gt;, &lt;code&gt;jpeg,&lt;/code&gt;&lt;code&gt;jpg&lt;/code&gt;, &lt;code&gt;gif&lt;/code&gt;? Well, we could create multiple selectors, such as:&lt;br /&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;a[href$=&lt;span class="string"&gt;".jpg"&lt;/span&gt;],&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;a[href$=&lt;span class="string"&gt;".jpeg"&lt;/span&gt;],&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;a[href$=&lt;span class="string"&gt;".png"&lt;/span&gt;],&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;a[href$=&lt;span class="string"&gt;".gif"&lt;/span&gt;]&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;color&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;red&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;a[href$=".jpg"],
a[href$=".jpeg"],
a[href$=".png"],
a[href$=".gif"] {
   color: red;
}
&lt;/pre&gt;
But, that’s a pain in the butt, and is inefficient. Another possible solution is to use custom attributes. What if we added our own &lt;code&gt;data-filetype&lt;/code&gt; attribute to each anchor that links to an image?&lt;br /&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-xml" start="1"&gt;
&lt;li class="alt"&gt;&lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;a&lt;/span&gt;&amp;nbsp;&lt;span class="attribute"&gt;href&lt;/span&gt;=&lt;span class="attribute-value"&gt;"path/to/image.jpg"&lt;/span&gt;&amp;nbsp;&lt;span class="attribute"&gt;data-filetype&lt;/span&gt;=&lt;span class="attribute-value"&gt;"image"&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;Image&amp;nbsp;Link&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;a&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="html" name="code" style="display: none;"&gt;&amp;lt;a href="path/to/image.jpg" data-filetype="image"&amp;gt; Image Link &amp;lt;/a&amp;gt;
&lt;/pre&gt;
Then, with that &lt;i&gt;hook&lt;/i&gt; in place, we can use a standard attributes selector to target only those anchors.&lt;br /&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;a[data-filetype=&lt;span class="string"&gt;"image"&lt;/span&gt;]&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;color&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;red&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;a[data-filetype="image"] {
   color: red;
}
&lt;/pre&gt;
&lt;h5&gt;
 &lt;a href="http://d2o0t5hpnwv4c1.cloudfront.net/840_cssSelectors/selectors/attributes6.html" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','d2o0t5hpnwv4c1.cloudfront.net']);"&gt;View Demo &lt;/a&gt;&lt;/h5&gt;
&lt;h3&gt;
 Compatibility&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;IE7+&lt;/li&gt;
&lt;li&gt;Firefox&lt;/li&gt;
&lt;li&gt;Chrome&lt;/li&gt;
&lt;li&gt;Safari&lt;/li&gt;
&lt;li&gt;Opera&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;
 16. X[foo~="bar"]&lt;/h2&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;&amp;nbsp;a[data-info~=&lt;span class="string"&gt;"external"&lt;/span&gt;]&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;color&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;red&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;a[data-info~=&lt;span class="string"&gt;"image"&lt;/span&gt;]&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;border&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;1px&lt;/span&gt;&amp;nbsp;&lt;span class="string"&gt;solid&lt;/span&gt;&amp;nbsp;&lt;span class="string"&gt;black&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt; a[data-info~="external"] {
   color: red;
}
a[data-info~="image"] {
   border: 1px solid black;
}
&lt;/pre&gt;
Here’s a special one that’ll impress your friends. Not too many people know about this trick. The tilda (&lt;code&gt;~&lt;/code&gt;) symbol allows us to target an attribute which has a spaced-separated list of values.&lt;br /&gt;
Going along with our custom attribute from number fifteen, above, we could create a &lt;code&gt;data-info&lt;/code&gt; attribute, which can receive a space-separated list of anything we need to make note of. In this case, we’ll make note of external links and links to images — just for the example.&lt;br /&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-xml" start="1"&gt;
&lt;li class="alt"&gt;"&lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;a&lt;/span&gt;&amp;nbsp;&lt;span class="attribute"&gt;href&lt;/span&gt;=&lt;span class="attribute-value"&gt;"path/to/image.jpg"&lt;/span&gt;&amp;nbsp;&lt;span class="attribute"&gt;data-info&lt;/span&gt;=&lt;span class="attribute-value"&gt;"external&amp;nbsp;image"&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;Click&amp;nbsp;Me,&amp;nbsp;Fool&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;a&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="html" name="code" style="display: none;"&gt;"&amp;lt;a href="path/to/image.jpg" data-info="external image"&amp;gt; Click Me, Fool &amp;lt;/a&amp;gt;
&lt;/pre&gt;
With that markup in place, now we can target any tags that have either of those values, by using the ~ attributes selector trick.&lt;br /&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;&lt;span class="comment"&gt;/*&amp;nbsp;Target&amp;nbsp;data-info&amp;nbsp;attr&amp;nbsp;that&amp;nbsp;contains&amp;nbsp;the&amp;nbsp;value&amp;nbsp;"external"&amp;nbsp;*/&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;a[data-info~=&lt;span class="string"&gt;"external"&lt;/span&gt;]&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;color&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;red&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&lt;span class="comment"&gt;/*&amp;nbsp;And&amp;nbsp;which&amp;nbsp;contain&amp;nbsp;the&amp;nbsp;value&amp;nbsp;"image"&amp;nbsp;*/&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;a[data-info~=&lt;span class="string"&gt;"image"&lt;/span&gt;]&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;border&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;1px&lt;/span&gt;&amp;nbsp;&lt;span class="string"&gt;solid&lt;/span&gt;&amp;nbsp;&lt;span class="string"&gt;black&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;/* Target data-info attr that contains the value "external" */
a[data-info~="external"] {
   color: red;
}
/* And which contain the value "image" */
a[data-info~="image"] {
  border: 1px solid black;
}
&lt;/pre&gt;
Pretty nifty, ay?&lt;br /&gt;
&lt;h5&gt;
 &lt;a href="http://d2o0t5hpnwv4c1.cloudfront.net/840_cssSelectors/selectors/attributes7.html" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','d2o0t5hpnwv4c1.cloudfront.net']);"&gt;View Demo &lt;/a&gt;&lt;/h5&gt;
&lt;h3&gt;
 Compatibility&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;IE7+&lt;/li&gt;
&lt;li&gt;Firefox&lt;/li&gt;
&lt;li&gt;Chrome&lt;/li&gt;
&lt;li&gt;Safari&lt;/li&gt;
&lt;li&gt;Opera&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;
 17. X:checked&lt;/h2&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;input[type=radio]:checked&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;border&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;1px&lt;/span&gt;&amp;nbsp;&lt;span class="string"&gt;solid&lt;/span&gt;&amp;nbsp;&lt;span class="string"&gt;black&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;input[type=radio]:checked {
   border: 1px solid black;
}
&lt;/pre&gt;
This pseudo class will only target a user interface element that has been &lt;i&gt;checked&lt;/i&gt; - like a radio button, or checkbox. It's as simple as that.&lt;br /&gt;
&lt;h5&gt;
 &lt;a href="http://d2o0t5hpnwv4c1.cloudfront.net/840_cssSelectors/selectors/checked.html" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','d2o0t5hpnwv4c1.cloudfront.net']);"&gt;View Demo &lt;/a&gt;&lt;/h5&gt;
&lt;h3&gt;
 Compatibility&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;IE9+&lt;/li&gt;
&lt;li&gt;Firefox&lt;/li&gt;
&lt;li&gt;Chrome&lt;/li&gt;
&lt;li&gt;Safari&lt;/li&gt;
&lt;li&gt;Opera&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;
 18. X:after&lt;/h2&gt;
The &lt;code&gt;before&lt;/code&gt; and &lt;code&gt;after&lt;/code&gt; pseudo classes kick butt. Every day, it seems, people are finding new and creative ways to use them effectively. They simply generate content around the selected element.&lt;br /&gt;
Many were first introduced to these classes when they encountered the clear-fix hack.&lt;br /&gt;
&lt;div class="tutorial_image"&gt;
&lt;script type="text/javascript"&gt;google_ad_client = "pub-9093712935949486";
/* 300x250 nettuts middle tutsads */
google_ad_slot = "1775681443";
google_ad_width = 300;
google_ad_height = 250;&lt;/script&gt; &lt;script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"&gt;&lt;/script&gt;&lt;br /&gt;
&lt;ins style="border: none; display: inline-table; height: 250px; margin: 0; padding: 0; position: relative; visibility: visible; width: 300px;"&gt;&lt;ins id="aswift_0_anchor" style="border: none; display: block; height: 250px; margin: 0; padding: 0; position: relative; visibility: visible; width: 300px;"&gt;&lt;iframe allowtransparency="true" frameborder="0" height="250" hspace="0" id="aswift_0" marginheight="0" marginwidth="0" name="aswift_0" onload="var i=this.id,s=window.google_iframe_oncopy,H=s&amp;amp;&amp;amp;s.handlers,h=H&amp;amp;&amp;amp;H[i],w=this.contentWindow,d;try{d=w.document}catch(e){}if(h&amp;amp;&amp;amp;d&amp;amp;&amp;amp;(!d.body||!d.body.firstChild)){if(h.call){setTimeout(h,0)}else if(h.match){w.location.replace(h)}}" scrolling="no" style="left: 0; position: absolute; top: 0;" vspace="0" width="300"&gt;&lt;/iframe&gt;&lt;/ins&gt;&lt;/ins&gt;&lt;/div&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;.clearfix:after&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;content&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;""&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;display&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;block&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;clear&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;both&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;visibility&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;hidden&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;font-size&lt;/span&gt;:&amp;nbsp;0;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;height&lt;/span&gt;:&amp;nbsp;0;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;.clearfix&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&lt;span class="keyword"&gt;display&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;inline&lt;/span&gt;-&lt;span class="string"&gt;block&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;_height:&amp;nbsp;1%;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;.clearfix:after {
    content: "";
    display: block;
    clear: both;
    visibility: hidden;
    font-size: 0;
    height: 0;
    }
.clearfix {
   *display: inline-block;
   _height: 1%;
}
&lt;/pre&gt;
This &lt;i&gt;hack&lt;/i&gt; uses the &lt;code&gt;:after&lt;/code&gt; pseudo class to append a space after the element, and then clear it. It's an excellent trick to have in your tool bag, particularly in the cases when the &lt;code&gt;overflow: hidden;&lt;/code&gt; method isn't possible.&lt;br /&gt;
For another creative use of this, &lt;a href="http://net.tutsplus.com/tutorials/html-css-techniques/quick-tip-getting-clever-with-css3-shadows/"&gt;refer to my quick tip on creating shadows&lt;/a&gt;.&lt;br /&gt;
&lt;blockquote&gt;
According to the CSS3 Selectors specification, you should technically use the pseudo element syntax of two colons &lt;code&gt;::&lt;/code&gt;. However, to remain compatible, the user-agent will accept a single colon usage as well. In fact, at this point, it's smarter to use the single-colon version in your projects.&lt;/blockquote&gt;
&lt;h3&gt;
 Compatibility&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;IE8+&lt;/li&gt;
&lt;li&gt;Firefox&lt;/li&gt;
&lt;li&gt;Chrome&lt;/li&gt;
&lt;li&gt;Safari&lt;/li&gt;
&lt;li&gt;Opera&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;
 19. X:hover&lt;/h2&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;div:hover&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;background&lt;/span&gt;:&amp;nbsp;&lt;span class="colors"&gt;#e3e3e3&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;div:hover {
  background: #e3e3e3;
}
&lt;/pre&gt;
Oh come on. You know this one. The official term for this is &lt;code&gt;user action pseudo class&lt;/code&gt;. It sounds confusing, but it really isn't. Want to apply specific styling when a user hovers over an element? This will get the job done!&lt;br /&gt;
&lt;blockquote&gt;
Keep in mind that older version of Internet Explorer don't respond when the &lt;code&gt;:hover&lt;/code&gt; pseudo class is applied to anything other than an anchor tag.&lt;/blockquote&gt;
You'll most often use this selector when applying, for example, a &lt;code&gt;border-bottom&lt;/code&gt; to anchor tags, when hovered over.&lt;br /&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;a:hover&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&lt;span class="keyword"&gt;border-bottom&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;1px&lt;/span&gt;&amp;nbsp;&lt;span class="string"&gt;solid&lt;/span&gt;&amp;nbsp;&lt;span class="string"&gt;black&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;a:hover {
 border-bottom: 1px solid black;
}
&lt;/pre&gt;
&lt;blockquote&gt;
&lt;b&gt;Pro-tip&lt;/b&gt; - &lt;code&gt;border-bottom: 1px solid black;&lt;/code&gt; looks better than &lt;code&gt;text-decoration: underline;&lt;/code&gt;.&lt;/blockquote&gt;
&lt;h3&gt;
 Compatibility&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;IE6+ (In IE6, :hover must be applied to an anchor element)&lt;/li&gt;
&lt;li&gt;Firefox&lt;/li&gt;
&lt;li&gt;Chrome&lt;/li&gt;
&lt;li&gt;Safari&lt;/li&gt;
&lt;li&gt;Opera&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;
 20.  X:not(selector)&lt;/h2&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;div:not(&lt;span class="colors"&gt;#contai&lt;/span&gt;ner)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;color&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;blue&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;div:not(#container) {
   color: blue;
}
&lt;/pre&gt;
The &lt;code&gt;negation&lt;/code&gt; pseudo class is particularly helpful. Let's say I want to select all divs, except for the one which has an &lt;code&gt;id&lt;/code&gt; of &lt;code&gt;container&lt;/code&gt;. The snippet above will handle that task perfectly.&lt;br /&gt;
Or, if I wanted to select every single element (not advised) except for paragraph tags, we could do:&lt;br /&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;*:not(p)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;color&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;green&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;*:not(p) {
  color: green;
}
&lt;/pre&gt;
&lt;h5&gt;
 &lt;a href="http://d2o0t5hpnwv4c1.cloudfront.net/840_cssSelectors/selectors/not.html" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','d2o0t5hpnwv4c1.cloudfront.net']);"&gt;View Demo &lt;/a&gt;&lt;/h5&gt;
&lt;h3&gt;
 Compatibility&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;IE9+&lt;/li&gt;
&lt;li&gt;Firefox&lt;/li&gt;
&lt;li&gt;Chrome&lt;/li&gt;
&lt;li&gt;Safari&lt;/li&gt;
&lt;li&gt;Opera&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;
 21.  X::pseudoElement&lt;/h2&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;p::first-line&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;font-weight&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;bold&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;font-size&lt;/span&gt;:&amp;nbsp;1.2em;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;p::first-line {
   font-weight: bold;
   font-size: 1.2em;
}
&lt;/pre&gt;
We can use pseudo elements (designated by &lt;code&gt;::&lt;/code&gt;) to style fragments of an element, such as the first line, or the first letter. Keep in mind that these must be applied to block level elements in order to take effect.&lt;br /&gt;
&lt;blockquote&gt;
A pseudo-element is composed of two colons: &lt;code&gt;::&lt;/code&gt;&lt;/blockquote&gt;
&lt;h4&gt;
Target the First Letter of a Paragraph&lt;/h4&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;p::first-letter&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;float&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;left&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;font-size&lt;/span&gt;:&amp;nbsp;2em;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;font-weight&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;bold&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;font-family&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;cursive&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;padding-right&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;2px&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;p::first-letter {
   float: left;
   font-size: 2em;
   font-weight: bold;
   font-family: cursive;
   padding-right: 2px;
}
&lt;/pre&gt;
This snippet is an abstraction that will find all paragraphs on the page, and then sub-target only the first letter of that element.&lt;br /&gt;
This is most often used to create newspaper-like styling for the first-letter of an article.&lt;br /&gt;
&lt;h4&gt;
Target the First Line of a Paragraph&lt;/h4&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;p::first-line&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;font-weight&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;bold&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;font-size&lt;/span&gt;:&amp;nbsp;1.2em;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;p::first-line {
   font-weight: bold;
   font-size: 1.2em;
}
&lt;/pre&gt;
Similarly, the &lt;code&gt;::first-line&lt;/code&gt; pseudo element will, as expected, style the first line of the element only.&lt;br /&gt;
&lt;blockquote&gt;
"For compatibility with existing style sheets, user agents must also accept the previous one-colon notation for pseudo-elements introduced in CSS levels 1 and 2 (namely, :first-line, :first-letter, :before and :after). This compatibility is not allowed for the new pseudo-elements introduced in this specification." - &lt;a href="http://www.w3.org/TR/css3-selectors/" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','www.w3.org']);"&gt;Source&lt;/a&gt;&lt;/blockquote&gt;
&lt;h5&gt;
 &lt;a href="http://d2o0t5hpnwv4c1.cloudfront.net/840_cssSelectors/selectors/pseudoElements.html" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','d2o0t5hpnwv4c1.cloudfront.net']);"&gt;View Demo &lt;/a&gt;&lt;/h5&gt;
&lt;h3&gt;
 Compatibility&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;IE6+&lt;/li&gt;
&lt;li&gt;Firefox&lt;/li&gt;
&lt;li&gt;Chrome&lt;/li&gt;
&lt;li&gt;Safari&lt;/li&gt;
&lt;li&gt;Opera&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;
 22. X:nth-child(n)&lt;/h2&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;li:nth-child(3)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;color&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;red&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;li:nth-child(3) {
   color: red;
}
&lt;/pre&gt;
Remember the days when we had no way to target specific elements in a stack? The &lt;code&gt;nth-child&lt;/code&gt; pseudo class solves that!&lt;br /&gt;
Please note that &lt;code&gt;nth-child&lt;/code&gt; accepts an integer as a parameter, however, this is not zero-based. If you wish to target the second list item, use &lt;code&gt;li:nth-child(2)&lt;/code&gt;.&lt;br /&gt;
We can even use this to select a variable set of children. For example, we could do &lt;code&gt;li:nth-child(4n)&lt;/code&gt; to select every fourth list item.&lt;br /&gt;
&lt;h5&gt;
 &lt;a href="http://d2o0t5hpnwv4c1.cloudfront.net/840_cssSelectors/selectors/nth.html" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','d2o0t5hpnwv4c1.cloudfront.net']);"&gt;View Demo &lt;/a&gt;&lt;/h5&gt;
&lt;h3&gt;
 Compatibility&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;IE9+&lt;/li&gt;
&lt;li&gt;Firefox 3.5+&lt;/li&gt;
&lt;li&gt;Chrome&lt;/li&gt;
&lt;li&gt;Safari&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;
 23. X:nth-last-child(n)&lt;/h2&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;li:nth-last-child(2)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;color&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;red&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;li:nth-last-child(2) {
   color: red;
}
&lt;/pre&gt;
What if you had a huge list of items in a &lt;code&gt;ul&lt;/code&gt;, and only needed to access, say, the third to the last item? Rather than doing &lt;code&gt;li:nth-child(397)&lt;/code&gt;, you could instead use the &lt;code&gt;nth-last-child&lt;/code&gt; pseudo class.&lt;br /&gt;
This technique works almost identically from number sixteen above, however, the difference is that it begins at the end of the collection, and works its way back.&lt;br /&gt;
&lt;h5&gt;
 &lt;a href="http://d2o0t5hpnwv4c1.cloudfront.net/840_cssSelectors/selectors/nthLast.html" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','d2o0t5hpnwv4c1.cloudfront.net']);"&gt;View Demo &lt;/a&gt;&lt;/h5&gt;
&lt;h3&gt;
 Compatibility&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;IE9+&lt;/li&gt;
&lt;li&gt;Firefox 3.5+&lt;/li&gt;
&lt;li&gt;Chrome&lt;/li&gt;
&lt;li&gt;Safari&lt;/li&gt;
&lt;li&gt;Opera&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;
 24. X:nth-of-type(n)&lt;/h2&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;ul:nth-of-type(3)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;border&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;1px&lt;/span&gt;&amp;nbsp;&lt;span class="string"&gt;solid&lt;/span&gt;&amp;nbsp;&lt;span class="string"&gt;black&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;ul:nth-of-type(3) {
   border: 1px solid black;
}
&lt;/pre&gt;
There will be times when, rather than selecting a &lt;code&gt;child&lt;/code&gt;, you instead need to select according to the &lt;code&gt;type&lt;/code&gt; of element.&lt;br /&gt;
Imagine mark-up that contains five unordered lists. If you wanted to style only the third &lt;code&gt;ul&lt;/code&gt;, and didn't have a unique &lt;code&gt;id&lt;/code&gt; to hook into, you could use the &lt;code&gt;nth-of-type(n)&lt;/code&gt; pseudo class. In the snippet above, only the third &lt;code&gt;ul&lt;/code&gt; will have a border around it.&lt;br /&gt;
&lt;h5&gt;
 &lt;a href="http://d2o0t5hpnwv4c1.cloudfront.net/840_cssSelectors/selectors/nthOfType.html" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','d2o0t5hpnwv4c1.cloudfront.net']);"&gt;View Demo &lt;/a&gt;&lt;/h5&gt;
&lt;h3&gt;
 Compatibility&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;IE9+&lt;/li&gt;
&lt;li&gt;Firefox 3.5+&lt;/li&gt;
&lt;li&gt;Chrome&lt;/li&gt;
&lt;li&gt;Safari&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;
 25. X:nth-last-of-type(n)&lt;/h2&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;ul:nth-last-of-type(3)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;border&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;1px&lt;/span&gt;&amp;nbsp;&lt;span class="string"&gt;solid&lt;/span&gt;&amp;nbsp;&lt;span class="string"&gt;black&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;ul:nth-last-of-type(3) {
   border: 1px solid black;
}
&lt;/pre&gt;
And yes, to remain consistent, we can also use &lt;code&gt;nth-last-of-type&lt;/code&gt; to begin at the end of the selectors list, and work our way back to target the desired element.&lt;br /&gt;
&lt;h3&gt;
 Compatibility&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;IE9+&lt;/li&gt;
&lt;li&gt;Firefox 3.5+&lt;/li&gt;
&lt;li&gt;Chrome&lt;/li&gt;
&lt;li&gt;Safari&lt;/li&gt;
&lt;li&gt;Opera&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;
 26. X:first-child&lt;/h2&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;ul&amp;nbsp;li:first-child&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;border-top&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;none&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;ul li:first-child {
   border-top: none;
}
&lt;/pre&gt;
This structural pseudo class allows us to target only the first child of the element's parent. You'll often use this to remove borders from the first and last list items.&lt;br /&gt;
For example, let's say you have a list of rows, and each one has a &lt;code&gt;border-top&lt;/code&gt; and a &lt;code&gt;border-bottom&lt;/code&gt;. Well, with that arrangement, the first and last item in that set will look a bit odd.&lt;br /&gt;
Many designers apply classes of &lt;code&gt;first&lt;/code&gt; and &lt;code&gt;last&lt;/code&gt; to compensate for this. Instead, you can use these pseudo classes.&lt;br /&gt;
&lt;h5&gt;
 &lt;a href="http://d2o0t5hpnwv4c1.cloudfront.net/840_cssSelectors/selectors/firstChild.html" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','d2o0t5hpnwv4c1.cloudfront.net']);"&gt;View Demo &lt;/a&gt;&lt;/h5&gt;
&lt;h3&gt;
 Compatibility&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;IE7+&lt;/li&gt;
&lt;li&gt;Firefox&lt;/li&gt;
&lt;li&gt;Chrome&lt;/li&gt;
&lt;li&gt;Safari&lt;/li&gt;
&lt;li&gt;Opera&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;
 27. X:last-child&lt;/h2&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;ul&amp;nbsp;&amp;gt;&amp;nbsp;li:last-child&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;color&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;green&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;ul &amp;gt; li:last-child {
   color: green;
}
&lt;/pre&gt;
The opposite of &lt;code&gt;first-child&lt;/code&gt;, &lt;code&gt;last-child&lt;/code&gt; will target the last item of the element's parent.&lt;br /&gt;
&lt;h3&gt;
Example&lt;/h3&gt;
Let's build a simple example to demonstrate one possible use of these classes. We'll create a styled list item.&lt;br /&gt;
&lt;h4&gt;
Markup&lt;/h4&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-xml" start="1"&gt;
&lt;li class="alt"&gt;&lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;ul&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;li&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;List&amp;nbsp;Item&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;li&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;li&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;List&amp;nbsp;Item&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;li&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;li&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;List&amp;nbsp;Item&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;li&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;ul&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="html" name="code" style="display: none;"&gt;  &amp;lt;ul&amp;gt;
     &amp;lt;li&amp;gt; List Item &amp;lt;/li&amp;gt;
     &amp;lt;li&amp;gt; List Item &amp;lt;/li&amp;gt;
     &amp;lt;li&amp;gt; List Item &amp;lt;/li&amp;gt;
  &amp;lt;/ul&amp;gt;
&lt;/pre&gt;
Nothing special here; just a simple list.&lt;br /&gt;
&lt;h4&gt;
CSS&lt;/h4&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;ul&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&lt;span class="keyword"&gt;width&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;200px&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&lt;span class="keyword"&gt;background&lt;/span&gt;:&amp;nbsp;&lt;span class="colors"&gt;#292929&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&lt;span class="keyword"&gt;color&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;white&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&lt;span class="keyword"&gt;list-style&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;none&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&lt;span class="keyword"&gt;padding-left&lt;/span&gt;:&amp;nbsp;0;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;li&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&lt;span class="keyword"&gt;padding&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;10px&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&lt;span class="keyword"&gt;border-bottom&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;1px&lt;/span&gt;&amp;nbsp;&lt;span class="string"&gt;solid&lt;/span&gt;&amp;nbsp;&lt;span class="string"&gt;black&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&lt;span class="keyword"&gt;border-top&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;1px&lt;/span&gt;&amp;nbsp;&lt;span class="string"&gt;solid&lt;/span&gt;&amp;nbsp;&lt;span class="colors"&gt;#3c3c3c&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;ul {
 width: 200px;
 background: #292929;
 color: white;
 list-style: none;
 padding-left: 0;
}
li {
 padding: 10px;
 border-bottom: 1px solid black;
 border-top: 1px solid #3c3c3c;
}
&lt;/pre&gt;
This styling will set a background, remove the browser-default padding on the &lt;code&gt;ul&lt;/code&gt;, and apply borders to each &lt;code&gt;li&lt;/code&gt; to provide a bit of depth.&lt;br /&gt;
&lt;div class="tutorial_image"&gt;
&lt;img alt="Styled List" original="http://d2o0t5hpnwv4c1.cloudfront.net/840_cssSelectors/extraBorders.png" src="http://d2o0t5hpnwv4c1.cloudfront.net/840_cssSelectors/extraBorders.png" style="display: inline;" /&gt;&lt;/div&gt;
&lt;blockquote&gt;
To add depth to your lists, apply a &lt;code&gt;border-bottom&lt;/code&gt; to each &lt;code&gt;li&lt;/code&gt; that is a shade or two darker than the &lt;code&gt;li&lt;/code&gt;'s background color. Next, apply a &lt;code&gt;border-top&lt;/code&gt; which is a couple shades &lt;i&gt;lighter&lt;/i&gt;.&lt;/blockquote&gt;
The only problem, as shown in the image above, is that a border will be applied to the very top and bottom of the unordered list - which looks odd. Let's use the &lt;code&gt;:first-child&lt;/code&gt; and &lt;code&gt;:last-child&lt;/code&gt; pseudo classes to fix this.&lt;br /&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;li:first-child&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;border-top&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;none&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;li:last-child&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;border-bottom&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;none&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;li:first-child {
    border-top: none;
}
li:last-child {
   border-bottom: none;
}
&lt;/pre&gt;
&lt;div class="tutorial_image"&gt;
&lt;img alt="Fixed" original="http://d2o0t5hpnwv4c1.cloudfront.net/840_cssSelectors/fixed.png" src="http://d2o0t5hpnwv4c1.cloudfront.net/840_cssSelectors/fixed.png" style="display: inline;" /&gt;&lt;/div&gt;
There we go; that fixes it!&lt;br /&gt;
&lt;h5&gt;
 &lt;a href="http://d2o0t5hpnwv4c1.cloudfront.net/840_cssSelectors/selectors/firstChild.html" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','d2o0t5hpnwv4c1.cloudfront.net']);"&gt;View Demo &lt;/a&gt;&lt;/h5&gt;
&lt;h3&gt;
 Compatibility&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;IE9+&lt;/li&gt;
&lt;li&gt;Firefox&lt;/li&gt;
&lt;li&gt;Chrome&lt;/li&gt;
&lt;li&gt;Safari&lt;/li&gt;
&lt;li&gt;Opera&lt;/li&gt;
&lt;/ul&gt;
&lt;i&gt;Yep - IE8 supported &lt;code&gt;:first-child&lt;/code&gt;, but not &lt;code&gt;:last-child&lt;/code&gt;. Go figure. &lt;/i&gt;&lt;br /&gt;
&lt;hr /&gt;
&lt;h2&gt;
 28. X:only-child&lt;/h2&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;div&amp;nbsp;p:only-child&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;color&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;red&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;div p:only-child {
   color: red;
}
&lt;/pre&gt;
Truthfully, you probably won't find yourself using the &lt;code&gt;only-child&lt;/code&gt; pseudo class too often. Nonetheless, it's available, should you need it.&lt;br /&gt;
It allows you to target elements which are the &lt;i&gt;only&lt;/i&gt; child of its parent. For example, referencing the snippet above, only the paragraph that is the only child of the &lt;code&gt;div&lt;/code&gt; will be colored, red.&lt;br /&gt;
Let's assume the following markup.&lt;br /&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-xml" start="1"&gt;
&lt;li class="alt"&gt;&lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;div&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;p&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;My&amp;nbsp;paragraph&amp;nbsp;here.&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;p&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;div&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;div&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;p&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;Two&amp;nbsp;paragraphs&amp;nbsp;total.&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;p&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;p&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;Two&amp;nbsp;paragraphs&amp;nbsp;total.&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;p&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;div&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="html" name="code" style="display: none;"&gt;&amp;lt;div&amp;gt;&amp;lt;p&amp;gt; My paragraph here. &amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;div&amp;gt;
   &amp;lt;p&amp;gt; Two paragraphs total. &amp;lt;/p&amp;gt;
   &amp;lt;p&amp;gt; Two paragraphs total. &amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/pre&gt;
In this case, the second &lt;code&gt;div&lt;/code&gt;'s paragraphs will not be targeted; only the first &lt;code&gt;div&lt;/code&gt;. As soon as you apply more than one child to an element, the &lt;code&gt;only-child&lt;/code&gt; pseudo class ceases to take effect.&lt;br /&gt;
&lt;h5&gt;
 &lt;a href="http://d2o0t5hpnwv4c1.cloudfront.net/840_cssSelectors/selectors/onlyChild.html" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','d2o0t5hpnwv4c1.cloudfront.net']);"&gt;View Demo &lt;/a&gt;&lt;/h5&gt;
&lt;h3&gt;
 Compatibility&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;IE9+&lt;/li&gt;
&lt;li&gt;Firefox&lt;/li&gt;
&lt;li&gt;Chrome&lt;/li&gt;
&lt;li&gt;Safari&lt;/li&gt;
&lt;li&gt;Opera&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;
 29. X:only-of-type&lt;/h2&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;li:only-of-type&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;font-weight&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;bold&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;li:only-of-type {
   font-weight: bold;
}
&lt;/pre&gt;
This structural pseudo class can be used in some clever ways. It will target elements that do not have any siblings within its parent container. As an example, let's target all &lt;code&gt;ul&lt;/code&gt;s, which have only a single list item.&lt;br /&gt;
First, ask yourself how you would accomplish this task? You could do &lt;code&gt;ul li&lt;/code&gt;, but, this would target &lt;i&gt;all&lt;/i&gt; list items. The only solution is to use &lt;code&gt;only-of-type&lt;/code&gt;.&lt;br /&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;ul&amp;nbsp;&amp;gt;&amp;nbsp;li:only-of-type&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;font-weight&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;bold&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;ul &amp;gt; li:only-of-type {
   font-weight: bold;
}
&lt;/pre&gt;
&lt;h5&gt;
 &lt;a href="http://d2o0t5hpnwv4c1.cloudfront.net/840_cssSelectors/selectors/onlyOfType.html" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','d2o0t5hpnwv4c1.cloudfront.net']);"&gt;View Demo &lt;/a&gt;&lt;/h5&gt;
&lt;h3&gt;
 Compatibility&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;IE9+&lt;/li&gt;
&lt;li&gt;Firefox 3.5+&lt;/li&gt;
&lt;li&gt;Chrome&lt;/li&gt;
&lt;li&gt;Safari&lt;/li&gt;
&lt;li&gt;Opera&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;
 30. X:first-of-type&lt;/h2&gt;
The &lt;code&gt;first-of-type&lt;/code&gt; pseudo class allows you to select the first siblings of its type.&lt;br /&gt;
&lt;h4&gt;
A Test&lt;/h4&gt;
To better understand this, let's have a test. Copy the following mark-up into your code editor:&lt;br /&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-xml" start="1"&gt;
&lt;li class="alt"&gt;&lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;div&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;p&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;My&amp;nbsp;paragraph&amp;nbsp;here.&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;p&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;ul&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;li&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;List&amp;nbsp;Item&amp;nbsp;1&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;li&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;li&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;List&amp;nbsp;Item&amp;nbsp;2&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;li&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;ul&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;ul&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;li&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;List&amp;nbsp;Item&amp;nbsp;3&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;li&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag-name"&gt;li&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;List&amp;nbsp;Item&amp;nbsp;4&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;li&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;ul&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;&lt;span class="tag"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag-name"&gt;div&lt;/span&gt;&lt;span class="tag"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="html" name="code" style="display: none;"&gt;&amp;lt;div&amp;gt;
   &amp;lt;p&amp;gt; My paragraph here. &amp;lt;/p&amp;gt;
   &amp;lt;ul&amp;gt;
      &amp;lt;li&amp;gt; List Item 1 &amp;lt;/li&amp;gt;
      &amp;lt;li&amp;gt; List Item 2 &amp;lt;/li&amp;gt;
   &amp;lt;/ul&amp;gt;
   &amp;lt;ul&amp;gt;
      &amp;lt;li&amp;gt; List Item 3 &amp;lt;/li&amp;gt;
      &amp;lt;li&amp;gt; List Item 4 &amp;lt;/li&amp;gt;
   &amp;lt;/ul&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/pre&gt;
Now, without reading further, try to figure out how to target only &lt;i&gt;"List Item 2"&lt;/i&gt;. When you've figured it out (or given up), read on.&lt;br /&gt;
&lt;h4&gt;
Solution 1&lt;/h4&gt;
There are a variety of ways to solve this test. We'll review a handful of them. Let's begin by using &lt;code&gt;first-of-type&lt;/code&gt;.&lt;br /&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;ul:first-of-type&amp;nbsp;&amp;gt;&amp;nbsp;li:nth-child(2)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;font-weight&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;bold&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;ul:first-of-type &amp;gt; li:nth-child(2) {
   font-weight: bold;
}
&lt;/pre&gt;
This snippet essentially says, "find the first unordered list on the page, then find only the immediate children, which are list items. Next, filter that down to only the second list item in that set.&lt;br /&gt;
&lt;h4&gt;
Solution 2&lt;/h4&gt;
Another option is to use the adjacent selector.&lt;br /&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;p&amp;nbsp;+&amp;nbsp;ul&amp;nbsp;li:last-child&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;font-weight&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;bold&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;p + ul li:last-child {
   font-weight: bold;
}
&lt;/pre&gt;
In this scenario, we find the &lt;code&gt;ul&lt;/code&gt; that immediately proceeds the &lt;code&gt;p&lt;/code&gt; tag, and then find the very last child of the element.&lt;br /&gt;
&lt;h4&gt;
Solution 3&lt;/h4&gt;
We can be as obnoxious or as playful as we want with these selectors.&lt;br /&gt;
&lt;div class="dp-highlighter"&gt;
&lt;div class="bar"&gt;
&lt;div class="tools"&gt;
&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class="dp-css" start="1"&gt;
&lt;li class="alt"&gt;ul:first-of-type&amp;nbsp;li:nth-last-child(1)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="keyword"&gt;font-weight&lt;/span&gt;:&amp;nbsp;&lt;span class="string"&gt;bold&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li class="alt"&gt;}&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;pre class="css" name="code" style="display: none;"&gt;ul:first-of-type li:nth-last-child(1) {
   font-weight: bold;
}
&lt;/pre&gt;
This time, we grab the first &lt;code&gt;ul&lt;/code&gt; on the page, and then find the very first list item, but starting from the bottom! :)&lt;br /&gt;
&lt;h5&gt;
 &lt;a href="http://d2o0t5hpnwv4c1.cloudfront.net/840_cssSelectors/selectors/firstOfType.html" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','d2o0t5hpnwv4c1.cloudfront.net']);"&gt;View Demo &lt;/a&gt;&lt;/h5&gt;
&lt;h3&gt;
 Compatibility&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;IE9+&lt;/li&gt;
&lt;li&gt;Firefox 3.5+&lt;/li&gt;
&lt;li&gt;Chrome&lt;/li&gt;
&lt;li&gt;Safari&lt;/li&gt;
&lt;li&gt;Opera&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;
 Conclusion&lt;/h2&gt;
If you're compensating for older browsers, like Internet Explorer 6, you still need to be careful when using these newer selectors. But, please don't let that deter you from learning these. You'd be doing a huge disservice to yourself. Be sure to &lt;a href="http://www.quirksmode.org/css/contents.html" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','www.quirksmode.org']);"&gt;refer here for a browser-compatibility list.&lt;/a&gt; Alternatively, you can use &lt;a href="http://code.google.com/p/ie7-js/" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','code.google.com']);"&gt;Dean Edward's excellent IE9.js script&lt;/a&gt; to bring support for these selectors to older browsers.&lt;br /&gt;
Secondly, when working with JavaScript libraries, like the popular jQuery, always try to use these native CSS3 selectors over the library's custom methods/selectors, when possible. I&lt;a href="http://jsperf.com/jquery-css3-not-vs-not" onclick="javascript:_gaq.push(['_trackEvent','outbound-article','jsperf.com']);"&gt;t'll make your code faster&lt;/a&gt;, as the selector engine can use the browser's native parsing, rather than its own.&lt;br /&gt;
Thanks for reading, and I hope you picked up a trick or two!&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://kidaworld.blogspot.com/2012/11/the-30-css-selectors-you-must-memorize.html</link><author>noreply@blogger.com (UXAWY)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8363405111659754159.post-8204405474820184989</guid><pubDate>Mon, 12 Nov 2012 12:58:00 +0000</pubDate><atom:updated>2012-11-12T04:58:41.148-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">css</category><title>Absolute vs. Relative Positioning</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/fixedvsrelative-0.jpg" width="510" /&gt;&lt;/div&gt;
When I was first learning web development, the style side of CSS seemed straightforward and fun, but performing layout feats seemed like a confusing mess. I sort of felt my way around without a solid understanding of how things like positioning and floats worked and as a result it would take hours to perform even simple tasks. If this situation sounds familiar, then this article is for you.&lt;br /&gt;
One of the real revelations that I had early on was when I was finally able to wrap my head around how positioning contexts worked, especially when it came to the difference between absolute and relative positioning. Today we’re going to tackle this subject and make sure you know exactly how and when to apply a specific positioning context to a given element. &lt;br /&gt;
&lt;span id="more-31366"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2&gt;
5 Different Position Values&lt;/h2&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/fixedvsrelative-3.jpg" width="510" /&gt;&lt;/div&gt;
Let’s get some complexity out of the way up front. In reality, there are a whopping &lt;b&gt;five&lt;/b&gt; different possible values for the &lt;i&gt;position&lt;/i&gt; property. We’ll largely skip over &lt;i&gt;inherit&lt;/i&gt; because it’s pretty self explanatory (simply inherits the value of its parent) and isn’t really supported well in older versions of IE.&lt;br /&gt;
The default &lt;i&gt;position&lt;/i&gt; value for any element on the page is &lt;i&gt;static&lt;/i&gt;. Any element with a &lt;i&gt;static&lt;/i&gt; positioning context will simply fall where you expect it to in the flow of the document. This of course entirely depends on the structure of your HTML. &lt;br /&gt;
Another value that you’ve no doubt seen is &lt;i&gt;fixed&lt;/i&gt;. This essentially anchors an object to the background so that wherever you place it, there it will stay. We often see this used on sidebar navigation elements. After scrolling down a long page of content, it’s a pain to go back to the top to navigate elsewhere so applying a fixed position to the navigation means the user never loses site of the menu. Click the image below to see a live example of this in action. &lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;a href="http://tinkerbin.com/NMUpJJZl"&gt;&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/fixedvsrelative-1.jpg" width="510" /&gt;&lt;/a&gt;&lt;/div&gt;
So there you have three &lt;i&gt;position&lt;/i&gt; values that are fairly straightforward and easy to wrap your mind around. The final two are of course &lt;i&gt;absolute&lt;/i&gt; and &lt;i&gt;relative&lt;/i&gt;. Let’s focus on explaining these independently and then take a look at how they can be used together to achieve unique results. &lt;br /&gt;
&lt;h2&gt;
Absolute Positioning&lt;/h2&gt;
Absolute positioning allows you to remove an object from the typical flow of the document and place it at a specific point on the page. To see how this works, let’s set up a simple unordered list of items that we’ll turn into clearly discernible rectangles. &lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/fixedvsrelative-2.jpg" width="510" /&gt;&lt;/div&gt;
As we’ve already learned, by default these items will have a static position applied. That means they follow the standard flow of the document and are positioned according to the margins that I’ve placed on the list. Now let’s see what happens if I target one of these list items and apply a value of &lt;i&gt;absolute&lt;/i&gt; to the position property. &lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/fixedvsrelative-4.jpg" width="510" /&gt;&lt;/div&gt;
As you can see, the fourth list item was completely removed from the normal flow and placed at the top left corner of the browser window. Note that even if there were other content occupying this position, this element wouldn’t care. When something has absolute positioning applied, it neither affects nor is affected by other elements in the normal flow of the page. &lt;br /&gt;
The reason for absolute positioning is so we can position this item precisely where we want it. We do this with the top, bottom, left and right CSS properties. For instance, let’s say we wanted the fourth list item to be placed twenty pixels from the topside of the browser window and twenty pixels from the left side. &lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/fixedvsrelative-5.jpg" width="510" /&gt;&lt;/div&gt;
To prove our earlier point about absolutely positioned items not interacting with other content, let’s move the fourth list item right into the territory of the other list items. Watch how it simply overlaps the existing content instead of pushing it around. Click on the image below to see and tweak a live example of this test. &lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;a href="http://tinkerbin.com/GqfhucDo"&gt;&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/fixedvsrelative-6.jpg" width="510" /&gt;&lt;/a&gt;&lt;/div&gt;
As one final note, notice how the fifth list item occupies the position previously held by the fourth rather than holding its position as if the fourth were still in place. Since the fourth item has been removed from the flow, everything else will adjust accordingly. &lt;br /&gt;
&lt;h2&gt;
Relative Positioning&lt;/h2&gt;
Relative positioning works similarly to absolute positioning in that you can use top, bottom, left and right to scoot an object to a specific point on the page. The primary difference is the origin or starting point for the element. As we saw above, with absolute positioning, the starting point was at the very top left of the browser window. Check out what happens when we apply relative positioning though:&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/fixedvsrelative-7.jpg" width="510" /&gt;&lt;/div&gt;
Nothing happened! Or did it? As it turns out, the object is indeed relatively positioned now, but its starting point is where it normally lies in the flow of the document, not the top left of the page. Now if we apply the same 20px adjustments that we used before, the result is quite different.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/fixedvsrelative-8.jpg" width="510" /&gt;&lt;/div&gt;
This time the item was moved “relative” to its starting position. This is extremely helpful for when you want to slightly tweak an object’s position rather than completely reset it altogether. Notice that, just as with absolute positioning, the relatively positioned object doesn’t care about other items in the normal low of the page. However, the original position occupied by the relatively positioned element hasn’t been occupied by the next list item as it did with absolutely positioned elements, instead the document acts as if the fourth item still occupies that position.&lt;br /&gt;
&lt;h2&gt;
Putting Them Together&lt;/h2&gt;
Now that you know how absolute and relative positioning work on their own, it’s time to dive into a more complex example and see how they can work together in a truly useful manner. This time we’re going to build a nice little demo to show off how it all works.&lt;br /&gt;
&lt;h3&gt;
HTML&lt;/h3&gt;
Start with a simple div with a class of “photo” and place a 200x200px image inside. This is all the HTML we need so after you’ve got this, move over to some CSS.&lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  xml" id="highlighter_750888"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
1&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
2&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
3&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
4&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
5&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
6&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="xml plain"&gt;&amp;lt;&lt;/code&gt;&lt;code class="xml keyword"&gt;div&lt;/code&gt; &lt;code class="xml color1"&gt;class&lt;/code&gt;&lt;code class="xml plain"&gt;=&lt;/code&gt;&lt;code class="xml string"&gt;"photo"&lt;/code&gt;&lt;code class="xml plain"&gt;&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="xml spaces"&gt;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="xml plain"&gt;&amp;lt;&lt;/code&gt;&lt;code class="xml keyword"&gt;img&lt;/code&gt; &lt;code class="xml color1"&gt;src&lt;/code&gt;&lt;code class="xml plain"&gt;=&lt;/code&gt;&lt;code class="xml string"&gt;"&lt;a href="http://lorempixum.com/200/200/people/9"&gt;http://lorempixum.com/200/200/people/9&lt;/a&gt;"&lt;/code&gt; &lt;code class="xml plain"&gt;/&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="xml plain"&gt;&amp;lt;/&lt;/code&gt;&lt;code class="xml keyword"&gt;div&lt;/code&gt;&lt;code class="xml plain"&gt;&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
&lt;code class="xml plain"&gt;&amp;lt;/&lt;/code&gt;&lt;code class="xml keyword"&gt;pre&lt;/code&gt;&lt;code class="xml plain"&gt;&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
&lt;code class="xml plain"&gt;&amp;lt;/&lt;/code&gt;&lt;code class="xml keyword"&gt;div&lt;/code&gt;&lt;code class="xml plain"&gt;&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
&lt;code class="xml plain"&gt;&amp;lt;&lt;/code&gt;&lt;code class="xml keyword"&gt;br&lt;/code&gt; &lt;code class="xml plain"&gt;/&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h3&gt;
Basic CSS&lt;/h3&gt;
In your CSS, start by changing the body color to something dark. Then apply some basic styles to the photo element and give it some nice border and shadow styles. &lt;br /&gt;
&lt;div&gt;
&lt;div class="syntaxhighlighter  css" id="highlighter_940425"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;
01&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
02&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
03&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
04&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
05&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
06&lt;/div&gt;
&lt;div class="line number7 index6 alt2"&gt;
07&lt;/div&gt;
&lt;div class="line number8 index7 alt1"&gt;
08&lt;/div&gt;
&lt;div class="line number9 index8 alt2"&gt;
09&lt;/div&gt;
&lt;div class="line number10 index9 alt1"&gt;
10&lt;/div&gt;
&lt;div class="line number11 index10 alt2"&gt;
11&lt;/div&gt;
&lt;div class="line number12 index11 alt1"&gt;
12&lt;/div&gt;
&lt;div class="line number13 index12 alt2"&gt;
13&lt;/div&gt;
&lt;div class="line number14 index13 alt1"&gt;
14&lt;/div&gt;
&lt;div class="line number15 index14 alt2"&gt;
15&lt;/div&gt;
&lt;div class="line number16 index15 alt1"&gt;
16&lt;/div&gt;
&lt;div class="line number17 index16 alt2"&gt;
17&lt;/div&gt;
&lt;div class="line number18 index17 alt1"&gt;
18&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="css plain"&gt;body {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;code class="css spaces"&gt;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="css keyword"&gt;background&lt;/code&gt;&lt;code class="css plain"&gt;: &lt;/code&gt;&lt;code class="css value"&gt;#222&lt;/code&gt;&lt;code class="css plain"&gt;;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;code class="css plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
&lt;code class="css plain"&gt;.photo {&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
&lt;code class="css spaces"&gt;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="css keyword"&gt;border&lt;/code&gt;&lt;code class="css plain"&gt;: &lt;/code&gt;&lt;code class="css value"&gt;5px&lt;/code&gt; &lt;code class="css value"&gt;solid&lt;/code&gt; &lt;code class="css value"&gt;white&lt;/code&gt;&lt;code class="css plain"&gt;;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number7 index6 alt2"&gt;
&lt;code class="css spaces"&gt;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="css keyword"&gt;height&lt;/code&gt;&lt;code class="css plain"&gt;: &lt;/code&gt;&lt;code class="css value"&gt;200px&lt;/code&gt;&lt;code class="css plain"&gt;;&amp;nbsp; &lt;/code&gt;&lt;/div&gt;
&lt;div class="line number8 index7 alt1"&gt;
&lt;code class="css spaces"&gt;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="css keyword"&gt;width&lt;/code&gt;&lt;code class="css plain"&gt;: &lt;/code&gt;&lt;code class="css value"&gt;200px&lt;/code&gt;&lt;code class="css plain"&gt;;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number9 index8 alt2"&gt;
&lt;code class="css spaces"&gt;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="css keyword"&gt;margin&lt;/code&gt;&lt;code class="css plain"&gt;: &lt;/code&gt;&lt;code class="css value"&gt;50px&lt;/code&gt; &lt;code class="css value"&gt;auto&lt;/code&gt;&lt;code class="css plain"&gt;;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number10 index9 alt1"&gt;
&lt;/div&gt;
&lt;div class="line number11 index10 alt2"&gt;
&lt;code class="css spaces"&gt;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class="line number12 index11 alt1"&gt;
&lt;code class="css spaces"&gt;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="css comments"&gt;/*overly complex but cool shadow*/&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number13 index12 alt2"&gt;
&lt;code class="css spaces"&gt;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="css plain"&gt;-webkit-box-shadow: &lt;/code&gt;&lt;code class="css value"&gt;0px&lt;/code&gt; &lt;code class="css value"&gt;10px&lt;/code&gt; &lt;code class="css value"&gt;7px&lt;/code&gt; &lt;code class="css plain"&gt;rgba(&lt;/code&gt;&lt;code class="css value"&gt;0&lt;/code&gt;&lt;code class="css plain"&gt;,&lt;/code&gt;&lt;code class="css value"&gt;0&lt;/code&gt;&lt;code class="css plain"&gt;,&lt;/code&gt;&lt;code class="css value"&gt;0&lt;/code&gt;&lt;code class="css plain"&gt;,&lt;/code&gt;&lt;code class="css value"&gt;0.4&lt;/code&gt;&lt;code class="css plain"&gt;), &lt;/code&gt;&lt;code class="css value"&gt;0px&lt;/code&gt; &lt;code class="css value"&gt;20px&lt;/code&gt; &lt;code class="css value"&gt;10px&lt;/code&gt; &lt;code class="css plain"&gt;rgba(&lt;/code&gt;&lt;code class="css value"&gt;0&lt;/code&gt;&lt;code class="css plain"&gt;,&lt;/code&gt;&lt;code class="css value"&gt;0&lt;/code&gt;&lt;code class="css plain"&gt;,&lt;/code&gt;&lt;code class="css value"&gt;0&lt;/code&gt;&lt;code class="css plain"&gt;,&lt;/code&gt;&lt;code class="css value"&gt;0.2&lt;/code&gt;&lt;code class="css plain"&gt;);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number14 index13 alt1"&gt;
&lt;code class="css spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="css plain"&gt;-moz-box-shadow: &lt;/code&gt;&lt;code class="css value"&gt;0px&lt;/code&gt; &lt;code class="css value"&gt;10px&lt;/code&gt; &lt;code class="css value"&gt;7px&lt;/code&gt; &lt;code class="css plain"&gt;rgba(&lt;/code&gt;&lt;code class="css value"&gt;0&lt;/code&gt;&lt;code class="css plain"&gt;,&lt;/code&gt;&lt;code class="css value"&gt;0&lt;/code&gt;&lt;code class="css plain"&gt;,&lt;/code&gt;&lt;code class="css value"&gt;0&lt;/code&gt;&lt;code class="css plain"&gt;,&lt;/code&gt;&lt;code class="css value"&gt;0.4&lt;/code&gt;&lt;code class="css plain"&gt;), &lt;/code&gt;&lt;code class="css value"&gt;0px&lt;/code&gt; &lt;code class="css value"&gt;20px&lt;/code&gt; &lt;code class="css value"&gt;10px&lt;/code&gt; &lt;code class="css plain"&gt;rgba(&lt;/code&gt;&lt;code class="css value"&gt;0&lt;/code&gt;&lt;code class="css plain"&gt;,&lt;/code&gt;&lt;code class="css value"&gt;0&lt;/code&gt;&lt;code class="css plain"&gt;,&lt;/code&gt;&lt;code class="css value"&gt;0&lt;/code&gt;&lt;code class="css plain"&gt;,&lt;/code&gt;&lt;code class="css value"&gt;0.2&lt;/code&gt;&lt;code class="css plain"&gt;);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number15 index14 alt2"&gt;
&lt;code class="css spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="css plain"&gt;box-shadow: &lt;/code&gt;&lt;code class="css value"&gt;0px&lt;/code&gt; &lt;code class="css value"&gt;10px&lt;/code&gt; &lt;code class="css value"&gt;7px&lt;/code&gt; &lt;code class="css plain"&gt;rgba(&lt;/code&gt;&lt;code class="css value"&gt;0&lt;/code&gt;&lt;code class="css plain"&gt;,&lt;/code&gt;&lt;code class="css value"&gt;0&lt;/code&gt;&lt;code class="css plain"&gt;,&lt;/code&gt;&lt;code class="css value"&gt;0&lt;/code&gt;&lt;code class="css plain"&gt;,&lt;/code&gt;&lt;code class="css value"&gt;0.4&lt;/code&gt;&lt;code class="css plain"&gt;), &lt;/code&gt;&lt;code class="css value"&gt;0px&lt;/code&gt; &lt;code class="css value"&gt;20px&lt;/code&gt; &lt;code class="css value"&gt;10px&lt;/code&gt; &lt;code class="css plain"&gt;rgba(&lt;/code&gt;&lt;code class="css value"&gt;0&lt;/code&gt;&lt;code class="css plain"&gt;,&lt;/code&gt;&lt;code class="css value"&gt;0&lt;/code&gt;&lt;code class="css plain"&gt;,&lt;/code&gt;&lt;code class="css value"&gt;0&lt;/code&gt;&lt;code class="css plain"&gt;,&lt;/code&gt;&lt;code class="css value"&gt;0.2&lt;/code&gt;&lt;code class="css plain"&gt;);&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number16 index15 alt1"&gt;
&lt;code class="css plain"&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number17 index16 alt2"&gt;
&lt;code class="css plain"&gt;&amp;lt;/&lt;/code&gt;&lt;code class="css value"&gt;pre&lt;/code&gt;&lt;code class="css plain"&gt;&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number18 index17 alt1"&gt;
&lt;code class="css plain"&gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
Here’s the resulting image. It’s nothing special, but it will provide a great testing ground for our positioning experiment. &lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/fixedvsrelative-9.jpg" width="510" /&gt;&lt;/div&gt;
&lt;h3&gt;
Applying a Strip of Tape&lt;/h3&gt;
Let’s say we wanted to create the illusion that this photo was hanging from the background, connected by a small strip of tape. To pull this off, we’ll need to flex our newfound positioning muscle and leverage some pseudo elements.&lt;br /&gt;
The first thing we want to do is use the :before pseudo element to create our strip of tape. We’ll give it a height of 20px and a width of 100px, then set the background to white at 50% opacity. I’ll finish by adding in a slight box-shadow. &lt;br /&gt;
&lt;div style="background-color: #eeeeee; overflow: auto;"&gt;
&lt;div class="wp_syntax"&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family: monospace;"&gt;&lt;span style="color: #6666ff;"&gt;.photo&lt;/span&gt;&lt;span style="color: #3333ff;"&gt;:before &lt;/span&gt;&lt;span style="color: #00aa00;"&gt;{&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;content&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: red;"&gt;""&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;height&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;20px&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;100px&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; rgba&lt;span style="color: #00aa00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;255&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;255&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;255&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.5&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;)&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
&amp;nbsp;
  -webkit-box-shadow&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;0px&lt;/span&gt; &lt;span style="color: #993333;"&gt;1px&lt;/span&gt; &lt;span style="color: #993333;"&gt;3px&lt;/span&gt; rgba&lt;span style="color: #00aa00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.4&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;)&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
     -moz-box-shadow&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;0px&lt;/span&gt; &lt;span style="color: #993333;"&gt;1px&lt;/span&gt; &lt;span style="color: #993333;"&gt;3px&lt;/span&gt; rgba&lt;span style="color: #00aa00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.4&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;)&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
          box-shadow&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;0px&lt;/span&gt; &lt;span style="color: #993333;"&gt;1px&lt;/span&gt; &lt;span style="color: #993333;"&gt;3px&lt;/span&gt; rgba&lt;span style="color: #00aa00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.4&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;)&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00aa00;"&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;!-- br--&gt;&lt;br /&gt;
If we look at a live preview of our page after this code, we can see that we really screwed up our image. The piece of tape is really interfering with the flow of the document. Even though it’s not really visible, it has bumped our image right out of its border!&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/fixedvsrelative-10.jpg" width="510" /&gt;&lt;/div&gt;
Obviously, we’ve got some issues with how the pseudo element is being positioned. To attempt to fix this, let’s see what happens if we apply relative positioning to the piece of tape. &lt;br /&gt;
&lt;div style="background-color: #eeeeee; overflow: auto;"&gt;
&lt;div class="wp_syntax"&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family: monospace;"&gt;&lt;span style="color: #6666ff;"&gt;.photo&lt;/span&gt;&lt;span style="color: #3333ff;"&gt;:before &lt;/span&gt;&lt;span style="color: #00aa00;"&gt;{&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;content&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: red;"&gt;""&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;height&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;20px&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;100px&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; rgba&lt;span style="color: #00aa00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;255&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;255&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;255&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.5&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;)&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;position&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;relative&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;top&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;0px&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;left&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;0px&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
&amp;nbsp;
  -webkit-box-shadow&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;0px&lt;/span&gt; &lt;span style="color: #993333;"&gt;1px&lt;/span&gt; &lt;span style="color: #993333;"&gt;3px&lt;/span&gt; rgba&lt;span style="color: #00aa00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.4&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;)&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
     -moz-box-shadow&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;0px&lt;/span&gt; &lt;span style="color: #993333;"&gt;1px&lt;/span&gt; &lt;span style="color: #993333;"&gt;3px&lt;/span&gt; rgba&lt;span style="color: #00aa00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.4&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;)&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
          box-shadow&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;0px&lt;/span&gt; &lt;span style="color: #993333;"&gt;1px&lt;/span&gt; &lt;span style="color: #993333;"&gt;3px&lt;/span&gt; rgba&lt;span style="color: #00aa00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.4&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;)&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00aa00;"&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;!-- br--&gt;&lt;br /&gt;
Here’s the effect of this code:&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/fixedvsrelative-10.jpg" width="510" /&gt;&lt;/div&gt;
As you can see, we didn’t fix our problem, everything is just as screwed up as before. Since this didn’t work, let’s take the opposite route and see what happens if we use absolute positioning. &lt;br /&gt;
&lt;div style="background-color: #eeeeee; overflow: auto;"&gt;
&lt;div class="wp_syntax"&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family: monospace;"&gt;&lt;span style="color: #6666ff;"&gt;.photo&lt;/span&gt;&lt;span style="color: #3333ff;"&gt;:before &lt;/span&gt;&lt;span style="color: #00aa00;"&gt;{&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;content&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: red;"&gt;""&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;height&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;20px&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;100px&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; rgba&lt;span style="color: #00aa00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;255&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;255&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;255&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.5&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;)&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;position&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;absolute&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;top&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;0px&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;left&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;0px&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
&amp;nbsp;
  -webkit-box-shadow&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;0px&lt;/span&gt; &lt;span style="color: #993333;"&gt;1px&lt;/span&gt; &lt;span style="color: #993333;"&gt;3px&lt;/span&gt; rgba&lt;span style="color: #00aa00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.4&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;)&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
     -moz-box-shadow&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;0px&lt;/span&gt; &lt;span style="color: #993333;"&gt;1px&lt;/span&gt; &lt;span style="color: #993333;"&gt;3px&lt;/span&gt; rgba&lt;span style="color: #00aa00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.4&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;)&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
          box-shadow&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;0px&lt;/span&gt; &lt;span style="color: #993333;"&gt;1px&lt;/span&gt; &lt;span style="color: #993333;"&gt;3px&lt;/span&gt; rgba&lt;span style="color: #00aa00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.4&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;)&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00aa00;"&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;!-- br--&gt;&lt;br /&gt;
Here’s what our demo looks like now:&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/fixedvsrelative-11.jpg" width="510" /&gt;&lt;/div&gt;
Our tape has finally made an appearance! Unfortunately, it’s way up in the corner. We could nudge it into place with the top and left values, but that wouldn’t actually be a workable solution. The reason is that this would put the tape at a specific point on the background, where it would stay no matter what. However, the image has been automatically centered in the viewport so as you change the window size it actually moves, meaning the piece of tape won’t be correctly positioned anymore. &lt;br /&gt;
So now we’ve tried both relative and absolute positioning with neither providing the solution we want. Where do we turn next? As it turns out, we haven’t really gotten the full story behind absolute positioning yet. You see, it doesn’t always default to the top left of the browser window. Instead, what &lt;i&gt;position: absolute;&lt;/i&gt; really does is position the element &lt;b&gt;relative to its first non-statically-positioned ancestor&lt;/b&gt; (inherit doesn’t count either). Since there hasn’t been one of those in previous examples, it was simply reset to the origin of the page.&lt;br /&gt;
So how does this translate into useful information? It turns out, we can use absolute positioning on our piece of tape, but we first need to add a positioning context to its ancestor, the photo. Now, we don’t want to absolutely position that element because we don’t want it to move anywhere. Thus, we apply relative positioning to it. Let’s see what this looks like.&lt;br /&gt;
&lt;div style="background-color: #eeeeee; overflow: auto;"&gt;
&lt;div class="wp_syntax"&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family: monospace;"&gt;&lt;span style="color: #6666ff;"&gt;.photo&lt;/span&gt; &lt;span style="color: #00aa00;"&gt;{&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;50px&lt;/span&gt; &lt;span style="color: #993333;"&gt;auto&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;border&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;5px&lt;/span&gt; &lt;span style="color: #993333;"&gt;solid&lt;/span&gt; &lt;span style="color: #993333;"&gt;white&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;200px&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;height&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;200px&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;position&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;relative&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
&amp;nbsp;
  &lt;span style="color: grey; font-style: italic;"&gt;/*overly complex but cool shadow*/&lt;/span&gt;
  -webkit-box-shadow&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;0px&lt;/span&gt; &lt;span style="color: #993333;"&gt;10px&lt;/span&gt; &lt;span style="color: #993333;"&gt;7px&lt;/span&gt; rgba&lt;span style="color: #00aa00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.4&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;)&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt; &lt;span style="color: #993333;"&gt;0px&lt;/span&gt; &lt;span style="color: #993333;"&gt;20px&lt;/span&gt; &lt;span style="color: #993333;"&gt;10px&lt;/span&gt; rgba&lt;span style="color: #00aa00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.2&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;)&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
     -moz-box-shadow&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;0px&lt;/span&gt; &lt;span style="color: #993333;"&gt;10px&lt;/span&gt; &lt;span style="color: #993333;"&gt;7px&lt;/span&gt; rgba&lt;span style="color: #00aa00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.4&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;)&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt; &lt;span style="color: #993333;"&gt;0px&lt;/span&gt; &lt;span style="color: #993333;"&gt;20px&lt;/span&gt; &lt;span style="color: #993333;"&gt;10px&lt;/span&gt; rgba&lt;span style="color: #00aa00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.2&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;)&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
          box-shadow&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;0px&lt;/span&gt; &lt;span style="color: #993333;"&gt;10px&lt;/span&gt; &lt;span style="color: #993333;"&gt;7px&lt;/span&gt; rgba&lt;span style="color: #00aa00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.4&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;)&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt; &lt;span style="color: #993333;"&gt;0px&lt;/span&gt; &lt;span style="color: #993333;"&gt;20px&lt;/span&gt; &lt;span style="color: #993333;"&gt;10px&lt;/span&gt; rgba&lt;span style="color: #00aa00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.2&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;)&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00aa00;"&gt;}&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&lt;span style="color: #6666ff;"&gt;.photo&lt;/span&gt;&lt;span style="color: #3333ff;"&gt;:before &lt;/span&gt;&lt;span style="color: #00aa00;"&gt;{&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;content&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: red;"&gt;""&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;height&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;20px&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;100px&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; rgba&lt;span style="color: #00aa00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;255&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;255&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;255&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.5&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;)&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;position&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;absolute&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;top&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;0px&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;left&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;0px&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
&amp;nbsp;
  -webkit-box-shadow&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;0px&lt;/span&gt; &lt;span style="color: #993333;"&gt;1px&lt;/span&gt; &lt;span style="color: #993333;"&gt;3px&lt;/span&gt; rgba&lt;span style="color: #00aa00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.4&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;)&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
     -moz-box-shadow&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;0px&lt;/span&gt; &lt;span style="color: #993333;"&gt;1px&lt;/span&gt; &lt;span style="color: #993333;"&gt;3px&lt;/span&gt; rgba&lt;span style="color: #00aa00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.4&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;)&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
          box-shadow&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;0px&lt;/span&gt; &lt;span style="color: #993333;"&gt;1px&lt;/span&gt; &lt;span style="color: #993333;"&gt;3px&lt;/span&gt; rgba&lt;span style="color: #00aa00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.4&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;)&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00aa00;"&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;!-- br--&gt;&lt;br /&gt;
As you can see, the pseudo element has absolute positioning applied, which means it will choose a starting point given the location of its first non-static ancestor. Since I’ve applied relative positioning to the photo, that item fits this description. So now our piece of tape will begin at the origin of the photo (even if the photo moves due to browser resizing).&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/fixedvsrelative-12.jpg" width="510" /&gt;&lt;/div&gt;
Now that we have found the starting position that we were looking for, we can tweak the top and left values to nudge the tape into place. Notice that I’ve applied a negative value to the top property so the tape sticks out of the image onto the background. The left position is set to center the tape horizontally (&lt;a href="http://new.instacalc.com/1342"&gt;click here&lt;/a&gt; to see how the math works out). &lt;br /&gt;
&lt;div style="background-color: #eeeeee; overflow: auto;"&gt;
&lt;div class="wp_syntax"&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family: monospace;"&gt;&lt;span style="color: #6666ff;"&gt;.photo&lt;/span&gt;&lt;span style="color: #3333ff;"&gt;:before &lt;/span&gt;&lt;span style="color: #00aa00;"&gt;{&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;content&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: red;"&gt;""&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;height&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;20px&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;100px&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; rgba&lt;span style="color: #00aa00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;255&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;255&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;255&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.5&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;)&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;position&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;absolute&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;top&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;-15px&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
  &lt;span style="color: black; font-weight: bold;"&gt;left&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;50px&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
&amp;nbsp;
  -webkit-box-shadow&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;0px&lt;/span&gt; &lt;span style="color: #993333;"&gt;1px&lt;/span&gt; &lt;span style="color: #993333;"&gt;3px&lt;/span&gt; rgba&lt;span style="color: #00aa00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.4&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;)&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
     -moz-box-shadow&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;0px&lt;/span&gt; &lt;span style="color: #993333;"&gt;1px&lt;/span&gt; &lt;span style="color: #993333;"&gt;3px&lt;/span&gt; rgba&lt;span style="color: #00aa00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.4&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;)&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
          box-shadow&lt;span style="color: #00aa00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;0px&lt;/span&gt; &lt;span style="color: #993333;"&gt;1px&lt;/span&gt; &lt;span style="color: #993333;"&gt;3px&lt;/span&gt; rgba&lt;span style="color: #00aa00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.4&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;)&lt;/span&gt;&lt;span style="color: #00aa00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00aa00;"&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;!-- br--&gt;&lt;br /&gt;
As we can see in the finished version below, combining absolute and relative positioning was exactly what we needed to pull off the effect that we were going for. Click the image below to see and tweak the live demo.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;a href="http://tinkerbin.com/bynpIxUx"&gt;&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/fixedvsrelative-13.jpg" width="510" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h2&gt;
A Quick Summary&lt;/h2&gt;
Positioning contexts can be difficult to wield if you’re attempting to implement them without a solid foundation of knowledge behind how they work. Fortunately, there are only three primary pieces of information that you need to remember to master absolute and relative positioning.&lt;br /&gt;
The first is that relative positioning will allow you to tweak an element’s position relative to its normal starting point. The second is that absolute positioning will allow you to tweak an element’s position relative to its first non-statically-positioned ancestor (defaults to page bounds if none is found). The final piece of information to remember is that both relatively and absolutely positioned items won’t affect the static and fixed items around them (absolutely positioned items are removed from the flow, relatively positioned items occupy their original position). &lt;br /&gt;
If you enjoyed this tutorial, leave a comment below and let us know. Are there any other foundational areas of CSS that you struggle with that you’d like us to cover?&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://kidaworld.blogspot.com/2012/11/absolute-vs-relative-positioning.html</link><author>noreply@blogger.com (UXAWY)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8363405111659754159.post-3917597991367406855</guid><pubDate>Mon, 12 Nov 2012 12:54:00 +0000</pubDate><atom:updated>2012-11-12T04:54:45.981-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">css</category><title>Everything You Never Knew About CSS Floats</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/cssfloats101-0.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;What do floats really do anyway? How do they affect the box model of the elements involved? How do floated elements differ from inline elements? What are the specific rules governing the position of floated elements? How does the clear property work and what is it for?&lt;/p&gt;
&lt;p&gt;Floats can trip up even experienced developers and understanding their behavior can really set you free from many of the woes that you face with CSS. Even if you think you already know all about floats, we’ll dive deep enough that you just might learn something new!&lt;/p&gt;
&lt;p&gt;&lt;span id="more-31826"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;What Is a Float?&lt;/h2&gt;
&lt;p&gt;Some elements in CSS are block level elements, which means they automatically start a new line. For instance, if you create two single word paragraph elements, they won’t flow into each other but will appear on separate lines. Other elements are inline elements. This means that they appear “in line” with the previous content. One example is an anchor tag, which can appear within another element such as a paragraph without causing any extra whitespace or new lines to occur. &lt;/p&gt;
&lt;p&gt;One way to cheat this model of layout is to use floats, which allow a given element to shift to one side of its line and have other content flow down its side. A right-floated element will be pushed all the way to the right of its container and have content flow down its left side and a left-floated element will be pushed all the way to the left side with content flowing down its right side. &lt;/p&gt;
&lt;p&gt;The classic example is when you toss an image in with a paragraph and want the two to appear side by side rather than stacked. First we create both elements with some HTML:&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="html4strict" style="font-family:monospace;"&gt;&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://lorempixum.com/200/200/"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;Lorem ipsum...&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;Alone, this code does not produce the effect that we want. The paragraph element is a block level element that appears on its own line and so the paragraph and the image are shown stacked in the normal document flow. &lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/cssfloats101-3.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;We can change this behavior by floating our image to the right. The CSS for this is very basic:&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;img &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;float&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;right&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;20px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;With this code in place, our image is scooted to the right side of its line and the paragraph is allowed to flow down its left side. Click &lt;a href="http://tinkerbin.com/Xxkz9XN1"&gt;here&lt;/a&gt; or on the image below to see and tweak a live example of this code in action.&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;a href="http://tinkerbin.com/Xxkz9XN1"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/cssfloats101-1.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;One interesting thing about the behavior of this image now that it is floated is that our other content will actually attempt to wrap around it where possible. If we resize our container or browser window to be narrower, the text simply reflows itself so that it never touches the image.&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;a href="http://tinkerbin.com/Xxkz9XN1"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/cssfloats101-2.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h3&gt;How the Box Works&lt;/h3&gt;
&lt;p&gt;Odds are you already understood this behavior to a decent degree. However, in order to wield floats properly, you need to understand how these two elements are interacting on deeper level. For instance, how do we add extra margin between the paragraph and the image? You might think that this will work:&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;p &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;20px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;However, this won’t put even a single pixel of extra space between the image and the paragraph. Instead, we have to apply our margin to the image:&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;img &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;20px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/cssfloats101-4.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;The question you should be asking yourself is, “why?” Why wouldn’t increasing the paragraph margin increase the space between the image and the paragraph? The reason is that we’re failing to grasp the box model as it pertains to that paragraph. &lt;/p&gt;
&lt;p&gt;If you’re ever doubtful about how your layout is working on a basic level, try applying a border or two to see what’s going on. If we use this technique on the paragraph, the result may surprise you.&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;p &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;border&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;solid&lt;/span&gt; &lt;span style="color: #933;"&gt;1px&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;black&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/cssfloats101-5.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;As you can see, the image is actually inside of the paragraph’s box! This solves our margin riddle. Any margin that we add to the paragraph is being applied way off to the right of the image, this is why it doesn’t increase the space between the image and the paragraph. &lt;/p&gt;
&lt;p&gt;If we wanted the change this behavior so that the paragraph doesn’t wrap around the image, we could float the paragraph to the left and give it a specified width (without expressing the width, the paragraph is 100% wide and won’t fit next to the image).&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;img &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;float&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;right&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;20px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
p &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;float&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;left&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;220px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;20px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/cssfloats101-6.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;h2&gt;Crazy Float Rules&lt;/h2&gt;
&lt;p&gt;Now we know what a float is and how it affects the boxes of the elements that are involved. Let’s move on to another piece of information that many developers probably don’t understand in the least: the rules that govern a floated element’s position.&lt;/p&gt;
&lt;p&gt;It’s often the case that developers will use floats to govern the positioning of list items, perhaps in an image gallery or feature listing. Let’s see how this works by creating a simple list full of images.&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="html4strict" style="font-family:monospace;"&gt;&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;ul&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/100x100&amp;amp;text=1"&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/100x150&amp;amp;text=2"&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/100x100&amp;amp;text=3"&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/100x100&amp;amp;text=4"&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/100x100&amp;amp;text=5"&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/100x150&amp;amp;text=6"&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/100x100&amp;amp;text=7"&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;ul&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;By default, all the list items will appear in a big vertical stack, which obviously means that they are block level elements. Even though the images are inline elements, they’ll be governed by their parent block level list items. To fix this, we might float the list items to the left. When multiple items in a row are floated, they take on a similar effect to a stream of inline elements. However, as we’ll see, there are some key differences. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;li &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;float&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;left&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;4px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;Now, if all of our images were the same height, this would be a pretty unremarkable example. The result would look like a simple image gallery with the images appearing in order from left to right:&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/cssfloats101-7.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;However, our images are not the same height, some of them are 100px tall, others are 150px tall. This causes some seriously wacky results! Click &lt;a href="http://tinkerbin.com/cUgurBCf"&gt;here&lt;/a&gt; or on the image below to see this effect live.&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;a href="http://tinkerbin.com/cUgurBCf"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/cssfloats101-8.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;The first time I saw this effect, I was baffled. What in the world was going on here? Why is image number four off to the right side like that? Shouldn’t it be trying to float itself as far left as possible? If we remove the float and instead use &lt;em&gt;display: inline&lt;/em&gt; on the list items, the result is drastically different. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;li &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;display&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;inline&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/cssfloats101-9.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;For starters, this example is different in the fact that the images are defaulting to a state of being vertically aligned along their bottom edges. This causes them to look quite different than our previous example, but we can fix this with a single line of CSS. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;img &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;	
  &lt;span style="color: #000000; font-weight: bold;"&gt;vertical-align&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;top&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;Now we’re starting to look a lot like the float example, only displaying the list items inline has a much more predictable stacking order. When there’s no room on the x-axis for the next item, it starts back on the left slide in the next line. &lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/cssfloats101-10.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;So why doesn’t our floated image gallery work like this? What strange voodoo governs floated items?&lt;/p&gt;
&lt;h3&gt;Translation Required&lt;/h3&gt;
&lt;p&gt;It turns out, the CSS spec outlines a list of &lt;a href="http://www.w3.org/TR/CSS2/visuren.html#float-rules"&gt;nine rules&lt;/a&gt; that govern the behavior of floats. The problem with this list though is that it was written so that only lawyers and other boring people can understand it. Here’s a direct quote from one of the rules:&lt;/p&gt;
&lt;div style="overflow: auto; color: #4e4e4e; background-color: #eeeeee; padding: 20px; font: italic 15px/1.5 Georgia, serif; border: 1px solid #ccc;"&gt;
“If the current box is left-floating, and there are any left-floating boxes generated by elements earlier in the source document, then for each such earlier box, either the left outer edge of the current box must be to the right of the right outer edge of the earlier box, or its top must be lower than the bottom of the earlier box. Analogous rules hold for right-floating boxes.”
&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;Maybe your reading comprehension is higher than mine, but this and the other rules in the list made my head spin. All this talk of the left outer edge being to the right of the right outer edge is actually pretty basic stuff dressed up to sound complicated. To make things simpler, here are Josh Johnson’s nine rules for float behavior, translated into English for your convenience. &lt;/p&gt;
&lt;div style="overflow: auto; color: #4e4e4e; background-color: #eeeeee; padding: 20px; font: 15px/1.5 Georgia, serif; border: 1px solid #ccc;"&gt;
&lt;ol style="list-style-type: decimal; padding: 0 20px;"&gt;
&lt;li&gt;Floated elements are pushed to the edge of their containers, no further.&lt;/li&gt;
&lt;li&gt;Any floated element will either appear next to or below a previous floated element. If the elements are floated left, the second element will appear to the right of the first. If they’re floated right, the second element will appear to the left of the first.&lt;/li&gt;
&lt;li&gt;A left-floating box can’t be further right than a right-floating box.&lt;/li&gt;
&lt;li&gt;Floated elements can’t go higher than their container’s top edge (this gets more complicated when collapsing margins are involved, see original rule).&lt;/li&gt;
&lt;li&gt;A floated element can’t be higher than a previous block level or floated element.&lt;/li&gt;
&lt;li&gt;A floated element can’t be higher than a previous line of inline elements.&lt;/li&gt;
&lt;li&gt;One floated element next to another floated element can’t stick out past the edge of its container.&lt;/li&gt;
&lt;li&gt;A floating box must be placed as high as possible. (No translation necessary)&lt;/li&gt;
&lt;li&gt;A left-floating box must be put as far to the left as possible, a right-floating box as far to the right as possible. A higher position is preferred over one that is further to the left/right. (No translation necessary)&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;Here we can see that many of these are pretty much common sense, but they must be explicitly stated so that every person and browser is on the same page. Basically, the gist of the situation is that floated elements go right up to the specified edge (left or right), but no further. Unless of course there is another floated element before it, in which case it just goes next to that one. &lt;/p&gt;
&lt;p&gt;The real surprise that confused us before comes in the rules at the end, which state that floated elements try to stay as high as possible and that this vertical positioning rule takes precedence over the horizontal left/right floating rule that pushes an item to an edge. &lt;/p&gt;
&lt;p&gt;In our previous example, image number two stretched the height of the line down so that after image number three, there was still some vertical space for image number four to squeeze into. Even with these rules in mind, the pattern isn’t always easy to predict.&lt;/p&gt;
&lt;p&gt;Just keep in mind that when you have one floated element, &lt;strong&gt;the next floated elements behind it will take up at least the same amount of vertical space or more&lt;/strong&gt; before breaking the line and going lower in the flow.&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/cssfloats101-11.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;h3&gt;Float Order&lt;/h3&gt;
&lt;p&gt;One last note regarding the rules that we’ve laid out here. The second rule has some interesting implications for the order of items that are floated. Let’s say we again have a list of images numbered one through six, like this: &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="html4strict" style="font-family:monospace;"&gt;&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;ul&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/100x100&amp;amp;text=1"&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/100x100&amp;amp;text=2"&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/100x100&amp;amp;text=3"&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/100x100&amp;amp;text=4"&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/100x100&amp;amp;text=5"&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/100x100&amp;amp;text=6"&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;ul&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;If we float these images to the left, they’ll appear in order, starting at one and going through six; left to right, top to bottom. However, here’s what happens if we float the list items to the right:&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/cssfloats101-12.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;As you can see, the first image actually takes the rightmost position. Similarly, when the line breaks, the fourth image is placed on the right side. This is why you’ll rarely see anyone float a list of navigation elements to the right. To do so screws with the order and would require undesirable changes in the HTML hierarchy to resolve. &lt;/p&gt;
&lt;h2&gt;Clearing Floats&lt;/h2&gt;
&lt;p&gt;Floats are handy for accomplishing some great layout feats like creating columns of content. However, once declared, they have an effect on the rest of the document’s flow that you might or might not like! For instance, let’s say we wanted to throw in a paragraph after a block of left-floating list items like the one we had above. &lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/cssfloats101-13.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;The result is probably not going to be what you hoped for:&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/cssfloats101-14.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;The answer here is to use the &lt;em&gt;clear&lt;/em&gt; property, which makes it so that no floated items can appear on a given side of the element it is applied to. For instance, let’s say we target the second list item in our little gallery and apply a value of &lt;em&gt;“clear: left”&lt;/em&gt;.&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;ul li&lt;span style="color: #3333ff;"&gt;:nth-&lt;/span&gt;child&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;2&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;	
  &lt;span style="color: #000000; font-weight: bold;"&gt;clear&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;left&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;What this code does is tell the browser that the top of the second list item must be below the bottom of any left-floating items before it (in this case, the first list item). If we had all floated all of these elements to the right, we would’ve had to use &lt;em&gt;“clear: right”&lt;/em&gt; instead.&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/cssfloats101-16.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;Notice that after this, the rest of the floated items maintain their course. That’s because they’re still set to float left, the clear property does not somehow cancel this out. This means that our problem with the paragraph is not fixed by clearing any of the list items. &lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/cssfloats101-17.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;Instead, what has to happen is that the paragraph element, which is a block level element that has not been floated, must be cleared. This will make sure it appears below the floated elements rather than next to them.&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;p &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;clear&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;both&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;We technically only needed a left clear here, but when a developer wants to be sure to clear all floats, it’s common practice to see the &lt;em&gt;both&lt;/em&gt; value used. This change fixed our problem up nicely!&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/cssfloats101-15.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;h2&gt;Float Quirks and Clear Fixes&lt;/h2&gt;
&lt;p&gt;There’s a peculiar action that takes place when a given element contains only floated elements: the parent element’s height collapses. To illustrate this, let’s say we wanted to put a background color on the unordered list that we’ve being using in all our examples. If the elements in the list aren’t floated, then we need only apply the color to the background using CSS.&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;ul &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;gray&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt; &lt;/p&gt;
&lt;p&gt;As you can see in the example below, the box that defines the unordered list has been turned gray and the list items within are stacked on top of each other.&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/cssfloats101-18.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;However, the second that we float those list items, that UL contains only floated elements, and so its height collapses, leaving a newbie developer wondering what the heck happened to his background color.&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/cssfloats101-13.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;There are a number of ways to solve this problem. The easiest and most straightforward solution is simply to apply an explicit height to the parent element, which is the unordered list.&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;ul &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;height&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;300px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/cssfloats101-19.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;As you can see, this did indeed give us our background fill back. However, this is rarely the desirable course to take simply because it’s more convenient in the long run if the height is automatically computed based on the contents. If we add three more rows of images to our list now, that height won’t be adequate. &lt;/p&gt;
&lt;h3&gt;Clearfix To The Rescue&lt;/h3&gt;
&lt;p&gt;This is where the term “clear fix,” also written “clearfix,” comes into play. Clearfixes address this collapsing height problem traditionally through the use of the &lt;em&gt;clear&lt;/em&gt; property.&lt;/p&gt;
&lt;p&gt;What developers used to do is create an empty element (often a div) in their HTML on the same level as the floated items, then apply a class of “clearfix” to that empty container. Back in CSS, you would then add clear the floats on the “clearfix” property.&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;&lt;span style="color: #6666ff;"&gt;.clearfix&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;clear&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;both&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;This immediately fixes the collapsed height issue:&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/cssfloats101-20.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;Given what we’ve already learned, we know exactly why this trick fixed our problem. The reason the height had collapsed is because the parent contained only floated children. Now it has one child, albeit an empty one, that isn’t floated, so the auto height works as expected again.&lt;/p&gt;
&lt;p&gt;The problem with this method is that no one liked that extra ugly element in the HTML. It simply wasn’t semantic, meaning that it wasn’t helping to communicate the clear hierarchy of the page.&lt;/p&gt;
&lt;p&gt;The new fancy fix for this problem is to take advantage of the &lt;em&gt;overflow&lt;/em&gt; property, which governs the functionality of content that extends beyond the boundaries of its containing box. It turns out that if you set overflow to &lt;em&gt;hidden&lt;/em&gt; or &lt;em&gt;auto&lt;/em&gt; on the parent item, it fixes the height collapse!&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;ul &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;overflow&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;auto&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/cssfloats101-20.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;This is definitely the briefest and most elegant solution to fixing the collapsing height issue and should be your go to strategy. That being said, there will be cases where you want the overflow of an element to be set to &lt;em&gt;visible&lt;/em&gt;, what should you do then?&lt;/p&gt;
&lt;p&gt;The answer is to use &lt;a href="http://nicolasgallagher.com/micro-clearfix-hack/"&gt;Nick Gallagher’s Micro Clearfix Hack&lt;/a&gt;, which uses some genius CSS to fix this issue. First, it uses :before and :after to add in some content that we can use to create something in the parent that isn’t floated. However, you don’t really want any content in here, so we leave it empty but set the display to table to create an anonymous cell (empty and takes up no space) and finally use our old friend clear. This creates the invisible block level item we need to fix the height collapse without extra HTML markup. Older versions of IE require their own fix so this is thrown in as well.&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;&lt;span style="color: #808080; font-style: italic;"&gt;/* For modern browsers */&lt;/span&gt;
&lt;span style="color: #6666ff;"&gt;.cf&lt;/span&gt;&lt;span style="color: #3333ff;"&gt;:before&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt;
&lt;span style="color: #6666ff;"&gt;.cf&lt;/span&gt;&lt;span style="color: #3333ff;"&gt;:after &lt;/span&gt;&lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
    &lt;span style="color: #000000; font-weight: bold;"&gt;content&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;""&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
    &lt;span style="color: #000000; font-weight: bold;"&gt;display&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt;table&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #6666ff;"&gt;.cf&lt;/span&gt;&lt;span style="color: #3333ff;"&gt;:after &lt;/span&gt;&lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
    &lt;span style="color: #000000; font-weight: bold;"&gt;clear&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt;&lt;span style="color: #993333;"&gt;both&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #808080; font-style: italic;"&gt;/* For IE 6/7 (trigger hasLayout) */&lt;/span&gt;
&lt;span style="color: #6666ff;"&gt;.cf&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
    zoom&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;In this article, we went over a &lt;strong&gt;ton&lt;/strong&gt; of great information, both basic and complicated. We started with a discussion of how what floats are and how they work on a basic level, then proceeded to how setting an element to float affects the bordering boxes of the elements involved so you can properly figure out how to get your margins to work like you want them to.&lt;/p&gt;
&lt;p&gt;Next, we moved onto the basic rules that govern the position of a floated element and arrived at some interesting conclusions for how floated elements of varying heights will be positioned as well as how right floated items appear in reverse order.&lt;/p&gt;
&lt;p&gt;Finally, we clearly laid out the entire tale of how a parent containing only floated children will have a collapsed height and how you can solve it based on your particular scenario.&lt;/p&gt;
&lt;p&gt;If floats were something that confused you before reading this article, join the club. They confuse us all at first. Hopefully though you now have an outstanding knowledge of how floats work and how you can use them to achieve any layout you want. Leave a comment below and let us know if you found this information helpful.&lt;/p&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://kidaworld.blogspot.com/2012/11/everything-you-never-knew-about-css.html</link><author>noreply@blogger.com (UXAWY)</author><thr:total>10</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8363405111659754159.post-6004485022096146883</guid><pubDate>Mon, 12 Nov 2012 12:48:00 +0000</pubDate><atom:updated>2012-11-12T04:48:57.942-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">designer</category><category domain="http://www.blogger.com/atom/ns#">freelance</category><category domain="http://www.blogger.com/atom/ns#">learn</category><title>5 Ways to Learn Web Design: Which Is Right for You?</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/fivewaystolearn-0.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;The web design education industry has exploded from a small niche to a powerful, continually expanding force. Countless people all over the planet are interested in learning about how to build and design websites, and tons of companies are cropping up promising the ultimate solution. &lt;/p&gt;
&lt;p&gt;The good news for you is that increased competition in this field is a great thing for customers. You have more options than ever for learning just about anything you want to know concerning web technologies. The big question though is, with so many options available, which is the right one for you? We’ll go over a number of different strategies being used to teach web development and discuss how you can figure out the most appropriate for your unique learning style. We’ll also include some resources to get you started on each available path. &lt;/p&gt;
&lt;p&gt;&lt;span id="more-32220"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;So Many Options!&lt;/h2&gt;
&lt;p&gt;With some disciplines, the most difficult part of the education process is finding quality learning resources. This is definitely not the case with web design. The web is completely bursting with both free and purchasable information that will teach you all there is to know about web design and development.&lt;/p&gt;
&lt;p&gt;The problem then shifts from one of scarcity to overabundance. With so much info available, how can you even know where to begin? Before you answer this question though, I think it’s critically important to discover which learning style is the most effective for you. Once you have this information, you can narrow your resources considerably.&lt;/p&gt;
&lt;h3&gt;Why Does It Matter?&lt;/h3&gt;
&lt;p&gt;If you’ve ever tried and failed to learn something, then this lesson should ring true with you. Sometimes you want to pick up a new skill, but there just seems to be some barrier between you and success. How can you overcome it? In a recent article, I introduced you to &lt;a href="http://designshack.net/articles/business-articles/the-freelancers-secret-to-learning-any-new-skill/"&gt;the freelancer’s secret to learning any new skill&lt;/a&gt;, which I firmly believe is a great way to force yourself into learning. However, even if you’ve put yourself in the position suggested by that article, you still have the actual learning process ahead of you.&lt;/p&gt;
&lt;div class="pullquote-r"&gt;
“Odds are, you’ll find that you personally have more success using some methods than others.”
&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;It often boils down to a question of methodology. Education professionals long ago discovered that people differ in their learning styles. Some people are visual learners, others absorb through reading and some can’t get a feel for something until they dig in with a hands-on experiment. Odds are, you’ll find that you personally have more success using some methods than others.&lt;/p&gt;
&lt;p&gt;The key then is to find out which learning style you tend to have the most success with and find resources that focus on teaching through this method. Instead of a random Google search that leads to hours and hours of failed learning attempts, try making an educated go of choosing how you learn web design. Doing so could literally mean the difference between another failed attempt and an exciting new career. &lt;/p&gt;
&lt;h2&gt;1. School&lt;/h2&gt;
&lt;div class="tutorialimage"&gt;&lt;a href="http://www.bigstockphoto.com/image-1021226/stock-photo-graduation-cap"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/fivewaystolearn-1.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Though I tend to focus on informal web-based independent learning solutions, I would never discount the value of a formal education. For starters, a university or even community college degree can give your resume the boost it needs to land you that awesome job.&lt;/p&gt;
&lt;p&gt;Web design and development degrees are quickly becoming fairly ubiquitous. There’s a good chance that the major schools in your area all offer something in this area. Every school worth its salt has a website that lists available degrees and certificates in addition to some estimates for the level of financial investment that you can expect to make, so be sure that local university websites are your first stop. Understandably, a college or university degree is the most expensive route you can take, but it can also be one of the most rewarding. &lt;/p&gt;
&lt;h3&gt;Should You Go Back To School?&lt;/h3&gt;
&lt;p&gt;Obviously, if you’re about to enter college and need a degree, then this option is prime territory for you. I’ll focus on the people for whom this decision might not be as simple though: those thinking about returning to school.&lt;/p&gt;
&lt;p&gt;If you’re an adult who has been in the working world for some time, the decision of whether or not to go back to school is a difficult one. Will the hard sacrifices of time and money pay off in the end? Sometimes they do, other times they don’t. &lt;/p&gt;
&lt;p&gt;If you don’t have a formal degree of any kind, I recommend that you get one. Potential employers often just want to see that you’re committed enough to get through college without giving up.&lt;/p&gt;
&lt;p&gt;If you do have a degree, just not in web development, then you might have plenty of success learning on your own. More and more the web industry is beginning to value experience and ability over formal education. Jump into learning on your own, take some low budget jobs to kick off your career and then move your way up the ladder through freelance or the corporate world.&lt;/p&gt;
&lt;p&gt;If you find that the lack of a web dev degree is holding you back, then you should think about getting one. Otherwise, your time and resources might be better spent on real world experience. You might even consider picking up a class or two where you need it and skipping the full degree.&lt;/p&gt;
&lt;h3&gt;Learning Style&lt;/h3&gt;
&lt;p&gt;Whether you’re going with an online or in-person degree, the teaching methods will likely incorporate several or even all of the other styles below. There are some unique advantages to the school method though, especially if you’re in a real classroom with an instructor present. &lt;/p&gt;
&lt;p&gt;Some of us learn better on our own, moving forward at our own pace. The unfortunate truth though is that self-guided learning is super difficult. It’s often far easier to pick up a new discipline if someone is pushing you to do so. School heavily leverages the stress factor to induce learning, a trick that works so well that our entire education system is based on it.&lt;/p&gt;
&lt;div class="pullquote-r"&gt;
“It’s often far easier to pick up a new discipline if someone is pushing you to do so.”
&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;With school you have homework, deadlines, term projects and a structured schedule. You either keep up or drop out.  If you need to learn a lot of stuff extremely well in a short period of time, there’s almost no better way to do it than a formal class.&lt;/p&gt;
&lt;p&gt;Further, in-person instruction is a rich learning method that gives you the unique ability to ask questions and get help where you need it, often in a one-on-one conversation. This is something that is extremely difficult or nearly impossible to find in the world of free and even premium online education.&lt;/p&gt;
&lt;h3&gt;The Bottom Line&lt;/h3&gt;
&lt;p&gt;If you have a decent budget, learn better in a structured environment, perform well under pressure, and value face to face instruction where you can ask lots of questions, school is your best bet. &lt;/p&gt;
&lt;h2&gt;2. Reading&lt;/h2&gt;
&lt;div class="tutorialimage"&gt;&lt;a href="http://www.bigstockphoto.com/image-5164/stock-photo-old-books"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/fivewaystolearn-2.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Written instruction is the spark that lit the fire under web design education. The lowly design blog started as a novel idea and has risen to impressive heights. Even these built on the success of a far older method: books. Once upon a time, when someone wanted to learn something, a trip to the library and/or bookstore, was the first step in the process (not Google).&lt;/p&gt;
&lt;p&gt;Reading is a timeless way to learn something, it will simply never go out of style no matter what fancy technology comes along. In a highly literate society it is often the go-to method for self-guided instruction. It’s not the most interactive or exciting way to go about learning something, but it’s often the most effective for several reasons.&lt;/p&gt;
&lt;h3&gt;Learning Style&lt;/h3&gt;
&lt;p&gt;Written learning materials are hard to beat from an efficiency perspective. The average person’s reading speed is much faster than the average person’s speaking speed, so you can pack far more education into a shorter time span than with spoken instruction.&lt;/p&gt;
&lt;p&gt;For this reason, written instruction often goes far deeper than other methods. Books on web development tend to be massive tomes that are fairly exhaustive and cover every aspect of their topic. Even a fairly long video series on the same topic likely won’t cover a tenth of the material.&lt;/p&gt;
&lt;div class="pullquote-r"&gt;
“Written learning materials are hard to beat from an efficiency perspective.”
&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;Even if you don’t want to read a massive, all-inclusive book on a subject, reading is often still the method to beat. Design blogs like the one you’re reading now provide daily, bite-sized learning opportunities that can guide you through every step of your career, from writing your first line of HTML to keeping your advanced skill set fresh and relevant. &lt;/p&gt;
&lt;p&gt;The downside of reading is that it can get boring if you’re the type of person who tends to favor multimedia. An even bigger hurdle is obviously your level of reading comprehension. You need not be embarrassed, the simple truth is that lots of people simply don’t absorb and retain information well through reading. If you’ve never read an entire blog post (including this one) without skimming and find yourself sleeping in a book more than turning its pages, reading might not be the way to go!&lt;/p&gt;
&lt;h3&gt;The Bottom Line&lt;/h3&gt;
&lt;p&gt;Reading-based instructional materials are perfect if you have a high level of reading comprehension and retention. The options here fall on both extremes of the time spectrum: reading can provide you with both the shortest, quickest instruction possible and the longest, deepest learning sessions that you could possibly want. Reading is also hands down the most popular method used for free instruction, so if your budget is nonexistent, blogs and other online resources are the way to go. &lt;/p&gt;
&lt;p&gt;Reading is for the masses, but don’t mistake that statement as an implication that there’s something wrong with you if this isn’t the best way for you to learn. Don’t waste your time at the library if big books intimidate or bore you, instead search for a learning method that makes use of your interest in richer methods of communication. &lt;/p&gt;
&lt;h3&gt;Resources To Check Out&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="http://designshack.net/articles/reviews/ducketts-html-css-a-beginners-web-dev-book-you-can-actually-read/"&gt;HTML &amp;amp; CSS Book&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
This simply titled book is a breath of fresh air in the world of printed learning materials for web designers. It’s gorgeous, it’s thorough, and it’s at the very top of my recommendation list for anyone looking to pick up HTML and CSS.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.html5rocks.com/en/"&gt;HTML5 Rocks&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
HTML5 Rocks is an awesome open source resource for web developers at all stages. There is a wealth of free information and tutorials available here that cover a wide array of topics. &lt;/p&gt;
&lt;h2&gt;3. Video Instruction&lt;/h2&gt;
&lt;div class="tutorialimage"&gt;&lt;a href="http://www.bigstockphoto.com/image-3415976/stock-photo-video-camera"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/fivewaystolearn-3.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Instructional videos have been around for nearly as long as video cameras. The concept is nothing new and the effectiveness has been proven over several decades. If you need proof, consider that most of us would never dream of buying and reading through a science book but as soon as a science channel pops up on our TV, we’re enthralled for hours on end.&lt;/p&gt;
&lt;p&gt;Video based instruction in the web development community certainly isn’t new either, but serious, in-depth and high quality video instruction definitely hasn’t hit anywhere near the level of saturation of written design blogs. This is because video learning materials are incredibly resource-intensive to produce. The equipment, knowledge, software and time necessary to create a valuable product all serve as a high barrier to entry for anyone looking to enter this market.&lt;/p&gt;
&lt;p&gt;For this reason, the products that do exist tend to be quite pricy. The currently popular method is to sell a subscription on a monthly or yearly basis. You pay a certain fee every month and in turn are granted access to a large body of video content. It’s like Netflix for web education. &lt;/p&gt;
&lt;h3&gt;Learning Style&lt;/h3&gt;
&lt;p&gt;The learning style here is very visual. If you have no interest in books and find that you often can’t make yourself read through even a brief blog post, video instruction provides an awesome and often quite entertaining solution.&lt;/p&gt;
&lt;div class="pullquote-r"&gt;
“If you think that watching a person write code for an hour is going to be exciting, you’re going to be pretty surprised with the reality.”
&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;This doesn’t mean that you won’t get bored though. If you think that watching a person write code for an hour is going to be exciting, you’re going to be pretty surprised with the reality. For this reason, the instructor leading the videos makes all the difference in the world. Guys like Jeffrey Way and Chris Coyier have the ability to make the educational experience interesting while other instructors unfortunately drone on endlessly in a monotone voice that lulls you into a deep coma from which there is little hope of return. &lt;/p&gt;
&lt;p&gt;Obviously, video instruction ticks the auditory learning box as well. Some people can read something a hundred times and not retain the information, but as soon as they hear it, it’s locked in their brain forever. If this sounds like you, video courses are likely going to be the best route for you. Pure audio solutions like podcasts do exist, but they’re more for general discussion. It’s nearly impossible to learn code or design without seeing what it is that the instructor is doing. &lt;/p&gt;
&lt;p&gt;One last thing to consider is that video instruction can be time consuming. Courses are often broken up into five to ten minute segments but on the whole you’ll spend hours and hours watching video to absorb the amount of information you could probably get from a book in half the time. &lt;/p&gt;
&lt;h3&gt;The Bottom Line&lt;/h3&gt;
&lt;p&gt;If your television is constantly tuned into educational science, history or technology shows, then you probably really enjoy learning through video instruction. If you think books are lame, then you definitely need to check out this method of learning. &lt;/p&gt;
&lt;p&gt;Videos are ideal if you can block out specific chunks of time for learning in a quiet environment. If you’re overwhelmed by all of the reading options available, you’ll be comforted by the fact that there are only a few really good video resources available at this point in time for learning web development. Just keep in mind that the really thorough options are almost exclusively subscription based. &lt;/p&gt;
&lt;h3&gt;Resources to Check Out&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.lynda.com/Member.aspx"&gt;Lynda&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
Lynda is one of the oldest and most thorough online resources for learning just about anything technical. You pay a hefty subscription fee but it’s well worth it to access their extensive library of learning videos spanning tons of subjects. Learn HTML and CSS, master Photoshop, take a course on video production and finally take on building that iPhone app idea you’ve had floating around in your head.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="http://tutsplus.com/"&gt;Tuts+ Premium&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
I’ve work steadily with the Tuts+ Premium folks so I’m a little biased but I think it’s one of the best options around for anyone who wants to learn web design and development. For as low as $15 per month you get access to a wealth of exclusive tutorials, both written and video. They’re adding content weekly so your membership only gets better with time!&lt;/p&gt;
&lt;h2&gt;4. Interactive&lt;/h2&gt;
&lt;div class="tutorialimage"&gt;&lt;a href="http://www.bigstockphoto.com/image-20309468/stock-photo-computer-mouse-and-keyboard"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/fivewaystolearn-4.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;When I was in college, I signed up for a math course with a stuffy old professor bent on failing as many students as possible. Instruction was fast-paced and questions were almost never tolerated. If you didn’t understand, you didn’t belong there.&lt;/p&gt;
&lt;p&gt;Consequently, I dropped the class and tried again using a different format. My school had these computer-based learning courses where an instructor was present, but only for support. Most of the learning was done through a computer program that allowed you to go through lessons at your own pace, re-learn troublesome topics, and take quizzes to assess your progress before official testing. The program used a very interactive teaching method that had you clicking, entering numbers and manipulating models constantly. I pulled an A+ in that class as well as subsequent math courses that I took using the same method. &lt;/p&gt;
&lt;div class="pullquote-r"&gt;
“The interaction model here is closer to a video game than a textbook.”
&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;The moral here is that for some of us, there’s something magical about computer guided learning. Instead of passively absorbing information, you’re diving into it. Your progress is continually checked so you can’t proceed unless you’re genuinely learning the material. Further, your work is checked not by an intimidating human but by a machine that won’t judge you for going through the same lesson over and over. The interaction model here is closer to a video game than a textbook.&lt;/p&gt;
&lt;p&gt;This amazing teaching style is being adapted to the world of web development with some impressive results. There’s a new generation of web apps that guide you through the entire process of learning web development, from HTML and CSS to JavaScript, PHP and Ruby on Rails. Annoying and technical setup processes are nonexistent and your work is checked at every step. You simply read a quick lesson, then type into an on-screen terminal that makes sure you’re doing it right. &lt;/p&gt;
&lt;h3&gt;Learning Style&lt;/h3&gt;
&lt;p&gt;The learning style here is obviously a very hands-on approach. If you have a short attention span and get easily bored, even well produced video instruction can be nearly impossible to sit through. The interactive method asks for your input at every step and holds your interest as well or better than any other learning model I’ve ever seen.&lt;/p&gt;
&lt;div class="pullquote-r"&gt;
“The interactive method holds your interest as well or better than any other learning model I’ve ever seen.”
&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;This method is also great if you’re a particularly fast or a particularly slow learner. If you pick up the information quickly, you can breeze through the content while actually learning the information, not just reading it. Conversely, if your learning process is fairly slow, the computer doesn’t mind! You can enter the wrong answer again and again and you’ll keep getting more chances, and it’s easy to click back and go through a previous lesson at any time.&lt;/p&gt;
&lt;p&gt;If you like games, you’ll love this method. Your results are saved, your progress through the course is tracked and reported and you often even work towards high scores and trophies or badges. &lt;/p&gt;
&lt;h3&gt;The Bottom Line&lt;/h3&gt;
&lt;p&gt;If you’d much rather spend a day in front of your Xbox than with your nose in a book, then this learning method might resonate particularly well with you. Learning becomes a game to be beaten and boring content comes to life. There are some free and premium options here so no matter your what your budget is, you can get started with this method today.&lt;/p&gt;
&lt;h3&gt;Resources to Check Out&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.codecademy.com/#!/exercises/0"&gt;Codecademy&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
I absolutely love this website. It’s a fantastic and currently free resource that’s small but growing fast. Here you can learn programming and/or web development through a series of interactive courses that teach you tiny bits of information at a time and let you type out the code yourself. Codecademy checks your answers and guides you through the learning process in a thoroughly enjoyable and easily approachable manner. In fact, it’s so user friendly that I even told my parents to check it out!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.codeschool.com/"&gt;Code School&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
Code School is sort of like a premium, paid version of the Codecademy model. For $25 per month, you get access to several interactive courses on web development and programming. You type in code right in the browser just as with Codecademy, but the learning side is more robust and includes some superbly produced video and graphic content. &lt;/p&gt;
&lt;h2&gt;5. Hybrid&lt;/h2&gt;
&lt;div class="tutorialimage"&gt;&lt;a href="http://www.bigstockphoto.com/image-20309468/stock-photo-computer-mouse-and-keyboard"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/fivewaystolearn-54.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;For some, one of the methods above stands out far from the others as the absolute best way to learn. But let’s face it, your typical learning experience will involve more than one of these learning styles. Don’t feel the need to stay within one area, if none of them hold your interest or provide what you need, jump around a little.&lt;/p&gt;
&lt;p&gt;For instance, I like to watch video courses but I also typically have a book on my desk that covers the topic that I’m learning. Jumping between the two helps keep me interested and allows me to dig deeper than I could with a single source.&lt;/p&gt;
&lt;p&gt;Your goal should be to find not only your single most successful learning style, but the combination of resources that will ultimately lead to you actually learning the skill that you set out to pick up. Nothing is more frustrating than trying again and again to learn something and coming out no better for it in the end. Building yourself a customized learning plan could be just what you need to end the cycle of frustration. &lt;/p&gt;
&lt;h3&gt;Resources to Check Out&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="http://teamtreehouse.com/"&gt;Treehouse&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
Treehouse is a perfect example of a single service that incorporates several of the techniques mentioned above. It uses an interactive gaming system mixed with quizzes, video and written content and result is a highly polished educational program that caters to a number of different learning styles. To get the full experience, you’ll have to shell out a whopping $49 per month, but it really is a superb service so you won’t regret it. &lt;/p&gt;
&lt;h2&gt;How Do You Learn?&lt;/h2&gt;
&lt;p&gt;The message that I’m trying to get across here is that you &lt;strong&gt;can&lt;/strong&gt; learn web development, regardless of your past successes and failures. Sometimes something as simple as a style of learning is all that’s holding you back. Exploring your interests and favored ways to learn can dramatically improve your odds of success.&lt;/p&gt;
&lt;p&gt;Be sure to take some time o consider all of the various methods above and find the one or two that you think will work best for you. It often helps to eliminate those that you know won’t work and use that as a starting point for choosing new techniques to try. &lt;/p&gt;
&lt;p&gt;Leave a comment below and tell us about your learning style. Do you learn better through school, reading, video content, interactive software or a hybrid method involving several or even all of these methods? We want to know!&lt;/p&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://kidaworld.blogspot.com/2012/11/5-ways-to-learn-web-design-which-is.html</link><author>noreply@blogger.com (UXAWY)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8363405111659754159.post-1697992743450933781</guid><pubDate>Mon, 12 Nov 2012 12:48:00 +0000</pubDate><atom:updated>2012-11-12T04:48:15.232-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">css</category><title>Code a Set of Animated App Store Buttons With CSS</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/appstoreicons-9.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;I’ve gotten bored lately with all of the run of the mill, plain jane iTunes/Mac App Store buttons that I’ve been seeing around the web, so I coded up some fun little animated alternatives that I thought I would share.&lt;/p&gt;
&lt;p&gt;This project is super simple, so even if you’re a complete beginner, you should be able to follow along. We’ll learn how to use some fancy techniques like how to incorporate icon fonts into a design and how to insert objects using pseudo elements.&lt;/p&gt;
&lt;p&gt;&lt;span id="more-32338"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;The Concept&lt;/h2&gt;
&lt;p&gt;To start a project it’s, often fun to grab a pencil and sketch out a few ideas. We tend to think more freely when drawing with our hands than a mouse. You don’t have to be any good at drawing either, feel free to scribble down quick, ugly sketches. As long as they communicate your thought process, they work!&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/appstoreicons-1.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;The concept here is pretty basic and similar to other projects we’ve done in the past. I’d like to start with a circle that contains only an icon. Then, when you hover over the icon, it expands to show a message about downloading the app on the app store.&lt;/p&gt;
&lt;p&gt;Of course, since Apple has three primary device archetypes (iPad, iPhone and Mac), we’ll need to create a few different versions to over the bases. &lt;/p&gt;
&lt;h2&gt;Step 1: The HTML&lt;/h2&gt;
&lt;p&gt;To begin, bust out a div like the one shown below. Inside I’ve placed a paragraph wrapped in an anchor tag, part of which is also wrapped in a small tag. This will help us differentiate the text a little.&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="html4strict" style="font-family:monospace;"&gt;&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt; &lt;span style="color: #000066;"&gt;class&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"appstorebutton iphone"&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;small&lt;/span&gt;&amp;gt;&lt;/span&gt;Available on the iTunes&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;small&lt;/span&gt;&amp;gt;&lt;/span&gt; App Store&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;Looking at this now, it feels a little markup heavy. You could probably apply the classes directly to the anchor and skip the div altogether, but we’ll stick with this for now. Notice that I’ve applied two separate classes to the div. I could’ve gotten away with one, but in order to differentiate between the different types of buttons that we’ll be creating, it helps to separate them into separate classes (this allows you to target each version individually). The repeated styles can then be grouped into one “appstorebutton” class, an organization method that will keep our CSS nice and DRY. &lt;/p&gt;
&lt;p&gt;Also note that HTML5 allows us to wrap a link around anything we want, so if that looks a little wonky to you, just know that it’s perfectly allowed.&lt;/p&gt;
&lt;h2&gt;Step 2: Basic Button Styles&lt;/h2&gt;
&lt;p&gt;Now let’s jump over to some CSS and grab that “appstorebutton” hook. The default state of the button will be a circle, but it’s a lot easier to arrange everything with the button in its expanded state, so we’ll start out with a width of 275px, which we’ll reduce to 80px once we’re all finished. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;&lt;span style="color: #6666ff;"&gt;.appstorebutton&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;height&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;80px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;275px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;50px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;relative&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;overflow&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;hidden&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #6666ff;"&gt;.iphone&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#7b7a7f&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;There are a few other interesting things here as well. First off, we applied relative positioning because we’re going to use some absolute positioning on an element within this one later and this will give us a starting point. If this doesn’t make any sense, read &lt;a href="http://designshack.net/articles/css/the-lowdown-on-absolute-vs-relative-positioning/" title="The Lowdown on Absolute vs. Relative Positioning"&gt;this article&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We also set the overflow to hidden. This is because when the button is in its circular state, much of the content will be outside of the physical bounds of the button and we want to keep it nice and invisible. Finally, we applied a background color to the “iphone” class. Later we’ll create a few more of these for the other versions.&lt;/p&gt;
&lt;h3&gt;Progress Check&lt;/h3&gt;
&lt;p&gt;At this point, our object is hideous, but don’t worry, it’ll look better in no time. &lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/appstoreicons-2.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;h2&gt;Step 3: Style The Paragraph&lt;/h2&gt;
&lt;p&gt;Next up, it’s time to fix that ugly text. This is pretty straightforward and involves turning the color to white and defining different sizes for the small and regular paragraph text. I also declared a set width, which breaks the text into two lines, then used margins to push it all into place. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;&amp;nbsp;
&lt;span style="color: #6666ff;"&gt;.appstorebutton&lt;/span&gt; a &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;color&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;white&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;text-decoration&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;none&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #6666ff;"&gt;.appstorebutton&lt;/span&gt; p &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;30px&lt;/span&gt;/&lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; Helvetica&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; Arial&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #993333;"&gt;sans-serif&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;text-align&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;center&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;color&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;white&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;4px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt; &lt;span style="color: #933;"&gt;65px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;180px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #6666ff;"&gt;.appstorebutton&lt;/span&gt; p small &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font-size&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;15px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h3&gt;Progress Check&lt;/h3&gt;
&lt;p&gt;Didn’t I promise you everything would look good soon? Already we’re starting to see the end result shaping up. It’s amazing how far a little styled text can go!&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/appstoreicons-3.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;h2&gt;Step 4: Add The Icon&lt;/h2&gt;
&lt;p&gt;In the image above, the text seems awkwardly scooted over to the right with a big empty space on the left. This is where our little iPhone icon will go. Before we put it in there though, we need to think about how to go about it.&lt;/p&gt;
&lt;p&gt;The first thought that pops into my mind is to use an icon font. These are simple to implement and infinitely scalable and will therefore work perfect for a button graphic. After a little hunting, I found a free font called &lt;a href="http://www.fontsquirrel.com/fonts/modern-pictograms"&gt;Modern Pictograms&lt;/a&gt; from Font Squirrel that contains both an iPhone and an iPad that we can use for this project. &lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/appstoreicons-4.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;Now, rather than clutter up our markup any further, we can insert this icon using pure CSS by utilizing the :before pseudo element. The code for this along with the implementation of the icon font is shown below.&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;&lt;span style="color: #6666ff;"&gt;.iphone&lt;/span&gt; p&lt;span style="color: #3333ff;"&gt;:before &lt;/span&gt;&lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;content&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;"O"&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;absolute&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;70px&lt;/span&gt;/&lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;'ModernPictogramsNormal'&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; Helvetica&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #993333;"&gt;sans-serif&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;top&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;10px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;left&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;20px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #808080; font-style: italic;"&gt;/*Font-Face*/&lt;/span&gt;
&lt;span style="color: #a1a100;"&gt;@font-face {&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font-family&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;'ModernPictogramsNormal'&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  src&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;url&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;'modernpics-webfont.eot'&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  src&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;url&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;'modernpics-webfont.eot?#iefix'&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt; format&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;'embedded-opentype'&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt;
    &lt;span style="color: #993333;"&gt;url&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;'modernpics-webfont.woff'&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt; format&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;'woff'&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt;
    &lt;span style="color: #993333;"&gt;url&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;'modernpics-webfont.ttf'&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt; format&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;'truetype'&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt;
    &lt;span style="color: #993333;"&gt;url&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;'modernpics-webfont.svg#ModernPictogramsNormal'&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt; format&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;'svg'&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font-weight&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;normal&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font-style&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;normal&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;As you can see, we told our CSS that “before” the paragraph, we wanted to insert the letter “O”, which corresponds to the iPhone graphic in the Modern Pictograms font. The @font-face code that I used here is copied and pasted straight from the awesomely convenient @font-face kits found on Font Squirrel. &lt;/p&gt;
&lt;p&gt;Next up, we scooted the iPhone graphic into place. By utilizing absolute positioning here, we pull the graphic out of the normal flow. However, it’s bound to the space of our button because of the relative positioning context that we applied in a previous step. From here, we nudge it ten pixels from the top and twenty from the left, and then we’re all set.&lt;/p&gt;
&lt;h3&gt;Progress Check&lt;/h3&gt;
&lt;p&gt;As you can see, the icon from the font looks perfect in out little button. All that’s left for us to do know, is round off our corners, reduce the width and set a hover transition. &lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/appstoreicons-5.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;h2&gt;Step 5: Make the Circle&lt;/h2&gt;
&lt;p&gt;Now that our button looks roughly how we want when it’s expanded, it’s time to contract it. To do this, go back to our “appstorebutton” hook and set the width to 80px, then add in a border radius of 40px. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;&lt;span style="color: #6666ff;"&gt;.appstorebutton&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;height&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;80px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;80px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;50px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;relative&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;overflow&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;hidden&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&amp;nbsp;
  -webkit-border-radius&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;40px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
     -moz-border-radius&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;40px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
          &lt;span style="color: #000000; font-weight: bold;"&gt;border-radius&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;40px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h3&gt;Progress Check&lt;/h3&gt;
&lt;p&gt;Now our button has collapsed into a nice little circle. Since our overflow is hidden, you won’t see any of the text. In the next step, we’ll see how to bring it all back. &lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/appstoreicons-6.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;h2&gt;Step 6: Expand on Hover&lt;/h2&gt;
&lt;p&gt;To finish off our animated button, we need to add in a transition and a hover state. Our transition will target the width of the .appstorebutton class with a duration of one second and a timing function of “ease.” &lt;/p&gt;
&lt;p&gt;Then, once the user hovers over the button, it will expand to the 275px width that we had used before.  &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;&lt;span style="color: #6666ff;"&gt;.appstorebutton&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;height&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;80px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;80px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;50px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;relative&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;overflow&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;hidden&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;float&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;left&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&amp;nbsp;
  -webkit-border-radius&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;40px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
     -moz-border-radius&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;40px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
   	  &lt;span style="color: #000000; font-weight: bold;"&gt;border-radius&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;40px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&amp;nbsp;
  -webkit-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt; 1s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
     -moz-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt; 1s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
       -o-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt; 1s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
      -ms-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt; 1s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
	  transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt; 1s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #6666ff;"&gt;.appstorebutton&lt;/span&gt;&lt;span style="color: #3333ff;"&gt;:hover &lt;/span&gt;&lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;275px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h3&gt;Progress Check&lt;/h3&gt;
&lt;p&gt;Our button is all finished! At this point everything should be working perfectly. If you’ve followed along, your result should look like the one below.  &lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/appstoreicons-7.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;h2&gt;Step 7: Add The Others&lt;/h2&gt;
&lt;p&gt;Now that we have one button all ready to go, it’s time to expand this idea into a set of three buttons. Add two more divs to your HTML and give them each a unique class like I did below. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="html4strict" style="font-family:monospace;"&gt;&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt; &lt;span style="color: #000066;"&gt;class&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"appstorebutton iphone"&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;small&lt;/span&gt;&amp;gt;&lt;/span&gt;Available on the iTunes&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;small&lt;/span&gt;&amp;gt;&lt;/span&gt; App Store&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt; &lt;span style="color: #000066;"&gt;class&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"appstorebutton ipad"&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;small&lt;/span&gt;&amp;gt;&lt;/span&gt;Available on the iTunes&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;small&lt;/span&gt;&amp;gt;&lt;/span&gt; App Store&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt; &lt;span style="color: #000066;"&gt;class&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"appstorebutton mac"&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;small&lt;/span&gt;&amp;gt;&lt;/span&gt;Available on the Mac&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;small&lt;/span&gt;&amp;gt;&lt;/span&gt; App Store&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;From here we follow the steps that we did before to insert the icons using the :before pseudo element. The iPad icon is “Q” in our icon font, but unfortunately there’s no laptop or iMac that we can use for the Mac App Store icon. For this, I went over and grabbed an icon from the fabulous &lt;a href="http://thenounproject.com/noun/computer/#icon-No115"&gt;Noun Project&lt;/a&gt; (I had to tweak it a little to make it closer to the others).&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;a href="http://thenounproject.com/noun/computer/#icon-No115"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/appstoreicons-8.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;To finish everything off, I gave each button a unique color using the special classes that we applied in our HTML. Use these to apply any other button-specific styles that you’d like to use. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;&lt;span style="color: #6666ff;"&gt;.iphone&lt;/span&gt; small&lt;span style="color: #3333ff;"&gt;:before &lt;/span&gt;&lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;content&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;"O"&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;absolute&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;70px&lt;/span&gt;/&lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;'ModernPictogramsNormal'&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; Helvetica&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #993333;"&gt;sans-serif&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;top&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;10px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;left&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;20px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #6666ff;"&gt;.ipad&lt;/span&gt; small&lt;span style="color: #3333ff;"&gt;:before &lt;/span&gt;&lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;content&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;"Q"&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;absolute&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;70px&lt;/span&gt;/&lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;'ModernPictogramsNormal'&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; Helvetica&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #993333;"&gt;sans-serif&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;top&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;10px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;left&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;13px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #6666ff;"&gt;.mac&lt;/span&gt; small&lt;span style="color: #3333ff;"&gt;:before &lt;/span&gt;&lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;content&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;url&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;'imac.png'&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;absolute&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;top&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;22px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;left&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;19px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&lt;span style="color: #808080; font-style: italic;"&gt;/*Button Colors*/&lt;/span&gt;
&lt;span style="color: #6666ff;"&gt;.iphone&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#7b7a7f&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #6666ff;"&gt;.ipad&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#2ea9dc&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #6666ff;"&gt;.mac&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#dc2e2e&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h2&gt;See Them in Action!&lt;/h2&gt;
&lt;p&gt;All of your hard work has paid off and you have a neat little button set to show for it. If you haven’t been following along and building the buttons yourself, click below to take the result for a test drive. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Demo:&lt;/strong&gt; &lt;a href="http://designshack.net/tutorialexamples/appstorebuttons/index.html"&gt;Click here&lt;/a&gt; to launch the demo.&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;a href="http://designshack.net/tutorialexamples/appstorebuttons/index.html"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/appstoreicons-9.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Little project like these are great for keeping your CSS chops fresh and your brain in a mode of constantly thinking up new design ideas. &lt;/p&gt;
&lt;p&gt;Have you seen any other creative App Store buttons recently? Let us know in the comment area below. &lt;/p&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://kidaworld.blogspot.com/2012/11/code-set-of-animated-app-store-buttons.html</link><author>noreply@blogger.com (UXAWY)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8363405111659754159.post-5274761943072945293</guid><pubDate>Mon, 12 Nov 2012 12:45:00 +0000</pubDate><atom:updated>2012-11-12T04:45:44.146-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">css</category><title>Create Stunning Effects With CSS Transition Delays</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/transitiondelays-0.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;I’m a huge fan of CSS transitions. Sure, they can be abused but on the whole they’re a really great and easy way to add a little life to your web pages. And let’s face it, they’re flat out fun to play with.&lt;/p&gt;
&lt;p&gt;I’ve covered transitions a million different ways, but there’s one feature that I hardly ever touch: transition delays. Why would you want to delay your transition? It turns out that the effects that you can achieve become much more complex and impressive when you incorporate this one extra parameter. Let’s jump in and build some cool demos to show off how it works.&lt;/p&gt;
&lt;p&gt;&lt;span id="more-32516"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;What We’re Building&lt;/h2&gt;
&lt;p&gt;If you’d like to take a sneak peek at what we’ll be building today, check out the three demos below:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://tinkerbin.com/1OrE9j4U"&gt;Sequential Message&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://tinkerbin.com/5FlT7Zjj"&gt;One Letter at a Time&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://tinkerbin.com/kArHFvxD"&gt;Curtain Effect&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;The Syntax&lt;/h2&gt;
&lt;p&gt;Before we jump into building anything, it’s worth it to refresh ourselves on the CSS transition syntax. There are four different parameters associated with transitions in CSS: property, duration, timing function and delay. &lt;/p&gt;
&lt;p&gt;You can set the values for each of these properties individually using the syntax below. Keep in mind that you’ll want to run this code through &lt;a href="http://prefixr.com/"&gt;Prefixr&lt;/a&gt; to make sure you’ve covered the various browsers. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;transition-property&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; opacity&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
transition-duration&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; 1s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
transition-timing-function&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
transition-delay&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; 2s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;Though this is the most straightforward way to declare a transition, it’s really a horribly bulky way to go about it. When we account for all of the various required prefixes, this chunk of code becomes enormous:&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;-webkit-transition-property&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; opacity&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
   -moz-transition-property&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; opacity&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
     -o-transition-property&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; opacity&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
    -ms-transition-property&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; opacity&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
        transition-property&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; opacity&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&amp;nbsp;
-webkit-transition-duration&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; 1s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
   -moz-transition-duration&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; 1s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
     -o-transition-duration&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; 1s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
    -ms-transition-duration&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; 1s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
        transition-duration&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; 1s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&amp;nbsp;
-webkit-transition-timing-function&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
   -moz-transition-timing-function&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
     -o-transition-timing-function&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
    -ms-transition-timing-function&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
        transition-timing-function&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&amp;nbsp;
-webkit-transition-delay&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; 2s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
   -moz-transition-delay&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; 2s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
     -o-transition-delay&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; 2s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
    -ms-transition-delay&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; 2s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
        transition-delay&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; 2s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;As you can see, this is a heck of a lot of code for one simple transition. For this reason, coders typically utilize the much more concise shorthand version. With this method, we can take the huge chunk of code above and convert it to the following, much more manageable snippet. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;-webkit-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; opacity 1s ease 2s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
   -moz-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; opacity 1s ease 2s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
     -o-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; opacity 1s ease 2s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
    -ms-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; opacity 1s ease 2s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
        transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; opacity 1s ease 2s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h3&gt;The Shorthand Syntax&lt;/h3&gt;
&lt;p&gt;To be sure we’re all on the same page, here’s a visual breakdown of the transition shorthand. &lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/transitiondelays-1.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;As you can see, the traditional method is to list the property that you want to enable the transition on, followed by the duration of the transition, the easing function and finally the delay. This syntax isn’t super strict though. For instance, you can swap the position of the easing function and the delay and the transition will still work. However, the order shown above is from the official spec so I recommend sticking to it. &lt;/p&gt;
&lt;p&gt;One thing that I do frequently though is simply leave off the delay property. It defaults to zero seconds, so in the event that you want no delay, you can simply write the following: &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; opacity 1s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h2&gt;The Power of Transition Delays&lt;/h2&gt;
&lt;p&gt;Now that we understand the syntax behind transitions, let’s talk about why in the world you would want a delay on a transition. There may be several reasons that you might want to use this property, but the one that I’m going to  focus on today is accomplishing complex animations involving multiple steps. We’ve played with multiple step transitions a little bit in previous articles but today we’re really going to have some fun.&lt;/p&gt;
&lt;p&gt;Basically, the concept here is that you trigger two or more transitions on an event, but use delays to make them occur at different times. So let’s say we have our first transition set to last for one second, we can then set a delay of one second on our second transition to make it begin as soon as the first one ends. The results can be quite impressive!&lt;/p&gt;
&lt;h2&gt;Sequential Message&lt;/h2&gt;
&lt;p&gt;The first idea that pops into my head for utilizing delays is to set up some sort of message that presents itself to the user one piece at a time. Let’s say we want to have three pieces of text that fly in and out of a div at different times. The first step is to lay out how it all works so you can wrap your mind around it.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Default Message: “Hover Here”&lt;/li&gt;
&lt;li&gt;One second fly out of “Hover Here”&lt;/li&gt;
&lt;li&gt;Wait one second, then fly in second message: “Greetings!”&lt;/li&gt;
&lt;li&gt;Wait two seconds, then fly in third message: “How are you?”&lt;/li&gt;
&lt;li&gt;Hover out returns to default message&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As you can see, we’ll first instruct the user to hover over the div, then fly out the hover message as two more messages fly in, the first of which will wait one second and the second will wait two seconds. &lt;/p&gt;
&lt;h3&gt;HTML&lt;/h3&gt;
&lt;p&gt;To bring this demo to life, we need a div that contains three different paragraphs like so. Obviously, if you were using this is a live project, you’d want to apply a class or ID, but I’ll keep it simple here.&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="html4strict" style="font-family:monospace;"&gt;&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;Hover Here&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;Greetings!&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;small&lt;/span&gt;&amp;gt;&lt;/span&gt;How Are You?&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;small&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h3&gt;CSS&lt;/h3&gt;
&lt;p&gt;To start the CSS, we’ll style the div and paragraphs. There are a few important things here to consider. First, notice the relative positioning and the hidden overflow on the div, these are important so be sure to include them.&lt;/p&gt;
&lt;p&gt;Next, notice that I’ve absolutely positioned the text items and pushed them up and out of the bounds of the div so that they’re not visible by default. I also included a completely optional fancy Sass 3D effect. For the complete mixin, check out &lt;a href="http://designshack.net/articles/css/3dsasstext/"&gt;this article&lt;/a&gt;.&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;div &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;height&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;300px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#f3f3f3&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;relative&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;overflow&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;hidden&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #808080; font-style: italic;"&gt;/*Paragraph*/&lt;/span&gt;
p &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;absolute&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;left&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;10%&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;top&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;-200px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;bold&lt;/span&gt; &lt;span style="color: #933;"&gt;70px&lt;/span&gt;/&lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; Helvetica&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #993333;"&gt;sans-serif&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;color&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#6d879d&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&amp;nbsp;
  &lt;span style="color: #a1a100;"&gt;@include threedeetext(#6d879d);&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
small &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font-size&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;40px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;Now it’s time to nudge our first paragraph into place and create our first transition. To do this, we’ll use the nth-child selector to target the first paragraph (“Hover Here”). Place it fifty pixels from the top, add a one second transition with no delay and create a hover effect that zooms it out of view. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;&lt;span style="color: #808080; font-style: italic;"&gt;/*Hover Here Text*/&lt;/span&gt;
p&lt;span style="color: #3333ff;"&gt;:nth-&lt;/span&gt;child&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;top&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;50px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  -webkit-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;top&lt;/span&gt; 1s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
     -moz-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;top&lt;/span&gt; 1s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
       -o-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;top&lt;/span&gt; 1s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
      -ms-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;top&lt;/span&gt; 1s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
          transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;top&lt;/span&gt; 1s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
div&lt;span style="color: #3333ff;"&gt;:hover &lt;/span&gt;p&lt;span style="color: #3333ff;"&gt;:nth-&lt;/span&gt;child&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;top&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;-100px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;To finish off this demo, we need to create a hover event for the second and third paragraphs. They’re basically the same, just make sure that the “Greetings” paragraph has a one second delay and the “How are you?” paragraph has a two second delay. Also be sure to position the last paragraph further down. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;&amp;nbsp;
&lt;span style="color: #808080; font-style: italic;"&gt;/*Greetings Hover*/&lt;/span&gt;
div&lt;span style="color: #3333ff;"&gt;:hover &lt;/span&gt;p&lt;span style="color: #3333ff;"&gt;:nth-&lt;/span&gt;child&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;2&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;top&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;50px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  -webkit-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;top&lt;/span&gt; 1s ease 1s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
     -moz-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;top&lt;/span&gt; 1s ease 1s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
       -o-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;top&lt;/span&gt; 1s ease 1s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
      -ms-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;top&lt;/span&gt; 1s ease 1s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
          transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;top&lt;/span&gt; 1s ease 1s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #808080; font-style: italic;"&gt;/*How Are You? Hover*/&lt;/span&gt;
div&lt;span style="color: #3333ff;"&gt;:hover &lt;/span&gt;p&lt;span style="color: #3333ff;"&gt;:nth-&lt;/span&gt;child&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;3&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;top&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;110px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  -webkit-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;top&lt;/span&gt; 1s ease 2s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
     -moz-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;top&lt;/span&gt; 1s ease 2s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
       -o-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;top&lt;/span&gt; 1s ease 2s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
      -ms-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;top&lt;/span&gt; 1s ease 2s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
          transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;top&lt;/span&gt; 1s ease 2s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #808080; font-style: italic;"&gt;/*Hover Out Transitions*/&lt;/span&gt;
p&lt;span style="color: #3333ff;"&gt;:nth-&lt;/span&gt;child&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;3&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; p&lt;span style="color: #3333ff;"&gt;:nth-&lt;/span&gt;child&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;2&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  -webkit-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;top&lt;/span&gt; 0.2s ease 0s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
     -moz-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;top&lt;/span&gt; 0.2s ease 0s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
       -o-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;top&lt;/span&gt; 0.2s ease 0s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
      -ms-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;top&lt;/span&gt; 0.2s ease 0s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
          transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;top&lt;/span&gt; 0.2s ease 0s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h3&gt;Live Demo&lt;/h3&gt;
&lt;p&gt;That’s all there is to it! Now let’s check out the live demo on Tinkerbin. Here you’ll be able to see and tweak the code, be sure to play around and see what you can come up with!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Demo:&lt;/strong&gt; &lt;a href="http://tinkerbin.com/1OrE9j4U"&gt;Click here&lt;/a&gt; to launch. Note that you’ll have to change the CSS mode to “Sass” and hit “Run” to see the 3D text effect. &lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;a href="http://tinkerbin.com/1OrE9j4U"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/transitiondelays-2.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h2&gt;One Letter At a Time&lt;/h2&gt;
&lt;p&gt;For this one, we’re only going to use a single message. However, each letter of the message will come flying into place individually. The result will be really cool and very different from what you traditionally see done with CSS. &lt;/p&gt;
&lt;h3&gt;HTML&lt;/h3&gt;
&lt;p&gt;Unfortunately, CSS doesn’t have a great way to target individual letters in a string (yet), so our HTML has to get all messy with spans. It’s a pain and the code looks a little sloppy, but it’s the best we can do without bringing JavaScript into the picture, which is out of the scope of this tutorial.&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="html4strict" style="font-family:monospace;"&gt;&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;span&lt;/span&gt;&amp;gt;&lt;/span&gt;H&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;span&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;span&lt;/span&gt;&amp;gt;&lt;/span&gt;e&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;span&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;span&lt;/span&gt;&amp;gt;&lt;/span&gt;l&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;span&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;span&lt;/span&gt;&amp;gt;&lt;/span&gt;l&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;span&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;span&lt;/span&gt;&amp;gt;&lt;/span&gt;o&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;span&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h3&gt;CSS&lt;/h3&gt;
&lt;p&gt;Our first chunk of CSS will set up our div, just like last time, and style the letters. I’m using the &lt;a href="http://www.google.com/webfonts"&gt;Google Web font&lt;/a&gt; “Bree Serif”. I also set the opacity to 0, the position to absolute and transformed the text to uppercase. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;div &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#eee&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;height&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;200px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;relative&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
span &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;400&lt;/span&gt; &lt;span style="color: #933;"&gt;100px&lt;/span&gt;/&lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;'Bree Serif'&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; Helvetica&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #993333;"&gt;sans-serif&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;50px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  opacity&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;text-transform&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;uppercase&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;absolute&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;Now we have to apply a different transition to each individual letter. To accomplish this, use nth-child just like last time and target the spans. Notice how the primary difference here is that the delay reduces each time, starting at 0.4s and making its way down to 0. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;span&lt;span style="color: #3333ff;"&gt;:nth-&lt;/span&gt;child&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;5&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  -webkit-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.1s ease 0.4s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
     -moz-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.1s ease 0.4s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
       -o-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.1s ease 0.4s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
      -ms-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.1s ease 0.4s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
          transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.1s ease 0.4s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
span&lt;span style="color: #3333ff;"&gt;:nth-&lt;/span&gt;child&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;4&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  -webkit-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.1s ease 0.3s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
     -moz-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.1s ease 0.3s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
       -o-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.1s ease 0.3s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
      -ms-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.1s ease 0.3s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
          transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.1s ease 0.3s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
span&lt;span style="color: #3333ff;"&gt;:nth-&lt;/span&gt;child&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;3&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  -webkit-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.1s ease 0.2s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
     -moz-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.1s ease 0.2s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
       -o-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.1s ease 0.2s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
      -ms-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.1s ease 0.2s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
          transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.1s ease 0.2s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
span&lt;span style="color: #3333ff;"&gt;:nth-&lt;/span&gt;child&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;2&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  -webkit-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.1s ease 0.1s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
     -moz-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.1s ease 0.1s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
       -o-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.1s ease 0.1s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
      -ms-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.1s ease 0.1s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
          transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.1s ease 0.1s&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
span&lt;span style="color: #3333ff;"&gt;:nth-&lt;/span&gt;child&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  -webkit-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.1s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
     -moz-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.1s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
       -o-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.1s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
      -ms-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.1s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
          transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.1s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;To finish this one off, we first need to declare what happens when we hover over the div. I set the spans to have an opacity of 1, brought them in from the left, and rotated them 360 degrees so that they spin into place. &lt;/p&gt;
&lt;p&gt;From here, all that’s left is to push each individual letter into place on hover. With that finished, a single hover event will cause all of the letters to become visible and spin into place and our delays will ensure that all of this takes place sequentially. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;div&lt;span style="color: #3333ff;"&gt;:hover &lt;/span&gt;span &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  opacity&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;left&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;50px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  -webkit-transform&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; rotate&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;360deg&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
     -moz-transform&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; rotate&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;360deg&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
       -o-transform&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; rotate&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;360deg&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
      -ms-transform&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; rotate&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;360deg&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
          transform&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; rotate&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;360deg&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
div&lt;span style="color: #3333ff;"&gt;:hover &lt;/span&gt;span&lt;span style="color: #3333ff;"&gt;:nth-&lt;/span&gt;child&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;2&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;left&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;120px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
div&lt;span style="color: #3333ff;"&gt;:hover &lt;/span&gt;span&lt;span style="color: #3333ff;"&gt;:nth-&lt;/span&gt;child&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;3&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;left&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;175px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
div&lt;span style="color: #3333ff;"&gt;:hover &lt;/span&gt;span&lt;span style="color: #3333ff;"&gt;:nth-&lt;/span&gt;child&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;4&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;left&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;230px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
div&lt;span style="color: #3333ff;"&gt;:hover &lt;/span&gt;span&lt;span style="color: #3333ff;"&gt;:nth-&lt;/span&gt;child&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;5&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;left&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;280px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h3&gt;Live Demo&lt;/h3&gt;
&lt;p&gt;With that, we’re all finished. Be sure to stop by the demo below and hover over the div to see the animation and tweak it for your own uses. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Demo:&lt;/strong&gt; &lt;a href="http://tinkerbin.com/5FlT7Zjj"&gt;Click here&lt;/a&gt; to launch.&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;a href="http://tinkerbin.com/5FlT7Zjj"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/transitiondelays-3.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h2&gt;Curtain Effect&lt;/h2&gt;
&lt;p&gt;By now you get the gist of how it all works, so I won’t bore you with more explanation, but I did come up with one more demo that I thought was fun. This one uses a stack of images that gradually fall away to reveal the final image on the bottom of the stack. It’s a staggered curtain effect that is definitely a lot more than you’d expect to get on a single CSS hover event.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Demo:&lt;/strong&gt; &lt;a href="http://tinkerbin.com/kArHFvxD"&gt;Click here&lt;/a&gt; to launch.&lt;/p&gt;
&lt;h2&gt;How Do You Use Transition Delays?&lt;/h2&gt;
&lt;p&gt;Now that you’ve see some of the ideas that I’ve had for creatively using transition delays, I’d love to see what you’ve come up with. Leave a link below and show me what you’ve got!&lt;/p&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://kidaworld.blogspot.com/2012/11/create-stunning-effects-with-css.html</link><author>noreply@blogger.com (UXAWY)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8363405111659754159.post-5779326209979624446</guid><pubDate>Mon, 12 Nov 2012 12:43:00 +0000</pubDate><atom:updated>2012-11-12T04:43:17.689-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">css</category><title>How to Center Anything With CSS</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/centeranything-0.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;Recently, we took a dive into the very core concepts behind CSS layout and explored the differences between &lt;a href="http://designshack.net/articles/css/the-lowdown-on-absolute-vs-relative-positioning/"&gt;absolute and relative positioning&lt;/a&gt;. We’re going to follow that up with another CSS layout talk, this time based around a fundamental question that almost every new developer asks: how do you center something?&lt;/p&gt;
&lt;p&gt;There are a bunch of different types of web elements and layout situations, each calling for a unique solution for centering (both vertically and horizontally). Today we’ll go over a bunch of these scenarios so you can wrap your mind around how they work and come away with the confidence to center anything!&lt;/p&gt;
&lt;p&gt;&lt;span id="more-31490"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Who’s This For?&lt;/h2&gt;
&lt;p&gt;I’ve gotten a lot of commenter feedback lately from designers who struggle with the basic methods and concepts of layout in CSS. The general consensus among many of those new to CSS is that they simply “fiddle” with the code until everything finally works.&lt;/p&gt;
&lt;p&gt;Having been there quite a few times myself, I know that this is an immensely frustrating period of your professional growth. Knowing that the answer is right there in front of you and not being able to figure it out is excruciating and time consuming. &lt;/p&gt;
&lt;p&gt;If this sounds familiar, hopefully I can help ease you out of this period with some solid and practical advice for how to handle some common layout scenarios. If you’re a CSS ninja who can code a website blindfolded, this article probably isn’t for you. If you’re a designer who just wants a better understanding of how to take what’s in your Photoshop file and turn it into CSS, you’re in the right place. Let’s get started.&lt;/p&gt;
&lt;h2&gt;Horizontally Center an Element&lt;/h2&gt;
&lt;p&gt;The first scenario that we’ll attack is by far one of the most common: centering an element horizontally in the viewport or browser window. To get started, let’s bust out a simple div and give it some basic styling. &lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/centeranything-1.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;As you can see, by default, our div pops up in the top left of the viewport. The trick here is that we need the div to stay in the center of the window, no matter what the window’s size is currently. That means that we can’t use absolute positioning to place it at a specific point because that won’t be centered on any other possible window sizes.&lt;/p&gt;
&lt;p&gt;Instead what we need to do is leverage the “auto” value that can be applied to margins. Here’s how this works:&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/centeranything-2.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;As you can see, applying a single line of CSS tossed our box straight to the center of its parent, which in this case is the body. To accomplish this, I used a bit of CSS shorthand. If you need a refresher, margin shorthand starts at the top and works its way around clockwise.&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/centeranything-3.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;You can shorten this even further if you only have two values that you need assigned. In this case, the first slot will apply to the top and bottom margins while the second slot will apply to the left and right margins. Here’s another look at our centered div, this time with the margins declared using three separate but perfectly equivalent methods. &lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/centeranything-4.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;As you can see, our element is void of top and bottom margins, but the left and right are set to &lt;em&gt;auto&lt;/em&gt;, which keeps the item perfectly centered. &lt;/p&gt;
&lt;h3&gt;Things To Keep In Mind&lt;/h3&gt;
&lt;p&gt;There are some important things to remember about using the auto margins trick. First of all, you &lt;strong&gt;must&lt;/strong&gt; have a specific width declared for the element that you’re centering. The height declaration is not necessary, you can allow the content to determine the height if you wish, which is the default setting, but the width must always be set. &lt;/p&gt;
&lt;p&gt;It’s important to note that while this trick will work on most block level elements, not just divs, it won’t help you out with vertical centering. As an example, let’s throw a paragraph inside of a div, then attempt to center that paragraph in the space.&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;div &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;height&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;400px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;400px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#eee&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;auto&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
p &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;60%&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;auto&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;14px&lt;/span&gt;/&lt;span style="color: #cc66cc;"&gt;1.5&lt;/span&gt; Helvetica&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #993333;"&gt;sans-serif&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/centeranything-5.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;As you can see, I have auto margins set both on the paragraph and its parent div. This centered everything nicely horizontally, but it didn’t have any effect on the vertical position. &lt;/p&gt;
&lt;h2&gt;Center An Absolutely Positioned Element&lt;/h2&gt;
&lt;p&gt;The method above works to automatically center one item inside another, but the method assumes that you’re using the default positioning context: static. If you have absolute positioning applied, this method goes out the window. &lt;/p&gt;
&lt;p&gt;Using the absolute and relative positioning methods we learned &lt;a href="http://designshack.net/articles/css/the-lowdown-on-absolute-vs-relative-positioning/"&gt;last week&lt;/a&gt;, we can apply a simply formula to solve this issue. &lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/centeranything-6.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;Here we see that on an absolutely positioned item contained inside of a relatively positioned item, we need to set the &lt;em&gt;left&lt;/em&gt; property by plugging some numbers into this formula. Here’s a test case:&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;&lt;span style="color: #6666ff;"&gt;.container&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;height&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;300px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;300px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#eee&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;10px&lt;/span&gt; &lt;span style="color: #993333;"&gt;auto&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;relative&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #6666ff;"&gt;.box&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;height&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;100px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;100px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#222&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;absolute&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/centeranything-7.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;Let’s see if we can center the black box horizontally. Using our formula, we can see that the &lt;em&gt;left&lt;/em&gt; property needs to be set to 100px. &lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/centeranything-8.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;&lt;span style="color: #6666ff;"&gt;.container&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;height&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;300px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;300px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#eee&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;10px&lt;/span&gt; &lt;span style="color: #993333;"&gt;auto&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;relative&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #6666ff;"&gt;.box&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;height&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;100px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;100px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#222&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;absolute&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;left&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;100px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;With this code, we’ve set the distance between the left side of the box and the edge of its parent container to 100px, which centers it perfectly. &lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/centeranything-9.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/centeranything-10.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;h3&gt;With Fluid Width&lt;/h3&gt;
&lt;p&gt;The method above only works if the parent container has a static width. Given the popularity of responsive design though, more and more containers are going the fluid route lately. This means that we’ll need another way to center the child that isn’t dependent on the width of the parent.&lt;/p&gt;
&lt;p&gt;To accomplish this, we need to use a percentage for the &lt;em&gt;left&lt;/em&gt; value. The obvious answer is to use 50%, but that won’t really work because you’re not accounting for the width of the element that you’re centering. To make it work, we need to add in a negative left margin of half the width of the child element. &lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/centeranything-11.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;Using this logic, we apply a left margin of negative fifty pixels along with a left value of 50% and our div is once again perfectly centered on the x-axis. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;&lt;span style="color: #6666ff;"&gt;.container&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;height&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;300px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;70%&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#eee&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;10px&lt;/span&gt; &lt;span style="color: #993333;"&gt;auto&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;relative&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #6666ff;"&gt;.box&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;height&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;100px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;100px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#222&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;absolute&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&amp;nbsp;
  &lt;span style="color: #808080; font-style: italic;"&gt;/*Centering Method 2*/&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt; &lt;span style="color: #933;"&gt;-50px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;left&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;50%&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/centeranything-9.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;It’s important to note that this would also work if our child element had a fluid width. We use the same steps as before and come up with something like the following:&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;&lt;span style="color: #6666ff;"&gt;.container&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;height&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;300px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;70%&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#eee&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;10px&lt;/span&gt; &lt;span style="color: #993333;"&gt;auto&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;relative&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #6666ff;"&gt;.box&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;height&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;100px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;70%&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#222&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;absolute&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&amp;nbsp;
  &lt;span style="color: #808080; font-style: italic;"&gt;/*Centering Method 2*/&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt; &lt;span style="color: #933;"&gt;-35%&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt; &lt;span style="color: #808080; font-style: italic;"&gt;/* Half of 70% /*
  left: 50%;
}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/centeranything-12.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;h2&gt;Dead Center an Element&lt;/h2&gt;
&lt;p&gt;Now that we have a few simple and complicated centering methods in our tool belt, it’s time to tackle the puzzle of perfectly centering an element both horizontally and vertically. &lt;/p&gt;
&lt;p&gt;Fortunately, to pull this off, we can use the same method that we just learned, we just have to account for height. This time around we’re also going to center both the parent and the child both vertically and horizontally. Here’s the code to pull it off:&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;&lt;span style="color: #6666ff;"&gt;.container&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;height&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;300px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;300px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#eee&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;absolute&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&amp;nbsp;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;-150px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt; &lt;span style="color: #933;"&gt;-150px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;left&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;50%&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;top&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;50%&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #6666ff;"&gt;.box&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;height&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;100px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;100px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#222&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;absolute&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&amp;nbsp;
  &lt;span style="color: #808080; font-style: italic;"&gt;/*Centering Method 2*/&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;-50px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt; &lt;span style="color: #933;"&gt;-50px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;left&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;50%&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;top&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;50%&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/centeranything-14.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;There are a few things that you need to notice here. First, this time &lt;strong&gt;both&lt;/strong&gt; the parent and the child are absolutely positioned. From here, I used our negative margins trick with the left property on the container div, then did the same for the box div. &lt;/p&gt;
&lt;p&gt;The result is that our content is completely centered and will stay that way as the browser changes size in any direction (even vertically!). Click on the image below to tinker with a live demo. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://tinkerbin.com/c6OniFNx"&gt;
&lt;/a&gt;&lt;/p&gt;&lt;div class="tutorialimage"&gt;&lt;a href="http://tinkerbin.com/c6OniFNx"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/centeranything-13.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://tinkerbin.com/c6OniFNx"&gt;
&lt;/a&gt;&lt;p&gt;&lt;a href="http://tinkerbin.com/c6OniFNx"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Centering Text&lt;/h2&gt;
&lt;p&gt;For my next trick, I’ll teach you something cool about centering text. We’ll start with a simple h1 element inside of a container div. &lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/centeranything-15.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;Now, I’m sure that you already know how to center this text horizontally in the space. It’s typically one of the first things you learn in CSS. Just set the &lt;em&gt;text-align&lt;/em&gt; property to center.&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;&lt;span style="color: #6666ff;"&gt;.container&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;height&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;400px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;400px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#eee&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;50px&lt;/span&gt; &lt;span style="color: #993333;"&gt;auto&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
h1 &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;40px&lt;/span&gt;/&lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; Helvetica&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #993333;"&gt;sans-serif&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;text-align&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;center&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/centeranything-16.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;Easy right? But now let’s say we want to center this line of text vertically as well. If this were a paragraph, we would probably take the methods above into account, but since it’s only a single line, we can use a nifty trick. &lt;/p&gt;
&lt;p&gt;All we have to do is set the &lt;em&gt;line-height&lt;/em&gt; property to the height of the container. I accomplished this below using the &lt;a href="http://designshack.net/articles/css/6-css-shorthand-tricks-every-developer-should-know"&gt;shorthand font syntax&lt;/a&gt;.&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;&lt;span style="color: #6666ff;"&gt;.container&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;height&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;200px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt; &lt;span style="color: #808080; font-style: italic;"&gt;/*Set line-height to this value*/&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;400px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#eee&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;150px&lt;/span&gt; &lt;span style="color: #993333;"&gt;auto&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
h1 &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;40px&lt;/span&gt;/&lt;span style="color: #933;"&gt;200px&lt;/span&gt; Helvetica&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #993333;"&gt;sans-serif&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;text-align&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;center&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/centeranything-17.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Warning:&lt;/strong&gt; This trick only works with a single line of text, and is a bit hacky so it may not be appropriate for all situations.&lt;/p&gt;
&lt;h2&gt;Centering a Background Image&lt;/h2&gt;
&lt;p&gt;The last thing that we’re going to learn to center is a CSS background image. To get started with this, we’ll create another container div, but this time we’ll keep in empty and toss in an image using CSS. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;&lt;span style="color: #6666ff;"&gt;.container&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;height&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;300px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;300px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;150px&lt;/span&gt; &lt;span style="color: #993333;"&gt;auto&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#eee&lt;/span&gt; &lt;span style="color: #993333;"&gt;url&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;http&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt;//lorempixum.com/&lt;span style="color: #cc66cc;"&gt;100&lt;/span&gt;/&lt;span style="color: #cc66cc;"&gt;100&lt;/span&gt;/nature/&lt;span style="color: #cc66cc;"&gt;4&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt; &lt;span style="color: #993333;"&gt;no-repeat&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;As you can see, the default place for an image to appear if no repeat is set is the top left. It turns out though that you can move it to one of nine different preassigned slots. These are shown below:&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/centeranything-19.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/centeranything-18.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;We accomplish this movement through the use of the &lt;em&gt;background-position&lt;/em&gt; property. Simply call this property and set any of the values listed above. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;&lt;span style="color: #6666ff;"&gt;.container&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;height&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;300px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;300px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;150px&lt;/span&gt; &lt;span style="color: #993333;"&gt;auto&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#eee&lt;/span&gt; &lt;span style="color: #993333;"&gt;url&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;http&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt;//lorempixum.com/&lt;span style="color: #cc66cc;"&gt;100&lt;/span&gt;/&lt;span style="color: #cc66cc;"&gt;100&lt;/span&gt;/nature/&lt;span style="color: #cc66cc;"&gt;4&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt; &lt;span style="color: #993333;"&gt;no-repeat&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;top&lt;/span&gt; &lt;span style="color: #993333;"&gt;center&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/centeranything-20.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;As an alternative, we can use the shorthand syntax for this. Simply toss in one of the values at the end of your stream of values on the &lt;em&gt;background&lt;/em&gt; property.&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #eeeeee;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;&lt;span style="color: #6666ff;"&gt;.container&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;height&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;300px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;300px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;150px&lt;/span&gt; &lt;span style="color: #993333;"&gt;auto&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#eee&lt;/span&gt; &lt;span style="color: #993333;"&gt;url&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;http&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt;//lorempixum.com/&lt;span style="color: #cc66cc;"&gt;100&lt;/span&gt;/&lt;span style="color: #cc66cc;"&gt;100&lt;/span&gt;/nature/&lt;span style="color: #cc66cc;"&gt;4&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt; &lt;span style="color: #993333;"&gt;no-repeat&lt;/span&gt; &lt;span style="color: #993333;"&gt;center&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/centeranything-21.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;There you have it! You should now be completely confident in your ability to tackle almost any centering situation with CSS, from dead centering a div to vertically centering a line of text within its container and beyond. &lt;/p&gt;
&lt;p&gt;Reach out to us on &lt;a href="https://www.facebook.com/designshack"&gt;Facebook&lt;/a&gt; or &lt;a href="https://twitter.com/#!/designshack"&gt;Twitter&lt;/a&gt; and let us know if you found this information to be helpful and if you have any questions. &lt;/p&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://kidaworld.blogspot.com/2012/11/how-to-center-anything-with-css.html</link><author>noreply@blogger.com (UXAWY)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8363405111659754159.post-7000516061408953185</guid><pubDate>Mon, 12 Nov 2012 12:39:00 +0000</pubDate><atom:updated>2012-11-12T04:39:10.488-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">design</category><title>Use Abstract Geometry to Create Stunning Designs</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/geoshapedesign-0.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;If you’ve ever found yourself in a design rut, wondering how to come up with some fresh ideas, then you’ve no doubt experienced how refreshing it can be to experiment with a new design style that’s completely outside of what you typically produce.&lt;/p&gt;
&lt;p&gt;Today we’re going to do exactly that. I’ve been fascinated with a particular style lately and just itching to give it a test drive. We’ll start by analyzing this style’s characteristics through the work of others and then proceed to building something on our own using what we learn. Read on to see the step by step process. &lt;/p&gt;
&lt;p&gt;&lt;span id="more-33281"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Step One&lt;/h2&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/geoshapedesign-1.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;&lt;em style="font-size: 11px;"&gt;Image source: &lt;a href="http://www.flickr.com/photos/hummyhummy/2659815920/"&gt;Gilberto Taccari&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;How do you start a design project? You’re looking at a blank canvas and it’s time to put something on it, so what’s the first step? I suppose that just about every designer approaches this challenge uniquely. Some grab a pencil and start sketching what comes to mind, others prefer to start with a typeface and let that speak to them. As a photographer, I often look to great photos as a leaping off point for an overall aesthetic and color scheme. Give me a great photo and I can build a great page around it. &lt;/p&gt;
&lt;p&gt;It’s good to have routines that get you off to a fast start and help you develop a unique style, but I personally find that falling into too much of a routine leaves me in a design rut where everything starts to look the same.&lt;/p&gt;
&lt;p&gt;If you have encountered similar problems, I can’t recommend enough that you try to put yourself in the mindset of other designers by attempting to mimic their thought processes while ultimately achieving a unique result. Perhaps you always start a job by opening up Photoshop, so to mix things up you might try launching a drawing application on your iPad and picking up a good stylus. &lt;/p&gt;
&lt;h3&gt;Experimenting With Different Styles&lt;/h3&gt;
&lt;p&gt;This idea carries over to the entire design process. Experimenting with different beginning points will lead you off into new directions and have you coming up with ideas that are completely outside of the realm of your typical design style.&lt;/p&gt;
&lt;p&gt;I often make it a practice to closely observe and analyze different design styles and then experiment with them to stretch my talents and experience. &lt;/p&gt;
&lt;h2&gt;Shapes Aplenty&lt;/h2&gt;
&lt;p&gt;In order to achieve the goals outlined above, we’re going to explore a particular type of design that has really been catching my attention lately. It’s not new and in fact has an almost late 70s early 80s appeal, yet it carries with it a timeless, simple aesthetic that I think looks great in a variety of contexts.&lt;/p&gt;
&lt;p&gt;Specifically, I’m talking about the school of design that makes heavy use of strong, often random geometric shapes as a primary design feature. Sure, shapes are present in all design, but this style uses them boldly and simply. Here’s a fairly archetypal example from Squat Design. &lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/geoshapedesign-2.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;&lt;em style="font-size: 11px;"&gt;Image source: &lt;a href="http://www.behance.net/gallery/WE-WORK/3247061"&gt;Squat Design&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;In looking at this design, one of the first things that I notice is that the entire concept is heavily driven by diagonal lines. We typically tend to use straight lines to define our content so this instantly causes the viewer to see this as something unique and interesting. &lt;/p&gt;
&lt;p&gt;Also notice two more interesting features. First, the photography used has been integrated in with the shapes rather than merely appearing alongside them. Further, color and transparency are two more main themes that drive this style. &lt;/p&gt;
&lt;p&gt;Here’s another example of something from this style by Sawdust, a design firm in the UK.&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/geoshapedesign-3.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;&lt;em style="font-size: 11px;"&gt;Image source: &lt;a href="http://www.behance.net/gallery/mediaPro-Brochure/922542"&gt;Sawdust&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Once again we see a lot of random shapes being used to add visual interest, heavily driven by the implementation of diagonal lines. I’m also starting to notice a trend in the use of fairly thin typography, which complements the emphasis on simple, clean lines.  &lt;/p&gt;
&lt;p&gt;This design as well as the next one have introduced some circles into the mix as well, which really stand out among all of those hard angles that you see elsewhere throughout the page. &lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/geoshapedesign-4.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;&lt;em style="font-size: 11px;"&gt;Image source: &lt;a href="http://www.behance.net/gallery/Typographic-Revolt-HypeForType-Typefaces/2745687"&gt;Ryan Atkinsons &amp;amp; Stephan de lange&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;Let’s Try It!&lt;/h2&gt;
&lt;p&gt;Now that we’ve seen a few examples of what this type of design looks like, let’s give it a quick shot to see what we can come up with. Exercises like this are perfect for working out your design muscles. Try setting a time limit, say twenty minutes or so, and then experimenting with a new style within that constricted time frame to see what you come up with.&lt;/p&gt;
&lt;p&gt;In an attempt to intentionally stray from my typical design process, I decided to start out by just grabbing some shapes to play around with in Adobe Illustrator. Given that the design style that we’re going for gives such prominence to triangles, I thought I’d start there. &lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/geoshapedesign-5.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;After moving things around for a while, I came up with a sort of tessellation pattern that I thought looked interesting. &lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/geoshapedesign-6.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;From here, I decided that it was time to add in some color to give those boring black triangles some character. I jumped over to &lt;a href="http://kuler.adobe.com"&gt;Kuler&lt;/a&gt; and literally just grabbed the first &lt;a href="http://kuler.adobe.com/#themeID/1895756"&gt;color scheme&lt;/a&gt; that I saw.&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/geoshapedesign-7.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;Applying this color scheme to my triangles really bumped up the aesthetic nicely:&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/geoshapedesign-8.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;Continuing to follow my observations from above, I added some more triangles, this time with transparency effects and then tossed in some freestanding diagonal lines, which gave the entire thing a sense of motion. By now, the result was really taking on a complex, layered feel that I just loved. &lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/geoshapedesign-10.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;Next I decided to toss in some text. A super light version of Helvetica seemed like a good fit given that thin typography pairs so well with this design style. Notice how I staggered the text to mirror the slant of the triangles. Little uses of repetition really make a design great. &lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/geoshapedesign-11.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;h3&gt;Finishing Touches&lt;/h3&gt;
&lt;p&gt;From here I just kept adding and iterating until I landed on something that I thought looked complete. As you can see, I experimented with some photography and added in a few circles like we saw the other designers doing. To make the triangles a little more interesting I masked in the initials of the site. &lt;/p&gt;
&lt;p&gt;Ultimately, as a quick experiment, I was thrilled with the way it turned out. I had been wanting to play around with an abstract geometric design style for a long time and it turned out to be every bit as mentally fulfilling as I had hoped. &lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/geoshapedesign-12.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;h2&gt;Download the Desktop!&lt;/h2&gt;
&lt;p&gt;Since I had a cool design and nothing to do with it, I decided to slap it on a desktop wallpaper for your downloading pleasure. Enjoy!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Download:&lt;/strong&gt; &lt;a href="http://designshack.net/tutorialexamples/DS-Desktop/designshackdesktop.jpg"&gt;Click here&lt;/a&gt; to download.&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/geoshapedesign-13.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;h2&gt;Have You Seen This Style Elsewhere?&lt;/h2&gt;
&lt;p&gt;Now that you’ve seen my analysis of the abstract geometric design style, I’d love to hear your thoughts. Do you think this is an interesting aesthetic theme? How would you have used it differently?&lt;/p&gt;
&lt;p&gt;If you’ve seen any similar examples lately, leave a link below so that we can check them out!&lt;/p&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://kidaworld.blogspot.com/2012/11/use-abstract-geometry-to-create.html</link><author>noreply@blogger.com (UXAWY)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8363405111659754159.post-7389575520965712284</guid><pubDate>Mon, 12 Nov 2012 12:37:00 +0000</pubDate><atom:updated>2012-11-12T04:37:14.035-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">portfolio</category><title>You’re a Designer and Don’t Have a Website? Get Started Now</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;a data-service="facebook" class="ra1-pw-icon ra1-pw-icon-facebook" href="#"&gt;&lt;/a&gt;&lt;a data-service="twitter" class="ra1-pw-icon ra1-pw-icon-twitter" href="#"&gt;&lt;/a&gt;&lt;a data-service="mail" class="ra1-pw-icon ra1-pw-icon-mail" href="#"&gt;&lt;/a&gt;&lt;a class="ra1-pw-icon ra1-pw-icon-post" href="#"&gt;&lt;/a&gt;&lt;/div&gt;
			&lt;script src="http://i.po.st/share/script/post-widget.js#publisherKey=949vjf4m5v0bnshaon7g" type="text/javascript"&gt;&lt;/script&gt;
			
			
		
					
		
	&lt;/div&gt;


	&lt;div class="entry_single"&gt;
		
		
		
		
		
					
			
			
			&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/donthaveasite.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;It is still hard for me to imagine that there are print and even web designers who don’t have their own websites. It is imperative in today’s business climate that everyone has a digital portfolio and that it is up-to-date. The hard part is just getting started.&lt;/p&gt;
&lt;p&gt;What you don’t need is a world-class website filled with animations and color and gimmicks. What you do need to have is a clean, easy to navigate site that showcases your work. You can go all out and design a site from scratch or for a quick fix, use one of the many (and often free) host sites available to create get your portfolio and be online by the end of the week.&lt;/p&gt;
&lt;p&gt;&lt;span id="more-33479"&gt;&lt;/span&gt;&lt;br&gt;
&lt;em&gt;Like the article? Be sure to subscribe to our &lt;a&gt;RSS feed&lt;/a&gt; and follow us on &lt;a href="http://twitter.com/designshack" target="_blank"&gt;Twitter&lt;/a&gt; to stay up on recent content.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;Portfolio Website 101&lt;/h2&gt;
&lt;p&gt;Creating a portfolio website is about more than just throwing a few images on the Internet. You should integrate your site into all of your promotional materials, such as business cards and email signatures to anyone who is interested in hiring you can check out your work. This can save you (and potential clients) time and resources.&lt;/p&gt;
&lt;p&gt;A portfolio site can help you land new clients and is a great resource when you are looking at changing jobs. Once set up, you just need to maintain your site by adding new projects periodically so that content is fresh, includes modern styles and themes and looks relevant. &lt;/p&gt;
&lt;p&gt;The best design portfolio sites have a few key features that each have specific purposes.&lt;/p&gt;
&lt;h3&gt;Self Promotion&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://www.markhobbs.net/" target="_blank"&gt;
&lt;/a&gt;&lt;/p&gt;&lt;div class="tutorialimage"&gt;&lt;a href="http://www.markhobbs.net/" target="_blank"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/hobbs.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://www.markhobbs.net/" target="_blank"&gt;
&lt;/a&gt;&lt;p&gt;&lt;a href="http://www.markhobbs.net/" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You are doing good work and you should show it off. There is no easier way to sell yourself than to show off past projects. Make sure your site includes only your best work. There is no reason to add every completed project to your site.&lt;/p&gt;
&lt;p&gt;Periodically, make sure to go through your online portfolio and clean it up. There is no magic number of items to keep live on your site, but maintain a manageable number. You want potential clients or employers to get an idea of the type of work you can do, but not be overwhelmed by it.&lt;/p&gt;
&lt;p&gt;Think about your goals as you build your portfolio site (and understand that you can have multiple goals). Commonly, designers use a site to get hired — either at a new job or for freelance projects, to generate sales, to build a reputation as a designer and get your name and work out there and mentioned among peers and as a networking resource.&lt;/p&gt;
&lt;h3&gt;Springboard for Contacts&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://ftdesigner.net/" target="_blank"&gt;
&lt;/a&gt;&lt;/p&gt;&lt;div class="tutorialimage"&gt;&lt;a href="http://ftdesigner.net/" target="_blank"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/ftabout.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://ftdesigner.net/" target="_blank"&gt;
&lt;/a&gt;&lt;p&gt;&lt;a href="http://ftdesigner.net/" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Make sure your site clearly states who you are, what you do and how potential clients can get in touch with you. It seems simple enough, but way too often designers put all of their best work online only to leave out key information that can help them get hired for new jobs.&lt;/p&gt;
&lt;p&gt;Don’t stop with just your contact information. Include a little information about the types of work you take on, whether you do all of your work for a single company or take on freelance or contract-based projects. Include some of your specialties – are you an expert in websites using Flash-based animations, creating illustrations or in newspaper advertising? &lt;/p&gt;
&lt;p&gt;Think of including your photo or mention of your blog or other information. These items will make you more personable to site visitors and help them form a connection to you. People like to work with other people and providing this information can help you gain an edge.&lt;/p&gt;
&lt;h3&gt;Clear Navigation&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://www.gerrenlamson.com/" target="_blank"&gt;
&lt;/a&gt;&lt;/p&gt;&lt;div class="tutorialimage"&gt;&lt;a href="http://www.gerrenlamson.com/" target="_blank"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/lamson.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://www.gerrenlamson.com/" target="_blank"&gt;
&lt;/a&gt;&lt;p&gt;&lt;a href="http://www.gerrenlamson.com/" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It is very important to group projects in a clear manner, especially for those who work across multiple platforms or mediums. You may consider dividing your site into sections for print projects, web projects and personal projects (such as self-promotional materials). If you have design work that was done on contract showcase that in addition to items you may have for sale (such as artwork).&lt;/p&gt;
&lt;h3&gt;Links and Images&lt;/h3&gt;
&lt;p&gt;If nothing else, make sure all of your links are correct (and to date) and your images are of high quality. Your visuals are what will sell your portfolio. Do not skimp here and check back frequently to ensure everything appears as it should.&lt;/p&gt;
&lt;h2&gt;Getting Started with Portfolio Tools&lt;/h2&gt;
&lt;p&gt;Building your first portfolio site does can be simple. Start with a portfolio building tool that you can customize. This makes getting a site online quick and easy for those who do not want to deal with buying a custom domain name or deal with site building and hosting.&lt;/p&gt;
&lt;p&gt;When using one of these sites to create a portfolio, take advantage of options such as creating a URL that contains your name and including a banner with your personal information at the top of each page.&lt;/p&gt;
&lt;h3&gt;CarbonMade&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://goforitdesign.carbonmade.com/" target="_blank"&gt;
&lt;/a&gt;&lt;/p&gt;&lt;div class="tutorialimage"&gt;&lt;a href="http://goforitdesign.carbonmade.com/" target="_blank"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/carbongoforit.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://goforitdesign.carbonmade.com/" target="_blank"&gt;
&lt;/a&gt;&lt;p&gt;&lt;a href="http://goforitdesign.carbonmade.com/" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://ankepanke.carbonmade.com/" target="_blank"&gt;
&lt;/a&gt;&lt;/p&gt;&lt;div class="tutorialimage"&gt;&lt;a href="http://ankepanke.carbonmade.com/" target="_blank"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/carbonanke.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://ankepanke.carbonmade.com/" target="_blank"&gt;
&lt;/a&gt;&lt;p&gt;&lt;a href="http://ankepanke.carbonmade.com/" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://carbonmade.com/" target="_blank"&gt;CarbonMade&lt;/a&gt; is one of the most popular portfolio sites out there. The free version allows users to highlight five projects and 35 images and for $12 per month you can have up to 500 projects.&lt;/p&gt;
&lt;p&gt;The great thing about CarbonMade is that it supports almost everything – still images and videos. The interface is sleek and the pre-made themes look professional and you really can get your website together in an afternoon.&lt;/p&gt;
&lt;p&gt;The downside is that you are somewhat limited by how many items you can post at a time. &lt;/p&gt;
&lt;h3&gt;Breezi&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://noamliss.com/" target="_blank"&gt;
&lt;/a&gt;&lt;/p&gt;&lt;div class="tutorialimage"&gt;&lt;a href="http://noamliss.com/" target="_blank"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/breezinoam.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://noamliss.com/" target="_blank"&gt;
&lt;/a&gt;&lt;p&gt;&lt;a href="http://noamliss.com/" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://fragmentsofwinter.breezi.com/" target="_blank"&gt;
&lt;/a&gt;&lt;/p&gt;&lt;div class="tutorialimage"&gt;&lt;a href="http://fragmentsofwinter.breezi.com/" target="_blank"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/breezifragments.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://fragmentsofwinter.breezi.com/" target="_blank"&gt;
&lt;/a&gt;&lt;p&gt;&lt;a href="http://fragmentsofwinter.breezi.com/" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://breezi.com/" target="_blank"&gt;Breezi&lt;/a&gt; is a from-the-ground-up site but is appealing to designers because its interface contains many controls for designers who are not familiar with HTML and coding to make from-scratch design easy. The site is still pretty new and users can still sign up for free through the end of June (and maintain a free account forever). &lt;/p&gt;
&lt;p&gt;The big benefit to Breezi is the design controls when it comes to alignment, color and spacing. You really don’t have to know anything about HTML to build a nice looking site. The interface contains RSS and social media tools so you can add feeds to your site (this is great for designers who are also writers).&lt;/p&gt;
&lt;p&gt;The downside to Breezi is that it looks unlike anything you have ever used, but once you get used to the setup, rolling through building a site is not too tough.&lt;/p&gt;
&lt;h3&gt;Behance&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://www.behance.net/sawdust" target="_blank"&gt;
&lt;/a&gt;&lt;/p&gt;&lt;div class="tutorialimage"&gt;&lt;a href="http://www.behance.net/sawdust" target="_blank"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/behancesawdust.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://www.behance.net/sawdust" target="_blank"&gt;
&lt;/a&gt;&lt;p&gt;&lt;a href="http://www.behance.net/sawdust" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.behance.net/gallery/Atelier-Identity/4013689" target="_blank"&gt;
&lt;/a&gt;&lt;/p&gt;&lt;div class="tutorialimage"&gt;&lt;a href="http://www.behance.net/gallery/Atelier-Identity/4013689" target="_blank"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/behanceatelier.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://www.behance.net/gallery/Atelier-Identity/4013689" target="_blank"&gt;
&lt;/a&gt;&lt;p&gt;&lt;a href="http://www.behance.net/gallery/Atelier-Identity/4013689" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.behance.net/" target="_blank"&gt;Behance&lt;/a&gt; is a completely free site dedicated to the portfolios of creative professionals. The site is much more of a group of portfolios than tailored website but can be a great starting point if you do not have a lot of time (or you can use it to link to from another site).&lt;/p&gt;
&lt;p&gt;Behance has a great reputation among the design-minded and is used as a resource by many.&lt;/p&gt;
&lt;p&gt;The downside, because it is free there are ads on the site and there are not many customization options.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Every designer, whether you work in the web or print (or both) platform needs to have a website to showcase work. Websites can be simple and should only contain examples of a designer’s best work. Remember, using too many items can be a little overwhelming.&lt;/p&gt;
&lt;p&gt;Make sure to keep your portfolio up to date and make sure your contact information is easily accessible. If you are unsure of where to start when building your first site, start with an online portfolio tool. You can create a simple and effective site in just a few hours and be ready to show off your best work to a much wider audience.&lt;/p&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://kidaworld.blogspot.com/2012/11/youre-designer-and-dont-have-website.html</link><author>noreply@blogger.com (UXAWY)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8363405111659754159.post-5449852752523610267</guid><pubDate>Mon, 12 Nov 2012 12:34:00 +0000</pubDate><atom:updated>2012-11-12T04:34:35.074-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">css</category><category domain="http://www.blogger.com/atom/ns#">gallary</category><title>The 30 Best Web Design Gallery Picks of 2012</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;a class="ra1-pw-icon ra1-pw-icon-facebook" data-service="facebook" href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#"&gt;&lt;/a&gt;&lt;a class="ra1-pw-icon ra1-pw-icon-twitter" data-service="twitter" href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#"&gt;&lt;/a&gt;&lt;a class="ra1-pw-icon ra1-pw-icon-mail" data-service="mail" href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#"&gt;&lt;/a&gt;&lt;a class="ra1-pw-icon ra1-pw-icon-post" href="http://www.blogger.com/blogger.g?blogID=8363405111659754159#"&gt;&lt;/a&gt;&lt;br /&gt;
&lt;script src="http://i.po.st/share/script/post-widget.js#publisherKey=949vjf4m5v0bnshaon7g" type="text/javascript"&gt;&lt;/script&gt;
			
			
		
					
		
	


	&lt;br /&gt;
&lt;div class="entry_single"&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/bestpicks-0.jpg" width="510" /&gt;&lt;/div&gt;
We’re well past the half way point of 2012, and it’s been an absolutely amazing year for web design. CSS3 and HTML5 are at the height of their game, responsive design is the poster child of modern web practices and we’re beginning to wrap our minds around new concepts such as serving up retina quality images to high resolution devices.&lt;br /&gt;
With all of this great stuff happening in the industry, the &lt;a href="http://designshack.net/gallery"&gt;Design Shack Web Design Gallery&lt;/a&gt; is positively bursting with awesome new inspiration and I think it’s a great time to highlight the best sites that we’ve seen in 2012 so far. Read on to see our hand-picked selection of the thirty best sites submitted this year. &lt;br /&gt;
&lt;span id="more-33867"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2&gt;
&lt;a href="http://designshack.net/design/quarter-rest-studios"&gt;Quarter Rest Studios&lt;/a&gt;&lt;/h2&gt;
A great site for a collaborative music design studio based in Brooklyn, New York. I particularly like the minimal layout and the use of imagery.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/bestpicks-1.jpg" width="510" /&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;a href="http://designshack.net/design/when-was-the-last-time"&gt;When was the last time?&lt;/a&gt;&lt;/h2&gt;
A intriguing site that aims to challenge you and ask questions. I like the integration of the experience and the images and videos used.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/bestpicks-2.jpg" width="510" /&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;a href="http://designshack.net/design/riley-cran"&gt;Riley Cran&lt;/a&gt;&lt;/h2&gt;
A simply superb portfolio site for a designer and illustrator in Vancouver, BC. I love the total lack of descriptive text, it helps to intrigue you further and draw you in.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/bestpicks-3.jpg" width="510" /&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;a href="http://designshack.net/design/goosebumps-pickles"&gt;Goosebumps Pickles&lt;/a&gt;&lt;/h2&gt;
A simply gorgeous site for a Pickle company that uses stunning photography to grab your attention within a split second. I love the full use of the space and the joyously vibrant colors!&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/bestpicks-4.jpg" width="510" /&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;a href="http://designshack.net/design/forside"&gt;Forside&lt;/a&gt;&lt;/h2&gt;
Subtle colours and professional design, with wonderfully chosen photography to match the layout.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/bestpicks-5.jpg" width="510" /&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;a href="http://designshack.net/design/made-by-vadim"&gt;Made by Vadim&lt;/a&gt;&lt;/h2&gt;
A lengthy one page website, packed with well presented examples of Vadim’s work. A gorgeous selection of typography to boot!&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/bestpicks-6.jpg" width="510" /&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;a href="http://designshack.net/design/go-beyond-pixels"&gt;Go Beyond Pixels&lt;/a&gt;&lt;/h2&gt;
For a conference focused on mobile design, Go Beyond Pixels really hits the spot! It combines various styles and colours into a long one-page design, with amazing detail invested into tiny elements.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/bestpicks-7.jpg" width="510" /&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;a href="http://designshack.net/design/google-ventures"&gt;Google Ventures&lt;/a&gt;&lt;/h2&gt;
This design for Google Ventures is a beautiful mix of photography and design, with a unique scrolling effect as you move further down the page.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/bestpicks-8.jpg" width="510" /&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;a href="http://designshack.net/design/css-piffle"&gt;CSS Piffle&lt;/a&gt;&lt;/h2&gt;
A beautifully designed website that aims to help you make the most of CSS. I like the linear layout and the use of iconography throughout.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/bestpicks-9.jpg" width="510" /&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;a href="http://designshack.net/design/art-code"&gt;Art &amp;amp; Code&lt;/a&gt;&lt;/h2&gt;
A simple, but effective, portfolio section of a site for a design agency. I like the way the designs come to life as you scroll over them, and the simple and intuitive layout.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/bestpicks-10.jpg" width="510" /&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;a href="http://designshack.net/design/mike-ingham-design"&gt;Mike Ingham Design&lt;/a&gt;&lt;/h2&gt;
An incredibly beautiful portfolio that values space and clarity. I love the layout and the fantastic use of whitespace. The way this designers previous work is displayed really works to draw you into the portfolio.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/bestpicks-11.jpg" width="510" /&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;a href="http://designshack.net/design/fit-for-a-frame"&gt;Fit for a Frame&lt;/a&gt;&lt;/h2&gt;
A simple but perfectly designed site for a company that sells prints to fit in Ikea frames. I like the use of typography and the intuitive layout of the site.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/bestpicks-12.jpg" width="510" /&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;a href="http://designshack.net/design/fancyrhino"&gt;FancyRhino&lt;/a&gt;&lt;/h2&gt;
An intriguing site for a design company that uses horizontal scrolling, a fascinating design decision. It’s a shame you can’t easily scroll sideways and have to grab the bar, but I like the style of the site and the use of typography.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/bestpicks-13.jpg" width="510" /&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;a href="http://designshack.net/design/shoplocket"&gt;ShopLocket&lt;/a&gt;&lt;/h2&gt;
A strong site that aims to introduce you to a new way to implement selling through your site. I like the strong vertical layout that takes you through the key things you need to know, and the consistent use of iconography.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/bestpicks-14.jpg" width="510" /&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;a href="http://designshack.net/design/flint-boutique"&gt;Flint Boutique&lt;/a&gt;&lt;/h2&gt;
A gorgeous, and perfectly pitched, site for a company that creates one-of-a-kind, custom invitations and wedding stationery. I love the typography and restrained, yet bright, use of colour throughout.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/bestpicks-15.jpg" width="510" /&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;a href="http://designshack.net/design/rally-interactive"&gt;Rally Interactive&lt;/a&gt;&lt;/h2&gt;
Here we have a particularly interesting design that uses triangles for displaying examples of previous work. I like the the clear layout and intuitive use of navigation.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/bestpicks-16.jpg" width="510" /&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;a href="http://designshack.net/design/fiftythree"&gt;FiftyThree&lt;/a&gt;&lt;/h2&gt;
A simply perfect site to advertise a new iPad app. FiftyThree have done a beautiful job with Paper, and this website is designed to show it off. I like the restrained use of text and the subtle but intuitive footer that includes the navigation.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/bestpicks-17.jpg" width="510" /&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;a href="http://designshack.net/design/wwf-food-story"&gt;WWF Food Story&lt;/a&gt;&lt;/h2&gt;
This is a superb site from the WWF that features a series of simple but effective infographics. I love the illustrative style and the responsiveness of the graphics, it really helps get the point across.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/bestpicks-18.jpg" width="510" /&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;a href="http://designshack.net/design/merchworld"&gt;Merchworld&lt;/a&gt;&lt;/h2&gt;
A solid and immediately striking site for music merchandise. I’m drawn in by the stark use of a grid layout. I particularly like the way the design responds to resizing.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/bestpicks-19.jpg" width="510" /&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;a href="http://designshack.net/design/galpin"&gt;Galpin&lt;/a&gt;&lt;/h2&gt;
A design portfolio that makes a striking impact through its use of typography and concise use of text. I like the restrained use of colour and the way the site immediately plunges you into this designers portfolio.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/bestpicks-20.jpg" width="510" /&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;a href="http://designshack.net/design/austin-beerworks"&gt;Austin Beerworks&lt;/a&gt;&lt;/h2&gt;
A stunning site for a brewery that makes a bold impact through its use of impressive typography. I love the colours of the background and the restrained use of text, you’re intrigued to see what the next slide will be.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/bestpicks-21.jpg" width="510" /&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;a href="http://designshack.net/design/blind-barber"&gt;Blind Barber&lt;/a&gt;&lt;/h2&gt;
I really like the strong image focus that this site has, the huge background images giving a real sense of character and consistency to the site. The use of typography and simple iconography helps to unite the site and create a engaging experience.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/bestpicks-22.jpg" width="510" /&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;a href="http://designshack.net/design/myownbike"&gt;Myownbike&lt;/a&gt;&lt;/h2&gt;
Here we have a simply gorgeous site that’s dedicated to fixed gear bicycles. I love the minimal layout and restrained use of text, but the thing that shines through is the phenomenal photography – it’s jaw-droppingly good!&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/bestpicks-23.jpg" width="510" /&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;a href="http://designshack.net/design/nixon-creative"&gt;Nixon Creative&lt;/a&gt;&lt;/h2&gt;
A simply gorgeous site for a web designer that makes a great statement about his design philosophy. I like the bold illustration and the restrained use of text, it all helps to draw you into the portfolio of his work.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/bestpicks-24.jpg" width="510" /&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;a href="http://designshack.net/design/ride-for-the-brand"&gt;Ride For The Brand&lt;/a&gt;&lt;/h2&gt;
A superb. and effortlessly engaging, site for a digital agency that makes a mark through its unique design and navigation. Simply move your cursor to the right to get the collage of typography and illustration moving!&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/bestpicks-25.jpg" width="510" /&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;a href="http://designshack.net/design/andy-patrick"&gt;Andy Patrick&lt;/a&gt;&lt;/h2&gt;
A superb portfolio site for a web and print designer that makes an immediate impression. I love the use of typography and the consistent design throughout the site. The gallery looks great, perfectly showcasing previous examples of his work.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/bestpicks-26.jpg" width="510" /&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;a href="http://designshack.net/design/beckin-design"&gt;Beckin Design&lt;/a&gt;&lt;/h2&gt;
This is a superb site for a group of interaction and industrial designers who create unique home and outdoor products. I love the colour palette and the uniquely minimal feel of the site.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/bestpicks-27.jpg" width="510" /&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;a href="http://designshack.net/design/dan-viveiros"&gt;Dan Viveiros&lt;/a&gt;&lt;/h2&gt;
A great portfolio for a designer that makes a distinct impact. I really like the colour scheme and the use of icons and imagery. The typography is also an effective tool to convey the stylistic ideas of the designer.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/bestpicks-28.jpg" width="510" /&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;a href="http://designshack.net/design/fortyseven-media"&gt;FortySeven Media&lt;/a&gt;&lt;/h2&gt;
A brilliant site for a design agency that looks to blow the competition away. I like the use of typography throughout and the open nature of the site – although I’m not convinced by the cheeky head shots.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/bestpicks-29.jpg" width="510" /&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;a href="http://designshack.net/design/adrian-baxter"&gt;Adrian Baxter&lt;/a&gt;&lt;/h2&gt;
An immediately engaging personal portfolio for a web developer that captures your imagination. I love the comic book style and the unique illustrative feel of the whole site. It really makes an impact.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/bestpicks-30.jpg" width="510" /&gt;&lt;/div&gt;
&lt;h2&gt;
Submit Your Site!&lt;/h2&gt;
Our web design gallery is not only a great source of inspiration, it’s also an awesome way to get your site noticed. Every site in our gallery is handpicked by our gallery guru Joel Bankhead (who also wrote all of the site descriptions above) and he can’t wait to see what you’ve come up with lately. &lt;br /&gt;
To submit your site to our gallery, check out our &lt;a href="http://designshack.net/submit"&gt;submission page&lt;/a&gt;. In the mean time, browse through the &lt;a href="http://designshack.net/gallery"&gt;other designs&lt;/a&gt; and give your creative brain a boost. &lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</description><link>http://kidaworld.blogspot.com/2012/11/the-30-best-web-design-gallery-picks-of.html</link><author>noreply@blogger.com (UXAWY)</author><thr:total>5</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8363405111659754159.post-1267360372829592971</guid><pubDate>Mon, 12 Nov 2012 12:33:00 +0000</pubDate><atom:updated>2012-11-12T04:33:21.337-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">css</category><category domain="http://www.blogger.com/atom/ns#">slider</category><title>Build an Awesome CSS Slider With Four Overlays</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/panelslider-0.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;Today’s project is a fun one. We’re going to build a standard CSS image slider with a twist: the visible image area will be divided into four distinct sections, each with a hidden message that is revealed when the user hovers over it.&lt;/p&gt;
&lt;p&gt;The ultimate effect is pretty awesome and I think you’re going to like it a lot. Along the way we’ll play with some animations, transitions, positioning contexts and a lot more. Let’s dive in and get started!&lt;/p&gt;
&lt;p&gt;&lt;span id="more-33777"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Sneak Peek&lt;/h2&gt;
&lt;p&gt;If you’d like to sneak a look at the finished product before we build it, check out the link below.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Demo: &lt;/strong&gt; &lt;a href="http://designshack.net/tutorialexamples/PanelSlider/index.html"&gt;Click here&lt;/a&gt; to launch the live demo. &lt;/p&gt;
&lt;h3&gt;Props to “How Do You Roll”&lt;/h3&gt;
&lt;p&gt;My inspiration for today’s tutorial comes from the sushi place where I plan on eating dinner tonight. I stopped by their website for directions and instantly wanted to see if I could replicate the effect on the home page. The restaurant is called &lt;a href="http://howdoyouroll.com/index.php"&gt;How Do You Roll&lt;/a&gt;, feel free to go check out their awesome site. &lt;/p&gt;
&lt;h2&gt;HTML&lt;/h2&gt;
&lt;p&gt;Let’s get this project started! As always, the first thing we want to do is outline our basic HTML structure. This slider is comprised of one big image area that’s split into four vertical columns. Consequently, we require one wrapper div with a “slider” class and four inner divs, each with a “panel” class. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #fff; -webkit-box-shadow: 3px 3px 3px #ccc; -moz-box-shadow: 3px 3px 3px #ccc; box-shadow: 3px 3px 3px #ccc;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="html4strict" style="font-family:monospace;"&gt;&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt; &lt;span style="color: #000066;"&gt;class&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"slider"&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt; &lt;span style="color: #000066;"&gt;class&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"panel"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt; &lt;span style="color: #000066;"&gt;class&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"panel"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt; &lt;span style="color: #000066;"&gt;class&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"panel"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt; &lt;span style="color: #000066;"&gt;class&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"panel"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;This is our basic structure, but we need to flesh it out a little with some content. I want each panel to serve as both a source of information and a link. So the user should be able to hover, see what the panel is all about, and click to proceed to a different page. To accomplish this, we’ll toss in an h2 and a paragraph and wrap the whole dang thing in an anchor. It seems like a weird way to use an anchor, but it’s perfectly valid in HTML5. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #fff; -webkit-box-shadow: 3px 3px 3px #ccc; -moz-box-shadow: 3px 3px 3px #ccc; box-shadow: 3px 3px 3px #ccc;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="html4strict" style="font-family:monospace;"&gt;&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt; &lt;span style="color: #000066;"&gt;class&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"panel"&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;h2&lt;/span&gt;&amp;gt;&lt;/span&gt;One&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;h2&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;Lorem ipsum dolor sit amet...&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;Now that we have an overall structure and the individual panel formation figured out, we put it all together and we have all the HTML that we’ll need for this project. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #fff; -webkit-box-shadow: 3px 3px 3px #ccc; -moz-box-shadow: 3px 3px 3px #ccc; box-shadow: 3px 3px 3px #ccc;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="html4strict" style="font-family:monospace;"&gt;&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt; &lt;span style="color: #000066;"&gt;class&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"slider"&lt;/span&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt; &lt;span style="color: #000066;"&gt;class&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"panel"&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;h2&lt;/span&gt;&amp;gt;&lt;/span&gt;One&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;h2&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;Lorem ipsum dolor sit amet...&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt; &lt;span style="color: #000066;"&gt;class&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"panel"&lt;/span&gt;&amp;gt;&lt;/span&gt;
       &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;h2&lt;/span&gt;&amp;gt;&lt;/span&gt;Two&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;h2&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;Lorem ipsum dolor sit amet...&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt; &lt;span style="color: #000066;"&gt;class&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"panel"&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;h2&lt;/span&gt;&amp;gt;&lt;/span&gt;Three&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;h2&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;Lorem ipsum dolor sit amet...&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt; &lt;span style="color: #000066;"&gt;class&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"panel"&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;h2&lt;/span&gt;&amp;gt;&lt;/span&gt;Four&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;h2&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;Lorem ipsum dolor sit amet...&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h2&gt;Starter Styles&lt;/h2&gt;
&lt;p&gt;To kick off our CSS, let’s get some of the generic stuff out of the way. First I threw in a little universal reset to get us all on the same page. Replace this with a better reset or normalization technique if you’re using this in a real project.&lt;/p&gt;
&lt;p&gt;I also added a background texture and reset the link styles for the slider, just for good measure. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #fff; -webkit-box-shadow: 3px 3px 3px #ccc; -moz-box-shadow: 3px 3px 3px #ccc; box-shadow: 3px 3px 3px #ccc;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;&lt;span style="color: #00AA00;"&gt;*&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;padding&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
body &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#eee&lt;/span&gt; &lt;span style="color: #993333;"&gt;url&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;subtlenet2.png&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt; &lt;span style="color: #808080; font-style: italic;"&gt;/*http://subtlepatterns.com/?p=1341*/&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #6666ff;"&gt;.slider&lt;/span&gt; a &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;text-decoration&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;none&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;color&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; fff&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h2&gt;Slider CSS&lt;/h2&gt;
&lt;p&gt;Now it’s time to style the slider div. Basically, we want to set a specific size for it, then give it a background image  that is the same size. Then we’ll add some margins to center it, some border-radius to round the corners and a box-shadow to set it apart from the background a bit.&lt;/p&gt;
&lt;p&gt;The big thing that you might miss in this chunk is the overflow:auto line. This is important because we want our panels to take on the rounded corner effect that we’re applying to the parent slider div. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #fff; -webkit-box-shadow: 3px 3px 3px #ccc; -moz-box-shadow: 3px 3px 3px #ccc; box-shadow: 3px 3px 3px #ccc;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;&lt;span style="color: #6666ff;"&gt;.slider&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;height&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;400px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;800px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;url&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;http&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt;//lorempixum.com/&lt;span style="color: #cc66cc;"&gt;800&lt;/span&gt;/&lt;span style="color: #cc66cc;"&gt;400&lt;/span&gt;/sports/&lt;span style="color: #cc66cc;"&gt;8&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;border-radius&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;20px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;overflow&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;hidden&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;50px&lt;/span&gt; &lt;span style="color: #993333;"&gt;auto&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&amp;nbsp;
  -webkit-box-shadow&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;2px&lt;/span&gt; &lt;span style="color: #933;"&gt;2px&lt;/span&gt; &lt;span style="color: #933;"&gt;8px&lt;/span&gt; rgba&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.5&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  box-shadow&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;2px&lt;/span&gt; &lt;span style="color: #933;"&gt;2px&lt;/span&gt; &lt;span style="color: #933;"&gt;8px&lt;/span&gt; rgba&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.5&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h3&gt;Progress Check&lt;/h3&gt;
&lt;p&gt;At this point, you should have a big image with rounded corners and a drop shadow along with a bunch of ugly, messy text, which we’ll fix in the next step!&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/panelslider-1.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;h2&gt;Panel CSS&lt;/h2&gt;
&lt;p&gt;Our slider container is looking sharp, now it’s time to put the panels in order. Given that our container is 800px by 400px, each panel needs to be set at 200px by 400px, meaning that each panel will occupy the full height and one quarter of the width. From there we just need to float them to the left and they’ll line up just like we want.&lt;/p&gt;
&lt;p&gt;The interesting part here is that I’ve set the color and background to transparent, which makes the panels invisible. This is because we only want them to show up on hover. The default state should indeed be hidden.&lt;/p&gt;
&lt;p&gt;The final step here is to add the CSS for a transition so that the panels fade into place when the user hovers. Notice that I actually declared two separate transitions separated by a comma (one for the color and one for the background-color).&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #fff; -webkit-box-shadow: 3px 3px 3px #ccc; -moz-box-shadow: 3px 3px 3px #ccc; box-shadow: 3px 3px 3px #ccc;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;&lt;span style="color: #6666ff;"&gt;.panel&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;200px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;height&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;400px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;transparent&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;color&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;transparent&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;float&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;left&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;overflow&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;hidden&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&amp;nbsp;
  -webkit-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;color&lt;/span&gt; 0.5s ease&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;background-color&lt;/span&gt; 0.5s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  -moz-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;color&lt;/span&gt; 0.5s ease&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;background-color&lt;/span&gt; 0.5s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  -o-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;color&lt;/span&gt; 0.5s ease&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;background-color&lt;/span&gt; 0.5s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  -ms-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;color&lt;/span&gt; 0.5s ease&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;background-color&lt;/span&gt; 0.5s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;color&lt;/span&gt; 0.5s ease&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;background-color&lt;/span&gt; 0.5s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h3&gt;Panel Typography&lt;/h3&gt;
&lt;p&gt;Next, it’s time to get the typography in order. Admittedly, I didn’t do this with the panels set to invisible but instead gave the elements a color, styled them and then reverted them back to hidden.&lt;/p&gt;
&lt;p&gt;Make sure you style both the paragraph and the h2. I made the header big, bold and moved down from the top quite a bit. Both the header and the paragraph also get a set width of 150px, which makes it easy to center them in the space despite the left alignment. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #fff; -webkit-box-shadow: 3px 3px 3px #ccc; -moz-box-shadow: 3px 3px 3px #ccc; box-shadow: 3px 3px 3px #ccc;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;&lt;span style="color: #6666ff;"&gt;.panel&lt;/span&gt; h2 &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;bold&lt;/span&gt; &lt;span style="color: #933;"&gt;35px&lt;/span&gt;/&lt;span style="color: #cc66cc;"&gt;1.5&lt;/span&gt; Helvetica&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; Verdana&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #993333;"&gt;sans-serif&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;150px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;55px&lt;/span&gt; &lt;span style="color: #993333;"&gt;auto&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt; &lt;span style="color: #993333;"&gt;auto&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #6666ff;"&gt;.panel&lt;/span&gt; p &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;200&lt;/span&gt; &lt;span style="color: #933;"&gt;11px&lt;/span&gt;/&lt;span style="color: #cc66cc;"&gt;1.5&lt;/span&gt; Helvetica&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; Verdana&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #993333;"&gt;sans-serif&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;150px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt; &lt;span style="color: #993333;"&gt;auto&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h3&gt;Panel Hover&lt;/h3&gt;
&lt;p&gt;When the user hovers over one of our panels, I want it to become visible again. I do this by giving the background and text a color. I set the background to black, with a little transparency to let the underlying image show through, and the paragraph to white.&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #fff; -webkit-box-shadow: 3px 3px 3px #ccc; -moz-box-shadow: 3px 3px 3px #ccc; box-shadow: 3px 3px 3px #ccc;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;&lt;span style="color: #6666ff;"&gt;.panel&lt;/span&gt;&lt;span style="color: #3333ff;"&gt;:hover &lt;/span&gt;&lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#000&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt; &lt;span style="color: #808080; font-style: italic;"&gt;/*for old browsers*/&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; rgba&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.8&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;color&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#fff&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h3&gt;Progress Check&lt;/h3&gt;
&lt;p&gt;You should now have fully functioning panels! If this is all you were looking to achieve, you can stop here, no further work necessary. Even without the next step, it’s still a great effect.&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/panelslider-2.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;h2&gt;Animate The Background&lt;/h2&gt;
&lt;p&gt;This last step is completely optional, and mind you it won’t work at all on older browsers, but the original inspiration for this piece had an image slider in the background. We have a static image back there and we’re now going to go back and animate it.&lt;/p&gt;
&lt;p&gt;To do this, we need to go back to the slider declaration block and add a few things. For starters, turn your single background into four background images, with the last being the same as the first so everything loops nicely.&lt;/p&gt;
&lt;p&gt;Next, make sure that you set the background images to have no repeat and copy the position values shown below, which will line up the images in one long horizontal row. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #fff; -webkit-box-shadow: 3px 3px 3px #ccc; -moz-box-shadow: 3px 3px 3px #ccc; box-shadow: 3px 3px 3px #ccc;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;&lt;span style="color: #6666ff;"&gt;.slider&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;height&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;400px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;800px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;url&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;http&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt;//lorempixum.com/&lt;span style="color: #cc66cc;"&gt;800&lt;/span&gt;/&lt;span style="color: #cc66cc;"&gt;400&lt;/span&gt;/sports/&lt;span style="color: #cc66cc;"&gt;8&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #993333;"&gt;url&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;http&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt;//lorempixum.com/&lt;span style="color: #cc66cc;"&gt;800&lt;/span&gt;/&lt;span style="color: #cc66cc;"&gt;400&lt;/span&gt;/sports/&lt;span style="color: #cc66cc;"&gt;2&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #993333;"&gt;url&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;http&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt;//lorempixum.com/&lt;span style="color: #cc66cc;"&gt;800&lt;/span&gt;/&lt;span style="color: #cc66cc;"&gt;400&lt;/span&gt;/sports/&lt;span style="color: #cc66cc;"&gt;3&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #993333;"&gt;url&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;http&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt;//lorempixum.com/&lt;span style="color: #cc66cc;"&gt;800&lt;/span&gt;/&lt;span style="color: #cc66cc;"&gt;400&lt;/span&gt;/sports/&lt;span style="color: #cc66cc;"&gt;8&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;1600px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;3200px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background-repeat&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;no-repeat&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;border-radius&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;20px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;overflow&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;hidden&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;50px&lt;/span&gt; &lt;span style="color: #993333;"&gt;auto&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&amp;nbsp;
  -webkit-animation&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; slider 15s infinite&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  -moz-animation&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; slider 15s infinite&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  -ms-animation&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; slider 15s infinite&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  -o-animation&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; slider 15s infinite&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  animation&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; slider 15s infinite&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&amp;nbsp;
  -webkit-box-shadow&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;2px&lt;/span&gt; &lt;span style="color: #933;"&gt;2px&lt;/span&gt; &lt;span style="color: #933;"&gt;8px&lt;/span&gt; rgba&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.5&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  box-shadow&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;2px&lt;/span&gt; &lt;span style="color: #933;"&gt;2px&lt;/span&gt; &lt;span style="color: #933;"&gt;8px&lt;/span&gt; rgba&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.5&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;As you can see, I also threw in the animation CSS. First we name our animation (slider), then set the duration and  number of iterations. To finish off the entire project, we need to define how that animation will work with keyframes. The code for this is confusing so let’s outline each step.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Step One: First background image visible&lt;/li&gt;
&lt;li&gt;Step Two: Move everything to the left 800px, second background image visible&lt;/li&gt;
&lt;li&gt;Step Three: Move everything to the left 800px, third background image visible&lt;/li&gt;
&lt;li&gt;Step Four: Move everything to the left 800px, fourth background image visible (which is the same as the first image)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To split this up, we need to start at 0% and end at 100%, which leaves two steps in between. The easy solution is to make steps two and three at 33% and 66%. The math isn’t perfect, but it’s close enough. Notice how the images move over each time, bringing the next background into view.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;0%: background-position: 0px 0px, 800px 0px, 1600px 0px, 3200px 0;&lt;/li&gt;
&lt;li&gt;33% background-position: -800px 0px, 0px 0px, 800px 0px, 1600px 0;&lt;/li&gt;
&lt;li&gt;66%: background-position: -1600px 0px, -800px 0px, 0px 0px, 800px 0;&lt;/li&gt;
&lt;li&gt;100%: background-position: -3200px 0px, -1600px 0px, -800px 0px, 0px 0;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now, this alone is going to make the slideshow constantly move, which we don’t want. What we want instead is for each slide to stay still for a few seconds before advancing. This is accomplished by adding in a few redundant steps so that the slides don’t advance until 10% before the next step. &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;0%: background-position: 0px 0px, 800px 0px, 1600px 0px, 3200px 0;&lt;/li&gt;
&lt;li&gt;23%: background-position: 0px 0px, 800px 0px, 1600px 0px, 3200px 0;&lt;/li&gt;
&lt;li&gt;33% background-position: -800px 0px, 0px 0px, 800px 0px, 1600px 0;&lt;/li&gt;
&lt;li&gt;56% background-position: -800px 0px, 0px 0px, 800px 0px, 1600px 0;&lt;/li&gt;
&lt;li&gt;66%: background-position: -1600px 0px, -800px 0px, 0px 0px, 800px 0;&lt;/li&gt;
&lt;li&gt;90%: background-position: -1600px 0px, -800px 0px, 0px 0px, 800px 0;&lt;/li&gt;
&lt;li&gt;100%: background-position: -3200px 0px, -1600px 0px, -800px 0px, 0px 0;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now that we’ve got the processed outlined, we can make it happen with CSS. This requires a ton of code for the various browsers but it’s the only way we can pull it off so we’ll just have to live with it. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #fff; -webkit-box-shadow: 3px 3px 3px #ccc; -moz-box-shadow: 3px 3px 3px #ccc; box-shadow: 3px 3px 3px #ccc;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;&lt;span style="color: #a1a100;"&gt;@keyframes "slider" {&lt;/span&gt;
 &lt;span style="color: #933;"&gt;0%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
    &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;1600px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;3200px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
 &lt;span style="color: #933;"&gt;23%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
    &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;1600px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;3200px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
 &lt;span style="color: #933;"&gt;33%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
    &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;-800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;1600px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
 &lt;span style="color: #933;"&gt;56%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
    &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;-800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;1600px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
 &lt;span style="color: #933;"&gt;66%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
    &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;-1600px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;-800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;800px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
 &lt;span style="color: #933;"&gt;90%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
    &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;-1600px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;-800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;800px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
 &lt;span style="color: #933;"&gt;100%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
    &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;-3200px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;-1600px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;-800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #a1a100;"&gt;@-moz-keyframes slider {&lt;/span&gt;
 &lt;span style="color: #933;"&gt;0%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
   &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;1600px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;3200px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
 &lt;span style="color: #933;"&gt;20%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
   &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;1600px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;3200px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
 &lt;span style="color: #933;"&gt;33%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
   &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;-800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;1600px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
 &lt;span style="color: #933;"&gt;56%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
   &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;-800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;1600px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
 &lt;span style="color: #933;"&gt;66%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
   &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;-1600px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;-800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;800px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
 &lt;span style="color: #933;"&gt;90%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
   &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;-1600px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;-800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;800px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
 &lt;span style="color: #933;"&gt;100%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
   &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;-3200px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;-1600px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;-800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #a1a100;"&gt;@-webkit-keyframes "slider" {&lt;/span&gt;
 &lt;span style="color: #933;"&gt;0%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
   &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;1600px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;3200px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
 &lt;span style="color: #933;"&gt;20%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
   &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;1600px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;3200px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
 &lt;span style="color: #933;"&gt;33%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
   &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;-800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;1600px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
 &lt;span style="color: #933;"&gt;56%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
   &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;-800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;1600px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
 &lt;span style="color: #933;"&gt;66%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
   &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;-1600px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;-800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;800px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
 &lt;span style="color: #933;"&gt;90%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
   &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;-1600px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;-800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;800px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
 &lt;span style="color: #933;"&gt;100%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
   &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;-3200px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;-1600px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;-800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #a1a100;"&gt;@-ms-keyframes "slider" {&lt;/span&gt;
 &lt;span style="color: #933;"&gt;0%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
   &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;1600px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;3200px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
 &lt;span style="color: #933;"&gt;20%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
   &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;1600px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;3200px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
 &lt;span style="color: #933;"&gt;33%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
   &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;-800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;1600px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
 &lt;span style="color: #933;"&gt;56%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
   &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;-800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;1600px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
 &lt;span style="color: #933;"&gt;66%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
   &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;-1600px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;-800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;800px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
 &lt;span style="color: #933;"&gt;90%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
   &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;-1600px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;-800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;800px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
 &lt;span style="color: #933;"&gt;100%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
   &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;-3200px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;-1600px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;-800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #a1a100;"&gt;@-o-keyframes "slider" {&lt;/span&gt;
 &lt;span style="color: #933;"&gt;0%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
   &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;1600px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;3200px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
 &lt;span style="color: #933;"&gt;20%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
   &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;1600px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;3200px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
 &lt;span style="color: #933;"&gt;33%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
   &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;-800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;1600px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
 &lt;span style="color: #933;"&gt;56%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
   &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;-800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;1600px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
 &lt;span style="color: #933;"&gt;66%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
   &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;-1600px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;-800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;800px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
 &lt;span style="color: #933;"&gt;90%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
   &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;-1600px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;-800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;800px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
 &lt;span style="color: #933;"&gt;100%&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
   &lt;span style="color: #000000; font-weight: bold;"&gt;background-position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;-3200px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;-1600px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;-800px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
 &lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h2&gt;See It In Action!&lt;/h2&gt;
&lt;p&gt;We’re all finished! Now it’s time to have one last look at the demo.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Demo: &lt;/strong&gt; &lt;a href="http://designshack.net/tutorialexamples/PanelSlider/index.html"&gt;Click here&lt;/a&gt; to launch the live demo. &lt;/p&gt;
&lt;div class="tutorial image"&gt;&lt;a href="http://designshack.net/tutorialexamples/PanelSlider/index.html"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/panelslider-0.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;I hope you enjoyed building this fun little slider as much as I did. I love how it represents a slight tweak on an old idea. It’s quite practical and really allows you to take your sliders one step further.&lt;/p&gt;
&lt;p&gt;Leave a comment below and let us know what you think. Have you seen a slider split up like this before? How would you make it better?&lt;/p&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://kidaworld.blogspot.com/2012/11/build-awesome-css-slider-with-four.html</link><author>noreply@blogger.com (UXAWY)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8363405111659754159.post-2949541231457326321</guid><pubDate>Mon, 12 Nov 2012 12:32:00 +0000</pubDate><atom:updated>2012-11-12T04:32:30.770-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">css</category><title>5 Simple and Practical CSS List Styles You Can Copy and Paste</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/copypastelist-3.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;Who doesn’t love a good list? We use them constantly in our markup for a variety of different situations. Today we’re going to take a look at a few simple and practical examples that you can steal and use in your own work.&lt;/p&gt;
&lt;p&gt;We start off with a fun animated vertical list, then style up a list with thumbnails and text, another with just images and finally an ordered list where the numbers are styled differently than the rest of the type. There’s a ton of great things to learn here so let’s jump in!&lt;/p&gt;
&lt;p&gt;&lt;span id="more-33727"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;HelvetiList&lt;/h2&gt;
&lt;p&gt;For our first list, we’re going to start with a simple, minimal but super attractive design that’s heavily dependent on the beauty of the typography. We’ll make use of some thin Helvetica styles and toss in a smooth animation on hover. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Demo:&lt;/strong&gt; Check out the demo and code on &lt;a href="http://codepen.io/secondfret/pen/6/3"&gt;CodePen&lt;/a&gt;.&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/copypastelist-2.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;h3&gt;HTML&lt;/h3&gt;
&lt;p&gt;Our markup here is dead simple. Create a div (you’ll probably want a class or ID in a live project), then toss in a header and an unordered list with five list items. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #fff; -webkit-box-shadow: 3px 3px 3px #ccc; -moz-box-shadow: 3px 3px 3px #ccc; box-shadow: 3px 3px 3px #ccc;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="html4strict" style="font-family:monospace;"&gt;&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;h2&lt;/span&gt;&amp;gt;&lt;/span&gt;HelvetiList&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;h2&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;ul&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&lt;/span&gt;Zurich&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&lt;/span&gt;Geneva&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&lt;/span&gt;Winterthur&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&lt;/span&gt;Lausanne&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&lt;/span&gt;Lucerne&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;ul&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h3&gt;CSS&lt;/h3&gt;
&lt;p&gt;As we saw in the screenshot above, the list items use very thin type, subtle separators and a hover state that enlarges the font. To start, give the div a width and set your generic h2 styles. &lt;/p&gt;
&lt;p&gt;Next, apply a list-style-type of none to ditch the bullets and reset any margins or padding that may be present. For the actual list items, I applied a slight bottom border, which provides that little divider. I did use the last-child selector, but it’s really no big deal if there’s a browser that doesn’t recognize that and decides to throw an extra border on the bottom. &lt;/p&gt;
&lt;p&gt;Also notice that both of the times I set the font, I used CSS shorthand and applied different weights. To finish off, I applied some link styles and set the transition to enlarge the font and change the background color on hover. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #fff; -webkit-box-shadow: 3px 3px 3px #ccc; -moz-box-shadow: 3px 3px 3px #ccc; box-shadow: 3px 3px 3px #ccc;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;div &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;200px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
h2 &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;400&lt;/span&gt; &lt;span style="color: #933;"&gt;40px&lt;/span&gt;/&lt;span style="color: #cc66cc;"&gt;1.5&lt;/span&gt; Helvetica&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; Verdana&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #993333;"&gt;sans-serif&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;padding&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
ul &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;list-style-type&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;none&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;padding&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
li &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;200&lt;/span&gt; &lt;span style="color: #933;"&gt;20px&lt;/span&gt;/&lt;span style="color: #cc66cc;"&gt;1.5&lt;/span&gt; Helvetica&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; Verdana&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #993333;"&gt;sans-serif&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;border-bottom&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;1px&lt;/span&gt; &lt;span style="color: #993333;"&gt;solid&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#ccc&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
li&lt;span style="color: #3333ff;"&gt;:last-child &lt;/span&gt;&lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;border&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;none&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
li a &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;text-decoration&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;none&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;color&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#000&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;display&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;block&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;200px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&amp;nbsp;
  -webkit-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;font-size&lt;/span&gt; 0.3s ease&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;background-color&lt;/span&gt; 0.3s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  -moz-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;font-size&lt;/span&gt; 0.3s ease&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;background-color&lt;/span&gt; 0.3s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  -o-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;font-size&lt;/span&gt; 0.3s ease&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;background-color&lt;/span&gt; 0.3s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  -ms-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;font-size&lt;/span&gt; 0.3s ease&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;background-color&lt;/span&gt; 0.3s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;font-size&lt;/span&gt; 0.3s ease&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;background-color&lt;/span&gt; 0.3s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
li a&lt;span style="color: #3333ff;"&gt;:hover &lt;/span&gt;&lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font-size&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;30px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#f6f6f6&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h2&gt;Thumbnail List&lt;/h2&gt;
&lt;p&gt;One really common format that you’ll see for lists is your basic “thumbnail and text” setup, which is a great way to add some nice visual interest to an otherwise boring list of paragraphs. &lt;/p&gt;
&lt;p&gt;This is an extremely versatile list style that you can use on any number of projects. Let’s see how it works.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Demo:&lt;/strong&gt; Check out the demo and code on &lt;a href="http://codepen.io/secondfret/pen/7/2"&gt;CodePen&lt;/a&gt;.&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/copypastelist-3.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;h3&gt;HTML&lt;/h3&gt;
&lt;p&gt;The HTML on this one is a little more complicated. Each list item needs to have three children: an image, a headline and a paragraph. The images that I’m using are 100px by 100px so keep that in mind if you want to customize this to be a different size. Overall, this is all still really simple markup that shouldn’t trip you up in the least.&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #fff; -webkit-box-shadow: 3px 3px 3px #ccc; -moz-box-shadow: 3px 3px 3px #ccc; box-shadow: 3px 3px 3px #ccc;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="html4strict" style="font-family:monospace;"&gt;&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;ul&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://lorempixum.com/100/100/nature/1"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;h3&lt;/span&gt;&amp;gt;&lt;/span&gt;Headline&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;h3&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;Lorem ipsum dolor sit amet...&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://lorempixum.com/100/100/nature/2"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;h3&lt;/span&gt;&amp;gt;&lt;/span&gt;Headline&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;h3&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;Lorem ipsum dolor sit amet...&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://lorempixum.com/100/100/nature/3"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;h3&lt;/span&gt;&amp;gt;&lt;/span&gt;Headline&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;h3&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;Lorem ipsum dolor sit amet...&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://lorempixum.com/100/100/nature/4"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;h3&lt;/span&gt;&amp;gt;&lt;/span&gt;Headline&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;h3&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;Lorem ipsum dolor sit amet...&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;ul&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h3&gt;CSS&lt;/h3&gt;
&lt;p&gt;This one surprisingly doesn’t take too much code to pull off. Once again, we’re clearing our list styles and setting some typography related CSS. The thing that you have to understand is that you need to float your images to the left so that the paragraphs appear next to them.&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #fff; -webkit-box-shadow: 3px 3px 3px #ccc; -moz-box-shadow: 3px 3px 3px #ccc; box-shadow: 3px 3px 3px #ccc;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;&lt;span style="color: #00AA00;"&gt;*&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;padding&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
div &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;20px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
ul &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;list-style-type&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;none&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;500px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
h3 &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;bold&lt;/span&gt; &lt;span style="color: #933;"&gt;20px&lt;/span&gt;/&lt;span style="color: #cc66cc;"&gt;1.5&lt;/span&gt; Helvetica&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; Verdana&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #993333;"&gt;sans-serif&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
li img &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;float&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;left&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt; &lt;span style="color: #933;"&gt;15px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
li p &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;200&lt;/span&gt; &lt;span style="color: #933;"&gt;12px&lt;/span&gt;/&lt;span style="color: #cc66cc;"&gt;1.5&lt;/span&gt; Georgia&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; Times New Roman&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #993333;"&gt;serif&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
li &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;padding&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;10px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;overflow&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;auto&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
li&lt;span style="color: #3333ff;"&gt;:hover &lt;/span&gt;&lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#eee&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;cursor&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;pointer&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h2&gt;Standard Thumbnail Grid&lt;/h2&gt;
&lt;p&gt;If we’re talking unordered lists, we should throw in at least one image grid, which are almost always handled with lists. We won’t do anything too fancy, it’ll just be helpful for you to keep a form of this code on hand for quick insertion.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Demo:&lt;/strong&gt; Check out the demo and code on &lt;a href="http://codepen.io/secondfret/pen/8/5"&gt;CodePen&lt;/a&gt;.&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/copypastelist-4.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;h3&gt;HTML&lt;/h3&gt;
&lt;p&gt;The markup for has the basic structure of &lt;em&gt;list-item&amp;gt;anchor&amp;gt;image&lt;/em&gt;. If you’re not used to seeing this code, it might seem pretty strange to use a list for this, but really that’s exactly what you’re creating: a big list of images. The fact that they’re arranged into a grid doesn’t negate the idea that’s it’s just a big ‘ol list at heart. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #fff; -webkit-box-shadow: 3px 3px 3px #ccc; -moz-box-shadow: 3px 3px 3px #ccc; box-shadow: 3px 3px 3px #ccc;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="html4strict" style="font-family:monospace;"&gt;&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;ul&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/150x150"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/150x150"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/150x150"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/150x150"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/150x150"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/150x150"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/150x150"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/150x150"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/150x150"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/150x150"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/150x150"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/150x150"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/150x150"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/150x150"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/150x150"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;ul&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h3&gt;CSS&lt;/h3&gt;
&lt;p&gt;For this example, the basic structure is that you toss some margins on each of your list items and float them left. I used the “overflow:auto” trick to clear the float, set up a dark background and tossed a border on the images. &lt;/p&gt;
&lt;p&gt;To make the demo slightly interesting, I added a hover effect that slowly applies a glow. This is of course completely optional and isn’t something you’d apply on every project. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #fff; -webkit-box-shadow: 3px 3px 3px #ccc; -moz-box-shadow: 3px 3px 3px #ccc; box-shadow: 3px 3px 3px #ccc;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;&lt;span style="color: #00AA00;"&gt;*&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;padding&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
body &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#333&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
div &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;900px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt; &lt;span style="color: #993333;"&gt;auto&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;overflow&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;auto&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
ul &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;list-style-type&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;none&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
li img &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;float&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;left&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;10px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;border&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;5px&lt;/span&gt; &lt;span style="color: #993333;"&gt;solid&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#fff&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&amp;nbsp;
  -webkit-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; box-shadow 0.5s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  -moz-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; box-shadow 0.5s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  -o-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; box-shadow 0.5s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  -ms-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; box-shadow 0.5s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; box-shadow 0.5s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
li img&lt;span style="color: #3333ff;"&gt;:hover &lt;/span&gt;&lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  -webkit-box-shadow&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;7px&lt;/span&gt; rgba&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;255&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;255&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;255&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.9&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  box-shadow&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;7px&lt;/span&gt; rgba&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;255&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;255&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;255&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.9&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h2&gt;Horizontal Menu&lt;/h2&gt;
&lt;p&gt;Another thing that developers use lists for is horizontal navigation menus. As a new developer, the code for this trick was something I Googled constantly so be sure to bookmark it or toss it into your snippets saver. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Demo:&lt;/strong&gt; Check out the demo and code on &lt;a href="http://codepen.io/secondfret/pen/9/1"&gt;CodePen&lt;/a&gt;.&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/copypastelist-5.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;h3&gt;HTML&lt;/h3&gt;
&lt;p&gt;With the thumbnail grid above, we already learned how to float list items so that they appear next to each other so here we’ll use the same technique, only with fewer items. Notice that I’ve tossed in an “active” class, which is a fairly standard practice that we’ll use to tell the user which page they’re currently on.&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #fff; -webkit-box-shadow: 3px 3px 3px #ccc; -moz-box-shadow: 3px 3px 3px #ccc; box-shadow: 3px 3px 3px #ccc;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="html4strict" style="font-family:monospace;"&gt;&lt;span style="color: #009900;"&gt;&amp;lt;nav&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;ul&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&lt;/span&gt;Home&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt; &lt;span style="color: #000066;"&gt;class&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"active"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&lt;/span&gt;About&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&lt;/span&gt;Portfolio&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&lt;/span&gt;Contact&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;ul&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;nav&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h3&gt;CSS&lt;/h3&gt;
&lt;p&gt;Here we floated our list items to the left, put a border only on the right side, strip the default link styles and setup my own, and then styled both the hover and active states. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #fff; -webkit-box-shadow: 3px 3px 3px #ccc; -moz-box-shadow: 3px 3px 3px #ccc; box-shadow: 3px 3px 3px #ccc;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;&lt;span style="color: #00AA00;"&gt;*&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;padding&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
nav &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;50px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
ul &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;overflow&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;auto&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;list-style-type&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;none&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
li &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;height&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;25px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;float&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;left&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin-right&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;border-right&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;1px&lt;/span&gt; &lt;span style="color: #993333;"&gt;solid&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#aaa&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;padding&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt; &lt;span style="color: #933;"&gt;20px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
li&lt;span style="color: #3333ff;"&gt;:last-child &lt;/span&gt;&lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;border-right&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;none&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
li a &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;text-decoration&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;none&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;color&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#ccc&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;25px&lt;/span&gt;/&lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; Helvetica&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; Verdana&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #993333;"&gt;sans-serif&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;text-transform&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;uppercase&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&amp;nbsp;
  -webkit-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.5s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  -moz-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.5s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  -o-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.5s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  -ms-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.5s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.5s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
li a&lt;span style="color: #3333ff;"&gt;:hover &lt;/span&gt;&lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;color&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#666&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
li&lt;span style="color: #6666ff;"&gt;.active&lt;/span&gt; a &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font-weight&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;bold&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;color&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#333&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h2&gt;Big Numbers Ordered List&lt;/h2&gt;
&lt;p&gt;Let’s not forget that all lists aren’t unordered lists! There’s definitely a lot of useful applications for ordered lists. One really tricky thing to do with ordered lists is style the numbers differently than the other text. Let’s see how this works.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Demo:&lt;/strong&gt; Check out the demo and code on &lt;a href="http://codepen.io/secondfret/pen/10/3"&gt;CodePen&lt;/a&gt;.&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/copypastelist-761.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;h3&gt;HTML&lt;/h3&gt;
&lt;p&gt;Now, how I built this is going to be super controversial. As you can see, I’m actually manually putting in the numbers despite the fact that HTML will actually do this automatically for you. There’s a good reason for this though.&lt;/p&gt;
&lt;p&gt;To start this idea, I threw a paragraph into the list items, then coded the li type and the li&amp;gt;p type in different ways. However, trying to get everything to line up properly with this method was a total nightmare. Ultimately, to fix it the CSS was so messy and nasty that I abandoned it completely in favor of this simpler method which actually allows for clear, simple CSS. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #fff; -webkit-box-shadow: 3px 3px 3px #ccc; -moz-box-shadow: 3px 3px 3px #ccc; box-shadow: 3px 3px 3px #ccc;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="html4strict" style="font-family:monospace;"&gt;&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;ol&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;span&lt;/span&gt;&amp;gt;&lt;/span&gt;1.&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;span&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent euismod ultrices ante, ac laoreet nulla vestibulum adipiscing. Nam quis justo in augue auctor imperdiet. Curabitur aliquet orci sit amet est posuere consectetur. Fusce nec leo ut massa viverra venenatis. Nam accumsan libero a elit aliquet quis ullamcorper arcu tincidunt. Praesent purus turpis, consectetur quis congue vel, pulvinar at lorem. Vivamus varius condimentum dolor, quis ultricies ipsum porta quis. &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;span&lt;/span&gt;&amp;gt;&lt;/span&gt;2.&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;span&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent euismod ultrices ante, ac laoreet nulla vestibulum adipiscing. Nam quis justo in augue auctor imperdiet. Curabitur aliquet orci sit amet est posuere consectetur.  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;span&lt;/span&gt;&amp;gt;&lt;/span&gt;3.&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;span&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent euismod ultrices ante, ac laoreet nulla vestibulum adipiscing. Nam quis justo in augue auctor imperdiet. Curabitur aliquet orci sit amet est posuere consectetur.  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;ol&lt;/span&gt;&amp;gt;&lt;/span&gt; 
&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h3&gt;CSS&lt;/h3&gt;
&lt;p&gt;As you can see in the code below, what I did here was ditch the default numbers and then set my spans to absolute so I could push them over to the left of the paragraphs, which in turn required some extra padding on the paragraphs. It may not be the prettiest solution code-wise, but it’s the briefest and most straightforward way that I could come up with to do it without bizarre positioning bugs. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #fff; -webkit-box-shadow: 3px 3px 3px #ccc; -moz-box-shadow: 3px 3px 3px #ccc; box-shadow: 3px 3px 3px #ccc;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;div &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;500px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;10px&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
ol &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;color&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#ccc&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;list-style-type&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;none&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
ol li &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;relative&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;bold&lt;/span&gt; &lt;span style="color: #993333;"&gt;italic&lt;/span&gt; &lt;span style="color: #933;"&gt;45px&lt;/span&gt;/&lt;span style="color: #cc66cc;"&gt;1.5&lt;/span&gt; Helvetica&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; Verdana&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #993333;"&gt;sans-serif&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin-bottom&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;20px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
li p &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;12px&lt;/span&gt;/&lt;span style="color: #cc66cc;"&gt;1.5&lt;/span&gt; Helvetica&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #993333;"&gt;sans-serif&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;padding-left&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;60px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;color&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#555&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
span &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;absolute&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;There you have it, five super simple but dead practical list styles for you to copy and paste into your own code. If you have any other creative list ideas that you’d like to share, let us know in the comments below!&lt;/p&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://kidaworld.blogspot.com/2012/11/5-simple-and-practical-css-list-styles.html</link><author>noreply@blogger.com (UXAWY)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8363405111659754159.post-2227772701250380700</guid><pubDate>Mon, 12 Nov 2012 12:32:00 +0000</pubDate><atom:updated>2012-11-12T05:56:21.790-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">css</category><title>5 Simple and Practical CSS List Styles You Can Copy and Paste</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/copypastelist-3.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;Who doesn’t love a good list? We use them constantly in our markup for a variety of different situations. Today we’re going to take a look at a few simple and practical examples that you can steal and use in your own work.&lt;/p&gt;
&lt;p&gt;We start off with a fun animated vertical list, then style up a list with thumbnails and text, another with just images and finally an ordered list where the numbers are styled differently than the rest of the type. There’s a ton of great things to learn here so let’s jump in!&lt;/p&gt;
&lt;p&gt;&lt;span id="more-33727"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;HelvetiList&lt;/h2&gt;
&lt;p&gt;For our first list, we’re going to start with a simple, minimal but super attractive design that’s heavily dependent on the beauty of the typography. We’ll make use of some thin Helvetica styles and toss in a smooth animation on hover. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Demo:&lt;/strong&gt; Check out the demo and code on &lt;a href="http://codepen.io/secondfret/pen/6/3"&gt;CodePen&lt;/a&gt;.&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/copypastelist-2.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;h3&gt;HTML&lt;/h3&gt;
&lt;p&gt;Our markup here is dead simple. Create a div (you’ll probably want a class or ID in a live project), then toss in a header and an unordered list with five list items. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #fff; -webkit-box-shadow: 3px 3px 3px #ccc; -moz-box-shadow: 3px 3px 3px #ccc; box-shadow: 3px 3px 3px #ccc;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="html4strict" style="font-family:monospace;"&gt;&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;h2&lt;/span&gt;&amp;gt;&lt;/span&gt;HelvetiList&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;h2&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;ul&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&lt;/span&gt;Zurich&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&lt;/span&gt;Geneva&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&lt;/span&gt;Winterthur&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&lt;/span&gt;Lausanne&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&lt;/span&gt;Lucerne&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;ul&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h3&gt;CSS&lt;/h3&gt;
&lt;p&gt;As we saw in the screenshot above, the list items use very thin type, subtle separators and a hover state that enlarges the font. To start, give the div a width and set your generic h2 styles. &lt;/p&gt;
&lt;p&gt;Next, apply a list-style-type of none to ditch the bullets and reset any margins or padding that may be present. For the actual list items, I applied a slight bottom border, which provides that little divider. I did use the last-child selector, but it’s really no big deal if there’s a browser that doesn’t recognize that and decides to throw an extra border on the bottom. &lt;/p&gt;
&lt;p&gt;Also notice that both of the times I set the font, I used CSS shorthand and applied different weights. To finish off, I applied some link styles and set the transition to enlarge the font and change the background color on hover. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #fff; -webkit-box-shadow: 3px 3px 3px #ccc; -moz-box-shadow: 3px 3px 3px #ccc; box-shadow: 3px 3px 3px #ccc;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;div &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;200px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
h2 &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;400&lt;/span&gt; &lt;span style="color: #933;"&gt;40px&lt;/span&gt;/&lt;span style="color: #cc66cc;"&gt;1.5&lt;/span&gt; Helvetica&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; Verdana&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #993333;"&gt;sans-serif&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;padding&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
ul &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;list-style-type&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;none&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;padding&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
li &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;200&lt;/span&gt; &lt;span style="color: #933;"&gt;20px&lt;/span&gt;/&lt;span style="color: #cc66cc;"&gt;1.5&lt;/span&gt; Helvetica&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; Verdana&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #993333;"&gt;sans-serif&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;border-bottom&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;1px&lt;/span&gt; &lt;span style="color: #993333;"&gt;solid&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#ccc&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
li&lt;span style="color: #3333ff;"&gt;:last-child &lt;/span&gt;&lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;border&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;none&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
li a &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;text-decoration&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;none&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;color&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#000&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;display&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;block&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;200px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&amp;nbsp;
  -webkit-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;font-size&lt;/span&gt; 0.3s ease&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;background-color&lt;/span&gt; 0.3s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  -moz-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;font-size&lt;/span&gt; 0.3s ease&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;background-color&lt;/span&gt; 0.3s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  -o-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;font-size&lt;/span&gt; 0.3s ease&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;background-color&lt;/span&gt; 0.3s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  -ms-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;font-size&lt;/span&gt; 0.3s ease&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;background-color&lt;/span&gt; 0.3s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;font-size&lt;/span&gt; 0.3s ease&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;background-color&lt;/span&gt; 0.3s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
li a&lt;span style="color: #3333ff;"&gt;:hover &lt;/span&gt;&lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font-size&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;30px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#f6f6f6&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h2&gt;Thumbnail List&lt;/h2&gt;
&lt;p&gt;One really common format that you’ll see for lists is your basic “thumbnail and text” setup, which is a great way to add some nice visual interest to an otherwise boring list of paragraphs. &lt;/p&gt;
&lt;p&gt;This is an extremely versatile list style that you can use on any number of projects. Let’s see how it works.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Demo:&lt;/strong&gt; Check out the demo and code on &lt;a href="http://codepen.io/secondfret/pen/7/2"&gt;CodePen&lt;/a&gt;.&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/copypastelist-3.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;h3&gt;HTML&lt;/h3&gt;
&lt;p&gt;The HTML on this one is a little more complicated. Each list item needs to have three children: an image, a headline and a paragraph. The images that I’m using are 100px by 100px so keep that in mind if you want to customize this to be a different size. Overall, this is all still really simple markup that shouldn’t trip you up in the least.&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #fff; -webkit-box-shadow: 3px 3px 3px #ccc; -moz-box-shadow: 3px 3px 3px #ccc; box-shadow: 3px 3px 3px #ccc;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="html4strict" style="font-family:monospace;"&gt;&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;ul&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://lorempixum.com/100/100/nature/1"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;h3&lt;/span&gt;&amp;gt;&lt;/span&gt;Headline&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;h3&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;Lorem ipsum dolor sit amet...&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://lorempixum.com/100/100/nature/2"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;h3&lt;/span&gt;&amp;gt;&lt;/span&gt;Headline&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;h3&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;Lorem ipsum dolor sit amet...&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://lorempixum.com/100/100/nature/3"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;h3&lt;/span&gt;&amp;gt;&lt;/span&gt;Headline&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;h3&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;Lorem ipsum dolor sit amet...&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://lorempixum.com/100/100/nature/4"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;h3&lt;/span&gt;&amp;gt;&lt;/span&gt;Headline&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;h3&lt;/span&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;Lorem ipsum dolor sit amet...&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;ul&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h3&gt;CSS&lt;/h3&gt;
&lt;p&gt;This one surprisingly doesn’t take too much code to pull off. Once again, we’re clearing our list styles and setting some typography related CSS. The thing that you have to understand is that you need to float your images to the left so that the paragraphs appear next to them.&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #fff; -webkit-box-shadow: 3px 3px 3px #ccc; -moz-box-shadow: 3px 3px 3px #ccc; box-shadow: 3px 3px 3px #ccc;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;&lt;span style="color: #00AA00;"&gt;*&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;padding&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
div &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;20px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
ul &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;list-style-type&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;none&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;500px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
h3 &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;bold&lt;/span&gt; &lt;span style="color: #933;"&gt;20px&lt;/span&gt;/&lt;span style="color: #cc66cc;"&gt;1.5&lt;/span&gt; Helvetica&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; Verdana&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #993333;"&gt;sans-serif&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
li img &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;float&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;left&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt; &lt;span style="color: #933;"&gt;15px&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
li p &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;200&lt;/span&gt; &lt;span style="color: #933;"&gt;12px&lt;/span&gt;/&lt;span style="color: #cc66cc;"&gt;1.5&lt;/span&gt; Georgia&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; Times New Roman&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #993333;"&gt;serif&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
li &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;padding&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;10px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;overflow&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;auto&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
li&lt;span style="color: #3333ff;"&gt;:hover &lt;/span&gt;&lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#eee&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;cursor&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;pointer&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h2&gt;Standard Thumbnail Grid&lt;/h2&gt;
&lt;p&gt;If we’re talking unordered lists, we should throw in at least one image grid, which are almost always handled with lists. We won’t do anything too fancy, it’ll just be helpful for you to keep a form of this code on hand for quick insertion.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Demo:&lt;/strong&gt; Check out the demo and code on &lt;a href="http://codepen.io/secondfret/pen/8/5"&gt;CodePen&lt;/a&gt;.&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/copypastelist-4.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;h3&gt;HTML&lt;/h3&gt;
&lt;p&gt;The markup for has the basic structure of &lt;em&gt;list-item&amp;gt;anchor&amp;gt;image&lt;/em&gt;. If you’re not used to seeing this code, it might seem pretty strange to use a list for this, but really that’s exactly what you’re creating: a big list of images. The fact that they’re arranged into a grid doesn’t negate the idea that’s it’s just a big ‘ol list at heart. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #fff; -webkit-box-shadow: 3px 3px 3px #ccc; -moz-box-shadow: 3px 3px 3px #ccc; box-shadow: 3px 3px 3px #ccc;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="html4strict" style="font-family:monospace;"&gt;&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;ul&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/150x150"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/150x150"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/150x150"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/150x150"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/150x150"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/150x150"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/150x150"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/150x150"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/150x150"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/150x150"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/150x150"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/150x150"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/150x150"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/150x150"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;img&lt;/span&gt; &lt;span style="color: #000066;"&gt;src&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"http://placehold.it/150x150"&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;ul&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h3&gt;CSS&lt;/h3&gt;
&lt;p&gt;For this example, the basic structure is that you toss some margins on each of your list items and float them left. I used the “overflow:auto” trick to clear the float, set up a dark background and tossed a border on the images. &lt;/p&gt;
&lt;p&gt;To make the demo slightly interesting, I added a hover effect that slowly applies a glow. This is of course completely optional and isn’t something you’d apply on every project. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #fff; -webkit-box-shadow: 3px 3px 3px #ccc; -moz-box-shadow: 3px 3px 3px #ccc; box-shadow: 3px 3px 3px #ccc;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;&lt;span style="color: #00AA00;"&gt;*&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;padding&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
body &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;background&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#333&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
div &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;900px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt; &lt;span style="color: #993333;"&gt;auto&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;overflow&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;auto&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
ul &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;list-style-type&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;none&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
li img &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;float&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;left&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;10px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;border&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;5px&lt;/span&gt; &lt;span style="color: #993333;"&gt;solid&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#fff&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&amp;nbsp;
  -webkit-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; box-shadow 0.5s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  -moz-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; box-shadow 0.5s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  -o-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; box-shadow 0.5s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  -ms-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; box-shadow 0.5s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; box-shadow 0.5s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
li img&lt;span style="color: #3333ff;"&gt;:hover &lt;/span&gt;&lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  -webkit-box-shadow&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;7px&lt;/span&gt; rgba&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;255&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;255&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;255&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.9&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  box-shadow&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt; &lt;span style="color: #933;"&gt;7px&lt;/span&gt; rgba&lt;span style="color: #00AA00;"&gt;(&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;255&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;255&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;255&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt;&lt;span style="color: #cc66cc;"&gt;0.9&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;)&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h2&gt;Horizontal Menu&lt;/h2&gt;
&lt;p&gt;Another thing that developers use lists for is horizontal navigation menus. As a new developer, the code for this trick was something I Googled constantly so be sure to bookmark it or toss it into your snippets saver. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Demo:&lt;/strong&gt; Check out the demo and code on &lt;a href="http://codepen.io/secondfret/pen/9/1"&gt;CodePen&lt;/a&gt;.&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/copypastelist-5.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;h3&gt;HTML&lt;/h3&gt;
&lt;p&gt;With the thumbnail grid above, we already learned how to float list items so that they appear next to each other so here we’ll use the same technique, only with fewer items. Notice that I’ve tossed in an “active” class, which is a fairly standard practice that we’ll use to tell the user which page they’re currently on.&lt;/p&gt;
&lt;div style="overflow: auto; background-color: #fff; -webkit-box-shadow: 3px 3px 3px #ccc; -moz-box-shadow: 3px 3px 3px #ccc; box-shadow: 3px 3px 3px #ccc;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="html4strict" style="font-family:monospace;"&gt;&lt;span style="color: #009900;"&gt;&amp;lt;nav&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;ul&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&lt;/span&gt;Home&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt; &lt;span style="color: #000066;"&gt;class&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"active"&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&lt;/span&gt;About&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&lt;/span&gt;Portfolio&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt; &lt;span style="color: #000066;"&gt;href&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;=&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;"#"&lt;/span&gt;&amp;gt;&lt;/span&gt;Contact&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;a&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;ul&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;nav&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h3&gt;CSS&lt;/h3&gt;
&lt;p&gt;Here we floated our list items to the left, put a border only on the right side, strip the default link styles and setup my own, and then styled both the hover and active states. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #fff; -webkit-box-shadow: 3px 3px 3px #ccc; -moz-box-shadow: 3px 3px 3px #ccc; box-shadow: 3px 3px 3px #ccc;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;&lt;span style="color: #00AA00;"&gt;*&lt;/span&gt; &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;padding&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
nav &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;50px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
ul &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;overflow&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;auto&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;list-style-type&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;none&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
li &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;height&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;25px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;float&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;left&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin-right&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;0px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;border-right&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;1px&lt;/span&gt; &lt;span style="color: #993333;"&gt;solid&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#aaa&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;padding&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc66cc;"&gt;0&lt;/span&gt; &lt;span style="color: #933;"&gt;20px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
li&lt;span style="color: #3333ff;"&gt;:last-child &lt;/span&gt;&lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;border-right&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;none&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
li a &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;text-decoration&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;none&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;color&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#ccc&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;25px&lt;/span&gt;/&lt;span style="color: #cc66cc;"&gt;1&lt;/span&gt; Helvetica&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; Verdana&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #993333;"&gt;sans-serif&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;text-transform&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;uppercase&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&amp;nbsp;
  -webkit-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.5s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  -moz-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.5s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  -o-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.5s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  -ms-transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.5s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  transition&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; all 0.5s ease&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
li a&lt;span style="color: #3333ff;"&gt;:hover &lt;/span&gt;&lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;color&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#666&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
li&lt;span style="color: #6666ff;"&gt;.active&lt;/span&gt; a &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font-weight&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;bold&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;color&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#333&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h2&gt;Big Numbers Ordered List&lt;/h2&gt;
&lt;p&gt;Let’s not forget that all lists aren’t unordered lists! There’s definitely a lot of useful applications for ordered lists. One really tricky thing to do with ordered lists is style the numbers differently than the other text. Let’s see how this works.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Demo:&lt;/strong&gt; Check out the demo and code on &lt;a href="http://codepen.io/secondfret/pen/10/3"&gt;CodePen&lt;/a&gt;.&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/copypastelist-761.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;h3&gt;HTML&lt;/h3&gt;
&lt;p&gt;Now, how I built this is going to be super controversial. As you can see, I’m actually manually putting in the numbers despite the fact that HTML will actually do this automatically for you. There’s a good reason for this though.&lt;/p&gt;
&lt;p&gt;To start this idea, I threw a paragraph into the list items, then coded the li type and the li&amp;gt;p type in different ways. However, trying to get everything to line up properly with this method was a total nightmare. Ultimately, to fix it the CSS was so messy and nasty that I abandoned it completely in favor of this simpler method which actually allows for clear, simple CSS. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #fff; -webkit-box-shadow: 3px 3px 3px #ccc; -moz-box-shadow: 3px 3px 3px #ccc; box-shadow: 3px 3px 3px #ccc;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="html4strict" style="font-family:monospace;"&gt;&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;ol&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;span&lt;/span&gt;&amp;gt;&lt;/span&gt;1.&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;span&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent euismod ultrices ante, ac laoreet nulla vestibulum adipiscing. Nam quis justo in augue auctor imperdiet. Curabitur aliquet orci sit amet est posuere consectetur. Fusce nec leo ut massa viverra venenatis. Nam accumsan libero a elit aliquet quis ullamcorper arcu tincidunt. Praesent purus turpis, consectetur quis congue vel, pulvinar at lorem. Vivamus varius condimentum dolor, quis ultricies ipsum porta quis. &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;span&lt;/span&gt;&amp;gt;&lt;/span&gt;2.&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;span&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent euismod ultrices ante, ac laoreet nulla vestibulum adipiscing. Nam quis justo in augue auctor imperdiet. Curabitur aliquet orci sit amet est posuere consectetur.  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;span&lt;/span&gt;&amp;gt;&lt;/span&gt;3.&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;span&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&lt;/span&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent euismod ultrices ante, ac laoreet nulla vestibulum adipiscing. Nam quis justo in augue auctor imperdiet. Curabitur aliquet orci sit amet est posuere consectetur.  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;p&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;li&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;ol&lt;/span&gt;&amp;gt;&lt;/span&gt; 
&lt;span style="color: #009900;"&gt;&amp;lt;&lt;span style="color: #66cc66;"&gt;/&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h3&gt;CSS&lt;/h3&gt;
&lt;p&gt;As you can see in the code below, what I did here was ditch the default numbers and then set my spans to absolute so I could push them over to the left of the paragraphs, which in turn required some extra padding on the paragraphs. It may not be the prettiest solution code-wise, but it’s the briefest and most straightforward way that I could come up with to do it without bizarre positioning bugs. &lt;/p&gt;
&lt;div style="overflow: auto; background-color: #fff; -webkit-box-shadow: 3px 3px 3px #ccc; -moz-box-shadow: 3px 3px 3px #ccc; box-shadow: 3px 3px 3px #ccc;"&gt;

&lt;div class="wp_syntax"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="code"&gt;&lt;pre class="css" style="font-family:monospace;"&gt;div &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;width&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;500px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;10px&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
ol &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;color&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#ccc&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;list-style-type&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;none&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
ol li &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;relative&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;bold&lt;/span&gt; &lt;span style="color: #993333;"&gt;italic&lt;/span&gt; &lt;span style="color: #933;"&gt;45px&lt;/span&gt;/&lt;span style="color: #cc66cc;"&gt;1.5&lt;/span&gt; Helvetica&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; Verdana&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #993333;"&gt;sans-serif&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;margin-bottom&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;20px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
li p &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;font&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;12px&lt;/span&gt;/&lt;span style="color: #cc66cc;"&gt;1.5&lt;/span&gt; Helvetica&lt;span style="color: #00AA00;"&gt;,&lt;/span&gt; &lt;span style="color: #993333;"&gt;sans-serif&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;padding-left&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #933;"&gt;60px&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;color&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #cc00cc;"&gt;#555&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;
&amp;nbsp;
span &lt;span style="color: #00AA00;"&gt;{&lt;/span&gt;
  &lt;span style="color: #000000; font-weight: bold;"&gt;position&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;:&lt;/span&gt; &lt;span style="color: #993333;"&gt;absolute&lt;/span&gt;&lt;span style="color: #00AA00;"&gt;;&lt;/span&gt;
&lt;span style="color: #00AA00;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;There you have it, five super simple but dead practical list styles for you to copy and paste into your own code. If you have any other creative list ideas that you’d like to share, let us know in the comments below!&lt;/p&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://kidaworld.blogspot.com/2012/11/5-simple-and-practical-css-list-styles_12.html</link><author>noreply@blogger.com (UXAWY)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8363405111659754159.post-504709335487690277</guid><pubDate>Mon, 12 Nov 2012 12:25:00 +0000</pubDate><atom:updated>2012-11-12T04:25:34.195-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">design</category><category domain="http://www.blogger.com/atom/ns#">portfolio</category><title>6 Portfolio Design Mistakes That Drive Me Nuts</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/portfoliomistakes-0.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;Your public portfolio is one of the most important things you’ll ever design. It presents you to the world and, if you’re a freelancer, tends to play a major role in whether or not people choose to hire you.&lt;/p&gt;
&lt;p&gt;Because of my role as the editor of Design Shack, I’ve viewed a ton of online portfolios and today I’d like to walk through some of the weaknesses I see time and time again. Read on to see if you’ve made some of these mistakes. &lt;/p&gt;
&lt;p&gt;&lt;span id="more-34467"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;1. Listing Your Age&lt;/h2&gt;
&lt;p&gt;Oddly enough, this is an extremely common piece of information to find on web designer portfolios. Designers feel the need to introduce themselves to make the page more personal, but can’t think of anything good to say and therefore revert to the basics: &lt;em&gt;“I’m a 22 year old web designer from Papua New Guinea.”&lt;/em&gt;&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/portfoliomistakes-4.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;h3&gt;Only Kids Brag on Their Age&lt;/h3&gt;
&lt;p&gt;This bugs me every single time I see it. It’s not the worst mistake that you could make, but it just reeks of a rookie move. This is evident by the fact that you never see someone bragging about being a 43 year old web designer. It’s only the young folks who feel the need to wear their age like a badge. I’m surprised I’ve never read one boasting about being “twenty and a half.”&lt;/p&gt;
&lt;div style="overflow: auto; color: #4e4e4e; background-color: #eeeeee; width: 470px; padding: 20px; font: italic 20px/30px Georgia, serif; border: 1px solid #ccc;"&gt;
“You never see someone bragging about being a 43 year old web designer.”
&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;You’ll find that the experienced designers brag about exactly that: experience. &lt;em&gt;“I’ve been building websites for Fortune 500 companies for over 10 years.”&lt;/em&gt; Now &lt;em&gt;that’s&lt;/em&gt; a number to brag about. &lt;/p&gt;
&lt;h3&gt;Who Cares?&lt;/h3&gt;
&lt;p&gt;Here’s my gripe with this piece of information: who gives a crap? Do you want people to hire you based on talent and experience or on the year that you were born? If you don’t want potential clients to judge your age, then why are you broadcasting it?&lt;/p&gt;
&lt;p&gt;The only time that a potential client might think twice about hiring someone based on age is if they seem too young, and as I said above the only people who do this are the twenties crowd so they’re really just shooting themselves in the foot.&lt;/p&gt;
&lt;h3&gt;Just The Necessities&lt;/h3&gt;
&lt;p&gt;Skip the fluff. I don’t want to know how old you are, what type of computer mouse you use or how often you buy a new pair of Converse. Tell me what you do and prove it with some solid examples. Which brings me to my next point.&lt;/p&gt;
&lt;h2&gt;2. Showing School Projects&lt;/h2&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/portfoliomistakes-5.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;Here’s another one that always gets me with the young designers. They always feel the need to show off their school projects. This ain’t your momma’s refrigerator junior, it’s a professional portfolio and clients want to see &lt;strong&gt;real work&lt;/strong&gt;.&lt;/p&gt;
&lt;div style="overflow: auto; color: #4e4e4e; background-color: #eeeeee; width: 470px; padding: 20px; font: italic 20px/30px Georgia, serif; border: 1px solid #ccc;"&gt;
“This ain’t your momma’s refrigerator junior, it’s a professional portfolio.”
&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h3&gt;If It’s All You Have, Show It&lt;/h3&gt;
&lt;p&gt;I jumped a little bit ahead of myself with this one, let’s take a step back. If you’re fresh out of school and have no client work under your belt, then you should absolutely be encouraged to build a site to show it off. Lots of potential clients won’t mind one bit, especially if that inexperience comes with a low price tag.&lt;/p&gt;
&lt;h3&gt;Show Paid Work When Possible&lt;/h3&gt;
&lt;p&gt;That being said, once you’ve been out in the real world for a little while and have a few projects to show off, you should consider pulling down your student work. Otherwise, I’ll browse through your portfolio and think “Hey, this guy is really good! Oh wait, student work? He’s a noob, let’s move along. I need a pro.”&lt;/p&gt;
&lt;p&gt;See how much of a double standard that is? Even if I think your work looks top notch at first, when I see those student projects, I immediately write you off as inexperienced. Does that suck? Absolutely! Is it fair? Nope. Is it how the world works. You bet.&lt;/p&gt;
&lt;h2&gt;3. Lack of Confidence&lt;/h2&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/portfoliomistakes-6.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;There’s a time and place to be humble, but your professional portfolio is not it. So many times I see really talented designers sell themselves short with self-depurating website copy and it drives me nuts.&lt;/p&gt;
&lt;div style="overflow: auto; color: #4e4e4e; background-color: #eeeeee; width: 470px; padding: 20px; font: italic 20px/30px Georgia, serif; border: 1px solid #ccc;"&gt;
“There’s a time and place to be humble, but your professional portfolio is not it.”
&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;“I’m just getting started” or “I hope to one day achieve…” these things might not sound so bad as you’re writing them but they shatter my confidence in your ability to deliver quality results.&lt;/p&gt;
&lt;h3&gt;Clients Mirror Your Confidence Level&lt;/h3&gt;
&lt;p&gt;If you can’t muster up enough confidence in yourself to tell me that you’re an awesome designer, odds are I’m not going to come to that conclusion for you.&lt;/p&gt;
&lt;p&gt;As a potential client, how you talk about yourself tells me quite a bit. If you sound hesitant about your ability, I’m going to instantly pick up on that and either look elsewhere or exploit the weakness to get you to do more work for less money. &lt;/p&gt;
&lt;h3&gt;Acting a Fool&lt;/h3&gt;
&lt;p&gt;Now, that being said, there’s definitely a point where confidence can become hubris. If all of the copy on your portfolio makes you sound full of yourself, then that’s going to turn me away just as quickly as a lack of confidence.&lt;/p&gt;
&lt;p&gt;This is a fine line to walk and it’s not always easy to find the balance. You have to figure how to tell me how great you are without sounding like you’re bragging about how great you are.&lt;/p&gt;
&lt;div style="overflow: auto; color: #4e4e4e; background-color: #eeeeee; width: 470px; padding: 20px; font: italic 20px/30px Georgia, serif; border: 1px solid #ccc;"&gt;
“You have to figure how to tell me how great you are without sounding like you’re bragging about how great you are.”
&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;Often, the best way to do this is to let your work speak for itself. If your work really is amazing, then I won’t need you to try so hard to convince me of that fact.&lt;/p&gt;
&lt;h2&gt;4. Grammar&lt;/h2&gt;
&lt;p&gt;This one is really difficult for designers, including myself. These days I write more than I design and you still don’t have to look very hard to find a grammatical error that I’ve committed. &lt;/p&gt;
&lt;p&gt;What I’m talking about here is the big stuff. It’s not the end of the world if you dangle a participle or end a sentence with a preposition, just make sure that a reasonably intelligent person can read your sentences without wondering how you managed to graduate from high school.&lt;/p&gt;
&lt;div style="overflow: auto; color: #4e4e4e; background-color: #eeeeee; width: 470px; padding: 20px; font: italic 20px/30px Georgia, serif; border: 1px solid #ccc;"&gt;
“Make sure that a reasonably intelligent person can read your sentences without wondering how you managed to graduate from high school.”
&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;h3&gt;What If English Isn’t Your Thing?&lt;/h3&gt;
&lt;p&gt;The designers who I personally see really struggling in this area are those for whom English isn’t their first language. This becomes pretty easy to spot when reading website copy.&lt;/p&gt;
&lt;p&gt;This is a touchy subject so I’ll first say “kudos,” because I personally only speak one language (many Americans are lame like that). If you speak two or more languages, you’re well ahead of me.&lt;/p&gt;
&lt;p&gt;That being said, if I were to release my professional portfolio in another language, even if I spoke a little bit of that language, I’d still drop a few bucks to have someone perform a proper translation.&lt;/p&gt;
&lt;div style="overflow: auto; color: #4e4e4e; background-color: #eeeeee; width: 470px; padding: 20px; font: italic 20px/30px Georgia, serif; border: 1px solid #ccc;"&gt;
“You want to get the message across that you’re a good designer, don’t let bad grammar stand in the way of that fact. ”
&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;This is simply a matter of putting your best foot forward. You want to get the message across that you’re a good designer, don’t let bad grammar stand in the way of that fact. &lt;/p&gt;
&lt;h2&gt;5. Blog Neglect&lt;/h2&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/portfoliomistakes-7.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;Here’s one that we’ve all probably struggled with at one time or another. You start up a new blog and you’re brimming with enthusiasm for how often you’re going to update it.&lt;/p&gt;
&lt;p&gt;You’re good about it at first, but then a few months down the line you start to slack off and before you know it that blog is a dead dream stuffed into the back of the closet with your astronaut helmet.&lt;/p&gt;
&lt;h3&gt;Digital Cobwebs&lt;/h3&gt;
&lt;p&gt;The interesting thing that you probably haven’t considered though is what message you’re sending to the people who visit your site. One of the first things that I do when I visit a blog is look at the date of the most recent post, what will this tell me about your blog?&lt;/p&gt;
&lt;div style="overflow: auto; color: #4e4e4e; background-color: #eeeeee; width: 470px; padding: 20px; font: italic 20px/30px Georgia, serif; border: 1px solid #ccc;"&gt;
“If your most recent post is over a year old, then it makes your site feel like it has cobwebs on it.”
&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;If your most recent post is over a year old, then it makes your site feel like it has cobwebs on it. This makes me doubt whether you’re even actively taking on clients anymore. Was the freelance thing a failed project? Did you abandon client work in favor of a full time job?&lt;/p&gt;
&lt;h3&gt;Do It Well or Not at All&lt;/h3&gt;
&lt;p&gt;A blog makes a great addition to any portfolio, but if it’s not done well, it can actually drag you down. My advice is simple: either dedicate yourself to updating your blog on a regular basis with quality, interesting content, or simply don’t have one.&lt;/p&gt;
&lt;p&gt;You don’t have to write a post every day or even every week, but at the very least you should try getting something up monthly to keep people interested.&lt;/p&gt;
&lt;div style="overflow: auto; color: #4e4e4e; background-color: #eeeeee; width: 470px; padding: 20px; font: italic 20px/30px Georgia, serif; border: 1px solid #ccc;"&gt;
“You don’t have to write a post every day or even every week, but at the very least you should try getting something up monthly to keep people interested.”
&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;While we’re on the topic, use your portfolio’s blog as a place to share knowledge, disseminate information, and maybe score some search traffic, not to post photos of your cats or rant about who you’re voting for in the next election. This content belongs on your personal blog. Keep it there.&lt;/p&gt;
&lt;h2&gt;6. Showcasing Where You Suck&lt;/h2&gt;
&lt;p&gt;There’s an interesting trend in web design portfolios right now that not only showcases your skill set, but also weighs the different items against each other. This usually takes form of some little graph or visualization like the following.&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/portfoliomistakes-1.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;Pretty neat right? This quickly gives me a feel for the services that you offer and the proficiency you have with each. Thanks for being so honest!&lt;/p&gt;
&lt;p&gt;The problem of course with this method is that the way you read it and the way that I read it as a potential client are different. Here’s what you’re hoping that I see:&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/portfoliomistakes-3.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;Unfortunately, here’s what I really see:&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/portfoliomistakes-2.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;h3&gt;Don’t Point Out Your Weaknesses&lt;/h3&gt;
&lt;p&gt;It’s good to have strengths and weaknesses, everyone does. However, I’m not convinced that showcasing your weaknesses in a pretty graphic is the best marketing strategy.&lt;/p&gt;
&lt;div style="overflow: auto; color: #4e4e4e; background-color: #eeeeee; width: 470px; padding: 20px; font: italic 20px/30px Georgia, serif; border: 1px solid #ccc;"&gt;
“I’m not convinced that showcasing your weaknesses in a pretty graphic is the best marketing strategy.”
&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;To utilize an old simile, this is like putting a gold ring in a pig’s snout. You may be trying to dress up your weaknesses with good design, but it’s likely a waste of effort because they’re still ugly. &lt;/p&gt;
&lt;h2&gt;Think Before You Design&lt;/h2&gt;
&lt;p&gt;The real takeaway from this article is to carefully consider each component of your web design portfolio, from the work you show to the copy that you write.&lt;/p&gt;
&lt;p&gt;At every single stage, ask yourself whether you’re really improving the quality of the finished product or are in fact reducing the likelihood of someone hiring you. You’ll likely find that a lot of the added fluff that you thought was helping the page is really bringing you down. &lt;/p&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://kidaworld.blogspot.com/2012/11/6-portfolio-design-mistakes-that-drive.html</link><author>noreply@blogger.com (UXAWY)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8363405111659754159.post-7215563120010011804</guid><pubDate>Mon, 12 Nov 2012 12:23:00 +0000</pubDate><atom:updated>2012-11-12T04:23:09.406-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">design</category><category domain="http://www.blogger.com/atom/ns#">ui</category><title>Maintaining Consistency in Your UI Design</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/consistencycox-0.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;Consistency in UI design is an old school principle and somewhat forgotten in some of today’s web and application designs. It seems like designers are choosing to omit consistency from their interfaces. &lt;/p&gt;
&lt;p&gt;In the case of mobile application design, some designers are choosing to re-invent, re-create or even completely break the hardware standard interactions with their own unique interface patterns. While breaking the consistency between the hardware UI rules and your apps experience may not be a bad idea, breaking your own apps consistency can be.&lt;/p&gt;
&lt;p&gt;&lt;span id="more-34625"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Three Steps to Consistent UI Design&lt;/h2&gt;
&lt;p&gt;There are basically three types of consistency you should think about when designing your web and mobile app designs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;1. &lt;/strong&gt;Stay consistent with device UI guidelines and behaviors&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;2. &lt;/strong&gt;Stay consistent with other similar sites or applications&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;3. &lt;/strong&gt;Stay consistent with your own design&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="tutorialimage"&gt;&lt;a href="http://qwik.vu/"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/overall_qwikvu.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;For the purpose of this article I’d like to focus more on the third — keeping the consistency in your own user interface. This is kind of a big deal mainly because you don’t want to confuse or surprise your users inside your own app.&lt;/p&gt;
&lt;p&gt;You don’t want a user going from you home page to a subpage and see different styling or even vastly different user interactions. This kind of thing can surprise users or in some case even scare them away. Consistency is not only a big deal to the overall usability of the site, it can greatly increase conversion as well.&lt;/p&gt;
&lt;h2&gt;Consistent Structure and Interactions&lt;/h2&gt;
&lt;p&gt;This is key to creating a consistent UI. Sometimes when we develop we forget about how the structure and interaction is going to affect the overall user experience. But just as blueprinting and creating plans is important when building a home or building, it’s also important for creating a consistent, usable UI. There are a few things to think about and plan ahead before you start to write code.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;1. &lt;/strong&gt;Consider how to consistently place elements throughout your site or app.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;2. &lt;/strong&gt;Think about what UI patterns you’ll be using.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;3. &lt;/strong&gt;Plan out what input elements you’ll need.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;4. &lt;/strong&gt;Figure out what icons you’ll need, and pick or design a good icon set that covers them all.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="tutorialimage"&gt;&lt;a href="http://polldaddy.com/"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/structure_polldaddy.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Element placement is a huge way to reduce surprise in the user and create consistent, reliable expectations. Keep your navigations in the same place, nothing irritates a user more quickly than moving or disappearing navigational elements. Also keep logos and other branding items in the same locations through out the site. &lt;/p&gt;
&lt;div style="overflow: auto; color: #4e4e4e; background-color: #eeeeee; width: 470px; padding: 20px; font: italic 20px/30px Georgia, serif; border: 1px solid #ccc;"&gt;
“Nothing irritates a user more quickly than moving or disappearing navigational elements”
&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;If you are using a sidebar, don’t shake up the side bar to much by changing what is present in them from page to page. Some of this may be relevant to the content on the page, but avoid removing or even moving import overall elements like search forms. One big thing to keep placed consistently is the login and user setting links or buttons.&lt;/p&gt;
&lt;h3&gt;Consider UI Patterns&lt;/h3&gt;
&lt;p&gt;Plan ahead and think about what UI patterns you will need. Are you going to need a gallery? Modals? Accordions? Sidebars? Planning design patterns ahead of time will not only help you develop and design your app quicker, but thinking about what design patterns you’ll need also helps to figure out your content ahead of time — which can save you loads of time as well. &lt;/p&gt;
&lt;p&gt;This will also solve problems and answer questions ahead of time, this way when you come to a section or page in your site that requires a UI decision, you’ve already made it and you won’t get caught creating a mishmash of design patterns throughout your site.&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;a href="https://carbonmade.com/signup"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/form_carbonmade.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Think about your forms before hand as well. Plan out what form elements you’re going to need and figure out the elements that you won’t need or that you could replace. Form elements can be scary or even tricky for users to navigate anyway, so if you can eliminate or swap out some inputs that may be stumbling blocks, do it. &lt;/p&gt;
&lt;div style="overflow: auto; color: #4e4e4e; background-color: #eeeeee; width: 470px; padding: 20px; font: italic 20px/30px Georgia, serif; border: 1px solid #ccc;"&gt;
“If you can eliminate or swap out some inputs that may be stumbling blocks, do it.”
&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;This also is a great way of removing the decision making from the development process. Keeping forms consistent in both style, structure and interaction can sometimes make or break a conversion rate.&lt;/p&gt;
&lt;p&gt;Again, plan head. Plan out what icons you will need ahead of time. One super quick way to screw up your consistency is to be half way through the development of your app when you find out that you’ll need print icons, then realize that you can’t remember where you got your icons or even if you can find a print icon that matches the rest of your icons. &lt;/p&gt;
&lt;p&gt;This isn’t even a style issue really, but an interactive one. Users will get used to the look a particular icons and be able to quickly recognize them. But if you are using a patchwork icon set you’ll confuse your user or even make it hard for them to tell what certain icons represent.&lt;/p&gt;
&lt;h2&gt;Consistent Style&lt;/h2&gt;
&lt;p&gt;The style and design of each UI element is important and maintaining consistency between them is also important to the user. Just as it is important to have a consistent icons set, it’s important that your app has an over all design consistency to it. You may think that certain buttons are cool even though they don’t come close to matching the over all design or color scheme of the site, butthis will just confuse your user and look ugly.&lt;/p&gt;
&lt;p&gt;When designing a UI kit, there are a few things to keep in mind in order to create consistency:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;1. &lt;/strong&gt;Color scheme&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;2. &lt;/strong&gt;Style&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;3. &lt;/strong&gt;Borders&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;4. &lt;/strong&gt;Type and fonts&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;5. &lt;/strong&gt;Size&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;6. &lt;/strong&gt;Background images&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;7. &lt;/strong&gt;Effects&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="tutorialimage"&gt;&lt;a href="http://www.dudamobile.com/index.php"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/color_dudomobile.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h3&gt;Colors&lt;/h3&gt;
&lt;p&gt;Like I said earlier, keep your UI color consistent with the over all color scheme of your site. Even when designing call to actions where you want buttons to stand out and be noticed, be careful not to make your call to action a sticking ugly compliment to your over all color scheme. To help you, use tools like &lt;a href="http://kuler.adobe.com/#themes/rating?time=30"&gt;Kuler&lt;/a&gt; or &lt;a href="http://www.colorschemer.com/"&gt;ColorSchemer&lt;/a&gt; to aid in selecting colors that go well together.&lt;/p&gt;
&lt;p&gt;When I talk about keeping your style consistent I’m talking about not using some crazy gradient button with drops shadows and bevel if the rest of the site design is flat and doesn’t have a shadow or gradient on it. Besides staying consistent with the overall site design, stay consistent with the style of your UI elements. If you are using a particular color or font style on your input labels, stick with it and use it on all labels.&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;a href="http://www.13creative.com/"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/borders_13creative.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h3&gt;Borders&lt;/h3&gt;
&lt;p&gt;Ahh, borders. Too often I see sites that use three or four different button border thicknesses or radiuses and this can really be confusing. Keep all of your borders on buttons, inputs, selects, galleries, images and all other UI elements consistent with each other. This doesn’t mean that you have to use on border radius, you can mix it up by having a few values or even use one style consistently on each element.&lt;/p&gt;
&lt;h3&gt;Type and Fonts&lt;/h3&gt;
&lt;p&gt;Using the same type and fonts in your elements is a pretty important thing, especially when dealing with form elements. Keep headers consistent and don’t use to many fonts even though you might like all of them — you can save them for other projects. Inputs and buttons should have font styles that match or complement each other so that forms are easily read and predictable.&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;a href="http://epic.net/eng/"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/size_epic.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h3&gt;Size&lt;/h3&gt;
&lt;p&gt;The size of fonts and other elements should be consistent or complimentary to each other. The headers and title of pages should all stay consistent so that your user knows that those lines of text are in fact matching headers and titles. Consistent size also applies to any UI element from content regions, links, navigational elements or sidebars. Avoid altering the sizes of any these to drastically between page views so that the user can recognize them immediately when the page loads.&lt;/p&gt;
&lt;h3&gt;Background Images&lt;/h3&gt;
&lt;p&gt;Try not to change up your background images too much. This doesn’t happen much these days as it used to, but it’s still a good idea avoid changing your background images from page view to page view. If you do, try to make the image relatable to each other somehow so the pages don’t lose consistency. Changing background image, especially large ones, can make the site feel disjointed and make the user feel like the have even left you site completely, so really try to avoid this temptation.&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;a href="http://flattr.com/"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/effects_flattr.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h3&gt;Effects&lt;/h3&gt;
&lt;p&gt;Effects, most importantly lighting effects, can make what seems like a great site design not make sense at all to the user. For example, if you are using a highlight on the button that it looks as though a light is shining on top of it, use the same lighting effect on beveled text in buttons or beveled text inputs. &lt;/p&gt;
&lt;p&gt;Honestly, this really isn’t a huge make it or break it deal with the user, but to the picky viewer they may notice the inconsistency of your effects and get distracted from doing what they are supposed to do with your app or site.&lt;/p&gt;
&lt;h2&gt;Don’t Be Boring&lt;/h2&gt;
&lt;p&gt;Designing for consistency may feel mundane or even boring sometimes and you may just want to throw something in your design to throw the user a surprise, and really that is great. &lt;/p&gt;
&lt;p&gt;It is good to keep the users on their toes, jsut don’t shake things up so much that they get so discouraged or confused that they leave and go somewhere else. A little consistency can go a long way.&lt;/p&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://kidaworld.blogspot.com/2012/11/maintaining-consistency-in-your-ui.html</link><author>noreply@blogger.com (UXAWY)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8363405111659754159.post-4946709557991521887</guid><pubDate>Mon, 12 Nov 2012 12:20:00 +0000</pubDate><atom:updated>2012-11-12T04:20:44.569-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Infographic</category><title>Seven Online Infographic Builders That You Have to Try</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/infographicslede-0.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;The world is becoming increasingly visual – especially the online world. Thanks to social media and the explosion of sites such as Pinterest, displaying information in a visual way has become even more important. But it can be time consuming and even brain-boggling. &lt;/p&gt;
&lt;p&gt;There are a host of tools out there though that can help you turn information into pretty good (and Pinterest-friendly) infographics in a matter of minutes. Here we take a look at some of the top contenders, how they work, what they cost and if they are worth your time (and money).&lt;/p&gt;
&lt;p&gt;&lt;span id="more-34889"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;&lt;a href="http://infogr.am/beta/"&gt;Infogr.am&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://infogr.am/beta/"&gt;
&lt;/a&gt;&lt;/p&gt;&lt;div class="tutorialimage"&gt;&lt;a href="http://infogr.am/beta/"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/infogram.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://infogr.am/beta/"&gt;
&lt;/a&gt;&lt;p&gt;&lt;a href="http://infogr.am/beta/"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Still in beta, Infogr.am is a lovely interface that allows you to create dynamic or static infographics or charts with ease. &lt;/p&gt;
&lt;p&gt;Pick a template or chart type, enter your data and go. You can add photos, text and even extra charts to your creations with a couple clicks and then publish to Twitter, Facebook, Pinterest or as a web link. (There is no print or downloadable option right now.) All of your finished infographics are saved to a library file for later use.&lt;/p&gt;
&lt;div style="overflow: auto; color: #4e4e4e; background-color: #eeeeee; width: 470px; padding: 20px; font: italic 20px/30px Georgia, serif; border: 1px solid #ccc;"&gt;
“Graphics are clean and sharp, although the number of templates is limited. ”
&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;Graphics are clean and sharp, although the number of templates is limited. Infogr.am is planning pid options in the future. Colors are customizable within infographics to help you create something that matches your site or brand.&lt;/p&gt;
&lt;p&gt;The best feature? You can upload data from your desktop. (This will work great for the spreadsheet you don’t know what to do with.)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cost:&lt;/strong&gt; Free.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Analysis: &lt;/strong&gt;Templates offer a clean, designed way to present information in a hurry. Bonus points for the ability to create text-heavy infographics or charts or a combination of the two.&lt;/p&gt;
&lt;h2&gt;&lt;a href="http://visual.ly/"&gt;Visual.ly&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://visual.ly/"&gt;
&lt;/a&gt;&lt;/p&gt;&lt;div class="tutorialimage"&gt;&lt;a href="http://visual.ly/"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/visually.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://visual.ly/"&gt;
&lt;/a&gt;&lt;p&gt;&lt;a href="http://visual.ly/"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Visual.ly is the super-social network of infographics. The recently re-launched platform not only allows you to create infographics but also allows you to share your work and take a peek at other items that are of interest.&lt;/p&gt;
&lt;p&gt;Visual.ly works in a template-based format with different design options for you to get started with working with data or other information. Select a graphic “story” and add your own customization for a quick and very visual representation of your information. You can download graphics in pdf format for print or web applications. &lt;/p&gt;
&lt;p&gt;Finally, the site uses social media connections to create infographics. So be ready to share your Twitter and Facebook information. Visual.ly will work with users to create custom infographics for a fee.&lt;/p&gt;
&lt;div style="overflow: auto; color: #4e4e4e; background-color: #eeeeee; width: 470px; padding: 20px; font: italic 20px/30px Georgia, serif; border: 1px solid #ccc;"&gt;
“The templates are well designed but there is a not a lot of room to change the overall look.”
&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;The templates are well designed but there is a not a lot of room to change the overall look. The problem here is that you may create the same look as someone else. Since the early-summer update, new items seem to be rolling out consistently and I would keep an eye on this software to continue to evolve and add functionality.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cost: &lt;/strong&gt;Free, with social media linking.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Analysis: &lt;/strong&gt;Templates are fun and have a fresh look. Infographic creation is simple but there are still a few software bugs and limited style of templates to choose form.&lt;/p&gt;
&lt;h2&gt;&lt;a href="http://visual.ly/"&gt;Piktochart&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://piktochart.com/"&gt;
&lt;/a&gt;&lt;/p&gt;&lt;div class="tutorialimage"&gt;&lt;a href="http://piktochart.com/"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/piktochart.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://piktochart.com/"&gt;
&lt;/a&gt;&lt;p&gt;&lt;a href="http://piktochart.com/"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Piktochart’s web-based software could not be any easier to use. Choose a template. Enter your information. Save, download and share.&lt;/p&gt;
&lt;p&gt;While the free version of the software is a great starting point if you only plan to create a graphic or two, the pro version really offers a great deal of functionality — you can customize all of the templates to change color schemes and fonts.&lt;/p&gt;
&lt;div style="overflow: auto; color: #4e4e4e; background-color: #eeeeee; width: 470px; padding: 20px; font: italic 20px/30px Georgia, serif; border: 1px solid #ccc;"&gt;
“If you plan to use it frequently, upgrade to the pro version.”
&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;With any of the templates, you can add text and images to build a graphic for almost any purpose. The only thing you really have to worry about is whether the template you used has appeared somewhere else. (That’s where the customization options really become important.)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cost:&lt;/strong&gt; Free for basic plan; $129 annually for professional version.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Analysis: &lt;/strong&gt;This tool helps you create quick and professional looking graphics from text in minutes. If you plan to use it frequently, upgrade to the pro version to remove branded watermarks, get access to added customization options and access to many more templates.&lt;/p&gt;
&lt;h2&gt;&lt;a href="http://www.statsilk.com/"&gt;Stat Silk&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://www.statsilk.com/"&gt;
&lt;/a&gt;&lt;/p&gt;&lt;div class="tutorialimage"&gt;&lt;a href="http://www.statsilk.com/"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/statsilk.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://www.statsilk.com/"&gt;
&lt;/a&gt;&lt;p&gt;&lt;a href="http://www.statsilk.com/"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Stat Silk allows users to create interactive charts and graphs that are customizable. The tool seems perfect for anyone who uses a lot of maps and mapping data.&lt;/p&gt;
&lt;p&gt;Animations are based on Flash and users can use base maps provided by Stat Silk or upload their own. The tool is super-customizable but can be a little complicated for novice users. The StatPlanet World Bank application was a first prize winner in the World Bank Apps for Deveopment and the software is used by big-name clients worldwide.&lt;/p&gt;
&lt;div style="overflow: auto; color: #4e4e4e; background-color: #eeeeee; width: 470px; padding: 20px; font: italic 20px/30px Georgia, serif; border: 1px solid #ccc;"&gt;
“The software can be a little clunky at first glance but works well with a little practice.”
&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;The business model for the Stat line of products in interesting. The license-free software “seeks to promote the use of data visualization by non-profit and government organizations and organizations in low income countries,” according to the website. Further it is used to promote data visualization of any kind.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cost: &lt;/strong&gt;Free.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Analysis:&lt;/strong&gt; This is a pretty cool tool, depending on the type of visualizations you are trying to create. The software can be a little clunky at first glance but works well with a little practice.&lt;/p&gt;
&lt;h2&gt;&lt;a href="http://www.google.com/publicdata/directory"&gt;Google Public Data&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://www.google.com/publicdata/directory"&gt;
&lt;/a&gt;&lt;/p&gt;&lt;div class="tutorialimage"&gt;&lt;a href="http://www.google.com/publicdata/directory"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/google2.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://www.google.com/publicdata/directory"&gt;
&lt;/a&gt;&lt;p&gt;&lt;a href="http://www.google.com/publicdata/directory"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Google public data is a great resource for finding (and charting) public information. Want to know the U.S. unemployment rate? Just do a quick search and get a chart in return.&lt;/p&gt;
&lt;div style="overflow: auto; color: #4e4e4e; background-color: #eeeeee; width: 470px; padding: 20px; font: italic 20px/30px Georgia, serif; border: 1px solid #ccc;"&gt;
“This can be a great tool but is really only relevant to a few sectors…”
&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;This can be a great tool but is really only relevant to a few sectors and those who are looking for specific public information. But if you fall in those categories, it can be a great place to start.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cost:&lt;/strong&gt; Free.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Analysis:&lt;/strong&gt; The graphics are simple – no bells and whistles here. But the data network is expansive and sourced well if you need public data charted in a jiffy.&lt;/p&gt;
&lt;h2&gt;&lt;a href="http://www.datameer.com/data-visualization.html?gclid=CPqg1vyR3bECFSMbQgodjGYA7A"&gt;Datameer&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://www.datameer.com/data-visualization.html?gclid=CPqg1vyR3bECFSMbQgodjGYA7A"&gt;
&lt;/a&gt;&lt;/p&gt;&lt;div class="tutorialimage"&gt;&lt;a href="http://www.datameer.com/data-visualization.html?gclid=CPqg1vyR3bECFSMbQgodjGYA7A"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/datameer.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://www.datameer.com/data-visualization.html?gclid=CPqg1vyR3bECFSMbQgodjGYA7A"&gt;
&lt;/a&gt;&lt;p&gt;&lt;a href="http://www.datameer.com/data-visualization.html?gclid=CPqg1vyR3bECFSMbQgodjGYA7A"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Datameer is marketed as a business product that helps you create simple yet, striking data visualizations. It is strictly for those dealing in numbers.&lt;/p&gt;
&lt;p&gt;The software runs from your desktop, rather than being online-based, and includes a library of tables, charts, maps, and tag clouds to make it easy to visualize data.&lt;/p&gt;
&lt;div style="overflow: auto; color: #4e4e4e; background-color: #eeeeee; width: 470px; padding: 20px; font: italic 20px/30px Georgia, serif; border: 1px solid #ccc;"&gt;
“Great for business owners focused on numerical data.”
&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;Datameer comes with a pretty nice price tag and does not include some of the more “fun” functionality and templating of other programs. What it does is add an additional layer of sophistication to business graphics.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cost:&lt;/strong&gt; Personal accounts are $299 annually.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Analysis:&lt;/strong&gt; Great for business owners focused on numerical data who are looking to create sharper graphics with ease.&lt;/p&gt;
&lt;h2&gt;&lt;a href="http://www.wordle.net/"&gt;Wordle&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://www.wordle.net/"&gt;
&lt;/a&gt;&lt;/p&gt;&lt;div class="tutorialimage"&gt;&lt;a href="http://www.wordle.net/"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/wordle.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://www.wordle.net/"&gt;
&lt;/a&gt;&lt;p&gt;&lt;a href="http://www.wordle.net/"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Word clouds seem to have fallen out of favor recently but they are still a fun and effective tool. Wordle helps you create beautiful, colorful word clouds with minimal effort.&lt;/p&gt;
&lt;div style="overflow: auto; color: #4e4e4e; background-color: #eeeeee; width: 470px; padding: 20px; font: italic 20px/30px Georgia, serif; border: 1px solid #ccc;"&gt;
“This is a super-fun tool…”
&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;The interface is easy to use and clouds can be printed or saved and used online. The simple feature creates a cloud from a URL. But it is the advanced features are the most impressive. You can paste in words and assign weights to them, define colors for text and backgrounds and even set up a Wordle on your site that users can interact with.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cost: &lt;/strong&gt;Free.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Analysis:&lt;/strong&gt; This is a super-fun tool. And the overall look is far better than the basic blog-based word cloud tool.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Visualization tools seem to be popping up all over the place. They can be a fun, quick (and super easy) way to put text into a graphic format, but they are not something most designers will want to rely on.&lt;/p&gt;
&lt;p&gt;Most of these tools do not allow for the degree of control that many graphic designers or artists would like to have on their work. Some also have that “templated” look and the different information could pop up with the same look on different places. &lt;/p&gt;
&lt;p&gt;If you want to ensure that an infographic has your signature look and feel, take the time to create something from scratch. But if you are looking for a simple, quick way to compile data, one of these tools might be perfect for your next project.&lt;/p&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://kidaworld.blogspot.com/2012/11/seven-online-infographic-builders-that.html</link><author>noreply@blogger.com (UXAWY)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8363405111659754159.post-4042857450791875343</guid><pubDate>Mon, 12 Nov 2012 12:19:00 +0000</pubDate><atom:updated>2012-11-12T04:19:40.064-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">design</category><category domain="http://www.blogger.com/atom/ns#">logo</category><title>10 Tips for Designing Logos That Don’t Suck</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/logotentips-0.jpg" width="510" /&gt;&lt;/div&gt;
So you’re designing a logo. It sounds like an easy enough task, right? Draw a circle, type in the company name and you’re done (I’ve literally heard a designer suggest that very process). Unfortunately, if you’re really worth the money the client is paying you, there’s a lot more to it than that.&lt;br /&gt;
There are a million people in the logo design industry today dishing out crappy logos in bulk for crowd sourcing sites. How do you as a serious professional stand out from the crowd and produce quality logos that don’t suck? Read on to find out.&lt;br /&gt;
&lt;span id="more-34940"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2&gt;
1. Use a Visual Double Entendre&lt;/h2&gt;
Some of my favorite logos in the world utilize a technique that I like to call a visual double entendre, which is an overly fancy way to say that it has two pictures wrapped into one through clever interpretation of a concept or idea. &lt;br /&gt;
The &lt;a href="http://logopond.com/gallery/detail/177125"&gt;WinePlace&lt;/a&gt; logo below is a perfect example. &lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;a href="http://logopond.com/gallery/detail/177125"&gt;&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/logotentips-1.jpg" width="510" /&gt;&lt;/a&gt;&lt;/div&gt;
This logo takes on the shape of a thumbtack, which suggests “location” or “place,” but it also clearly looks like an upside down wine glass. Logo designs that use this technique come off as clever and memorable. Viewers love the little mind game that you’re playing and are more prone to appreciate a design because of it.&lt;br /&gt;
In the past, I put together a post of &lt;a href="http://designshack.net/articles/graphics/50-fantastically-clever-logos/"&gt;fifty fantastically clever logos&lt;/a&gt; like the one below. Check it out if you love this type of logo design as much as I do!&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;a href="http://designshack.net/articles/graphics/50-fantastically-clever-logos/"&gt;&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/logotentips-2.jpg" width="510" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h2&gt;
2. Color is Vitally Important&lt;/h2&gt;
One of the most important considerations for logo design is the color palette. This is not a superficial decision, color carries meanings and communicates ideas.&lt;br /&gt;
Sometimes you’re pegged to the colors of a brand, but other times you’ll have the freedom to explore. I love the rich palette used in the &lt;a href="http://logopond.com/gallery/detail/177184"&gt;Zion logo&lt;/a&gt; below.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;a href="http://logopond.com/gallery/detail/177184"&gt;&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/logotentips-3.jpg" width="510" /&gt;&lt;/a&gt;&lt;/div&gt;
The colors here grab you and pull you in, they bring life to the illustration and give further context to the shape of the landscape. That being said, remember that a good logo is versatile and will still function well in grayscale:&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;a href="http://logopond.com/gallery/detail/177184"&gt;&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/logotentips-4.jpg" width="510" /&gt;&lt;/a&gt;&lt;/div&gt;
Beyond a grayscale version, I like to also provide clients with a true single color version, using only black and negative space. This would be a little tricky with the logo above, but definitely possible.&lt;br /&gt;
Always consider what it is that the logo will be used for and whether or not the various use cases require different versions. &lt;br /&gt;
&lt;h2&gt;
3. Avoid the Cliché&lt;/h2&gt;
Every few years or so, some new fads come along in logo design. I personally love to study design trends and you might even find me suggesting jumping onto a few bandwagons to keep up with the times, but with logos I just hate it when a bunch of designers use the same idea over and over. &lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/logotentips-6.jpg" width="510" /&gt;&lt;/div&gt;
The basic archetype above is being used again and again in logo design right now and it’s getting old fast. Why not use a design that you actually thought up yourself rather than ripping off what everyone else is doing?&lt;br /&gt;
&lt;div style="background-color: #eeeeee; border: 1px solid #ccc; color: #4e4e4e; font: italic 20px/30px Georgia, serif; overflow: auto; padding: 20px; width: 470px;"&gt;
“Why not use a design that you actually thought up yourself rather than ripping off what everyone else is doing?”
&lt;/div&gt;
&lt;!-- br--&gt;&lt;br /&gt;
We have an entire article dedicated to showcasing &lt;a href="http://designshack.net/articles/graphics/5-cliche-logo-design-trends-to-avoid/"&gt;logo design clichés&lt;/a&gt;, be sure to check it out to make sure you’re not guilty of uninspired logo design.&lt;br /&gt;
&lt;h2&gt;
4. Make it Ownable&lt;/h2&gt;
I don’t believe that “ownable” is a real word, but you nevertheless hear it quite a bit in marketing (marketers love to make up words). The concept is definitely an important one that ties closely to the previous tip.&lt;br /&gt;
Rather than following the herd and using a cliché design, you should instead strive for something that is uniquely recognizable. I’ve always appreciated the Evernote logo in this regard:&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/logotentips-7.jpg" width="510" /&gt;&lt;/div&gt;
It’s really just an elephant head, which doesn’t sound like a very unique concept. However, the way it’s drawn with the curled trunk and page fold in the ear makes it instantly recognizable. &lt;br /&gt;
As you’re designing logos, consider whether or not your design is generic or unique. Is it likely that others will produce something similar? Remember, your first idea is typically your most generic (it’s also everyone else’s first idea). Try filling a notebook page or two with some rough sketches before choosing which ideas to pursue further. &lt;br /&gt;
&lt;h2&gt;
6. Everybody Loves Custom Type&lt;/h2&gt;
While we’re on the subject of being unique, there’s almost nothing that can give your logo a unique feel quite like some awesome custom lettering. &lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;a href="http://logopond.com/gallery/detail/175991"&gt;&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/logotentips-8.jpg" width="510" /&gt;&lt;/a&gt;&lt;/div&gt;
Too often we see logo design as simply a trip to the font menu to see which typeface makes the company name look best. If someone is paying you to “design” their logo, they probably expect you to put a little more effort into it. &lt;br /&gt;
&lt;div style="background-color: #eeeeee; border: 1px solid #ccc; color: #4e4e4e; font: italic 20px/30px Georgia, serif; overflow: auto; padding: 20px; width: 470px;"&gt;
“Too often we see logo design as simply a trip to the font menu to see which typeface makes the company name look best.”
&lt;/div&gt;
&lt;!-- br--&gt;&lt;br /&gt;
Custom type helps ensure that your unique logo will stay that way. Lowlife designers will rip off your work in a heartbeat if they discover which typeface you’re using, but it takes some real skill to mimic custom hand-drawn type!&lt;br /&gt;
Keep in mind though that if your logo is famous enough, people will always try to rip it off. This certainly holds true for my favorite script logo:&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/logotentips-10.jpg" width="510" /&gt;&lt;/div&gt;
The awesome Coca-Cola script has been stolen countless times in awkward parodies throughout the last few decades. &lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/logotentips-12.jpg" width="510" /&gt;&lt;/div&gt;
&lt;h2&gt;
7. Keep it Simple Stupid&lt;/h2&gt;
Let’s face it, not everyone can bust out beautiful, hand-drawn script on a whim. Just because you’re a designer doesn’t mean you’re an awesome illustrator or typographer (though it helps). If you fit this description, fear not, there’s nothing preventing you from making awesome logos. &lt;br /&gt;
In this situation, remember these four powerful words: keep it simple stupid! Simple but powerful logos permeate the business world and always prove to be the best icons for standing the test of time.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/logotentips-9.jpg" width="510" /&gt;&lt;/div&gt;
In considering how to construct one of these types of logos, let’s discuss the Apple logo. The silhouette of an apple is nothing special or memorable:&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/logotentips-13.jpg" width="510" /&gt;&lt;/div&gt;
It’s that missing bite that takes it to the next level. It gives the logo character, makes it unique, and drives the meaning deeper (computers and bytes, get it?). Without the bite, the apple is boring, with it, the apple is suddenly iconic.&lt;br /&gt;
Always think about how you can go that extra mile and turn your boring logos into unmistakable brand marks. &lt;br /&gt;
&lt;h2&gt;
7. Consider Proportion &amp;amp; Symmetry&lt;/h2&gt;
Some people can get carried away with discussions of proportion and symmetry (see the new Pepsi logo pitch), but if we strip out the crazy, there’s still some important lessons here. Consider the new Twitter logo as an example:&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/larrybird-11.jpg" width="510" /&gt;&lt;/div&gt;
Here circles aren’t used to convince you of some strange cosmic tale that makes no sense, they’re simply used as a guide to create a well balanced logo with consistent curves and arcs.&lt;br /&gt;
Despite the fact that the bite seems to violate the symmetry of the Apple logo above, if we dig deeper we can see that there was still a lot of through put into proportion and symmetry here (&lt;a href="http://www.banskt.com/blog/golden-ratio-in-logo-designs/"&gt;image source&lt;/a&gt;):&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/larrybird-12.jpg" width="510" /&gt;&lt;/div&gt;
&lt;h2&gt;
8. Think About Negative Space&lt;/h2&gt;
Along the same vein as a double entendre is the age old trick of utilizing the negative space in a logo in some clever way. The industry standard example for this technique is the FedEx logo and its hidden arrow.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/logotentips-14.jpg" width="510" /&gt;&lt;/div&gt;
Don’t see it yet? Keep looking, it’s there. That’s what I love about this logo, the use of negative space is so subtle. Most people in the U.S. see the FedEx logo daily or weekly for years as it drives by on the side of countless trucks and they never even notice the arrow. &lt;br /&gt;
&lt;a href="http://logopond.com/gallery/detail/177215"&gt;Logopond&lt;/a&gt; is chock full of great logo designs that utilize negative space in a cool way. Check out the example below, which blends together the idea of bull horns and a wine glass. &lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;a href="http://logopond.com/gallery/detail/177215"&gt;&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/logotentips-15.jpg" width="510" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h2&gt;
9. Passive vs. Active&lt;/h2&gt;
One interesting facet of logo design that I’ve been considering a lot lately is the concept of instilling motion or a sense of activity into a logo. This isn’t always appropriate (such as with the Apple logo), but sometimes it can really give a logo the boost it needs, both from a visual and conceptual standpoint.&lt;br /&gt;
As an example, let’s look again to the Twitter logo. Way back in the early days, the bird went from sitting perched and passive to becoming active and taking flight.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/larrybird-7.jpg" width="510" /&gt;&lt;/div&gt;
In the most recent iteration, they took this concept even further by pointing the bird in an upward direction to indicate that it’s climbing into the air rather than floating along the same old trajectory. &lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/larrybird-3.jpg" width="510" /&gt;&lt;/div&gt;
A sense of motion is especially important when it comes to logos with mascots. The image of the marlin below doesn’t depict the fish merely lying still, instead it’s leaping into the air in a victorious pose.&lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;a href="http://logopond.com/gallery/detail/170140"&gt;&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/logotentips-16.jpg" width="510" /&gt;&lt;/a&gt;&lt;/div&gt;
This concept even extends to typically inanimate objects. Consider how much better the logo below portrays the concept of “rough house” by instilling a sense of motion. &lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;a href="http://logopond.com/gallery/detail/173736"&gt;&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/logotentips-17.jpg" width="510" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h2&gt;
10. Know What it Means&lt;/h2&gt;
Every good logo has a story. Far beyond simply a pretty sketch, strong logos are filled with meaning, both obvious and hidden. We discussed this in several cases above. The FedEx logo’s arrow indicates moving forward and making deliveries, the Apple logo has a “byte” missing, and the Twitter bird is flying in an upward trajectory.&lt;br /&gt;
&lt;div style="background-color: #eeeeee; border: 1px solid #ccc; color: #4e4e4e; font: italic 20px/30px Georgia, serif; overflow: auto; padding: 20px; width: 470px;"&gt;
“It’s great when you as a designer can show a client how much thought and reasoning went into the logo that you produced for them.”
&lt;/div&gt;
&lt;!-- br--&gt;&lt;br /&gt;
Half the time I wonder if logo designers don’t come up with the meaning after the logo is already produced, but regardless, it’s great when you as a designer can show a client how much thought and reasoning went into the logo that you produced for them. &lt;br /&gt;
Clients might think that all they want is something fresh and cool, but if you instead provide a logo that ties into the company’s core values and mission, you’ll blow their minds and they’ll love you for it. &lt;br /&gt;
&lt;div class="tutorialimage"&gt;
&lt;img alt="screenshot" class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/carloso-3.jpg" width="510" /&gt;&lt;/div&gt;
If you’re into hidden logo meanings, check out our post titled “&lt;a href="http://designshack.net/articles/graphics/five-fascinating-things-you-didnt-know-about-famous-car-logos/"&gt;Five Fascinating Things You Didn’t Know About Famous Car Logos&lt;/a&gt;.”&lt;br /&gt;
&lt;h2&gt;
Do Your Logos Suck?&lt;/h2&gt;
Now that you’ve read our tips for designing logos that don’t suck, leave a comment below and let us know what you think of your own work in this area.&lt;br /&gt;
Are you an awesome logo designer or is it something that you struggle with? Which of the tips above are useful to you and what tips can you offer to other designers?&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://kidaworld.blogspot.com/2012/11/10-tips-for-designing-logos-that-dont.html</link><author>noreply@blogger.com (UXAWY)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8363405111659754159.post-140690514082123814</guid><pubDate>Mon, 12 Nov 2012 12:18:00 +0000</pubDate><atom:updated>2012-11-12T04:18:28.870-08:00</atom:updated><title>5 Design Lessons That I Learned</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/critiquelessons-0.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;Here at Design Shack we offer a simple but useful service called a web design critique. It’s basically a consulting service that you can take advantage of for a mad cheap price in exchange for letting us post it on the site as an educational tool. &lt;/p&gt;
&lt;p&gt;I’ve personally written up a whopping &lt;a href="http://designshack.net/category/articles/critique-articles/"&gt;eighty five&lt;/a&gt; of these things thus far (#85 will be posted later this week). That’s a whole lot of design advice! Read on to see what I’ve learned about web design in the process, both from the good examples and the bad.&lt;/p&gt;
&lt;p&gt;&lt;span id="more-34761"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Web Design Critiques&lt;/h2&gt;
&lt;p&gt;When someone submits a page for a critique, I pour over it, make notes about what works well, what could be better and what needs to be fixed immediately. I then write it all up as a web design critique post. &lt;/p&gt;
&lt;div style="overflow: auto; color: #4e4e4e; background-color: #eeeeee; width: 470px; padding: 20px; font: italic 20px/30px Georgia, serif; border: 1px solid #ccc;"&gt;
“I’m actually learning from you guys as much as you are from me!”
&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;It’s obvious that I’m using these critiques as a teaching tool, but what you may have missed is that I’m not strictly teaching, I’m actually learning from you guys as much as you are from me! It’s often that we get a website to critique that is truly fantastic, as I analyze and explain why it’s so great, I’m absorbing techniques, ideas, UI patterns and more.&lt;/p&gt;
&lt;p&gt;After about twenty of these things I noticed that some patterns and trends emerged, advice that I was giving over and over, places where designers tended to be strong and weak, mistakes that are often made. Sixty critiques later and I have lots to say about the areas where most designers need to focus on improving. &lt;/p&gt;
&lt;h2&gt;1. The Three Second Rule&lt;/h2&gt;
&lt;p&gt;If you’ve read a few of the critiques that I’ve written, you’ve probably noticed that I always start with what my first impression tells me about the site. When I load that page into the browser, what I can I tell about the page in the first three seconds?&lt;/p&gt;
&lt;div style="overflow: auto; color: #4e4e4e; background-color: #eeeeee; width: 470px; padding: 20px; font: italic 20px/30px Georgia, serif; border: 1px solid #ccc;"&gt;
“What I can I tell about the page in the first three seconds?”
&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;Three seconds you say? What good is that? The answer is that, as a web browser, it only takes me a few seconds to decide of your site is what I’m looking for, after that I’ve made my decision about whether I’ll move on or explore further. &lt;/p&gt;
&lt;p&gt;For some designers, this brings up a challenge to catch the user’s attention with something flashy to pull them in. This is a good technique, but it may not be appropriate for all design situations. The universal truth here is that I should always, at a bare minimum, know who you are and why your site exists in these first few seconds. &lt;/p&gt;
&lt;p&gt;We saw this done well in &lt;a href="http://designshack.net/articles/critique-articles/web-design-critique-66-matthew-coughlin/"&gt;Design Critique #66&lt;/a&gt; with the site header for IdentyMe.&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;a href="http://designshack.net/articles/critique-articles/web-design-critique-66-matthew-coughlin/"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/critiquelessons-1.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Both the graphics and the messaging here come together to create a crystal clear message that’s readable in an instant: this site allows you to create virtual business cards. &lt;/p&gt;
&lt;p&gt;When we see this done well, it’s hard to imagine how anyone could screw it up, but it’s actually far more often the case that the sites I critique miss the mark in this area with vague messaging. We forget that when we’re close to a project, we can often lose sight of the fact that not everyone knows what it’s all about like we do.&lt;/p&gt;
&lt;p&gt;After a few meetings, you know all about your client’s business and it slips your mind that you have to still explain to everyone else just what the heck “Smith’s Logistics” does and what their website is seeking to accomplish. &lt;/p&gt;
&lt;h2&gt;2. Goal-Oriented Design&lt;/h2&gt;
&lt;p&gt;The second important thing that I learned about web design is that projects are much more successful when they’re approached with a very specific set of goals in mind. The previous lesson was really just an extension of this: one of the major goals of any site is to communicate its own purpose.&lt;/p&gt;
&lt;div style="overflow: auto; color: #4e4e4e; background-color: #eeeeee; width: 470px; padding: 20px; font: italic 20px/30px Georgia, serif; border: 1px solid #ccc;"&gt;
“It’s a lot like being a taxi driver who skips asking the guy in the backseat where he’s going and instead just drives to some random place, hoping he gets it right.”
&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;Far too often, designers just open up Photoshop and start sketching ideas out at random. This is a great creative exercise, but as the primary method of building client sites, it sucks. It’s a lot like being a taxi driver who skips asking the guy in the backseat where he’s going and instead just drives to some random place, hoping he gets it right. &lt;/p&gt;
&lt;p&gt;Instead, what needs to happen is that a very intentional set of goals should be worked out by you and your client regarding what you hope to accomplish with the design. This should happen before you write a single line of code or create a single PSD. &lt;/p&gt;
&lt;p&gt;We saw this idea put into practice very effectively in &lt;a href="http://designshack.net/articles/critique-articles/web-design-critique-61-undead-kit/"&gt;Web Design Critique #61: Undead Kit&lt;/a&gt;. Given that the site was selling a kit meant to help you survive an oncoming zombie apocalypse, there were two obvious subgoals that the site needed to achieve. &lt;/p&gt;
&lt;p&gt;The first was to showcase what exactly was in the case so potential buyers knew what they were getting into:&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/DSCRT-61-4.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;The second subgoal was to explain how buyers would use their kit to survive. Listing the items isn’t enough, people need to see the benefit of these items in practice. &lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.net/wp-content/uploads/DSCRT-61-5.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;As you can see, both of these goals were accomplished through awesome illustrations and simple text descriptions. The designer was still able to goof off and flex his creative muscles, but he did so in a way that led the site in a successful direction.&lt;/p&gt;
&lt;h2&gt;3. Design Trends are Like Wallpaper&lt;/h2&gt;
&lt;p&gt;Picture your grandma’s house. Imagine all of the things in there that indicate that the house is owned by someone who grew up in a different era from your own: the porcelain knick knacks adorning every shelf, the eye-gouging color schemes and of course, the wallpaper. Layer upon layer of wallpaper, a primary (though now fairly antiquated) design element in the room that changed every few years to match the latest trends.&lt;/p&gt;
&lt;div style="overflow: auto; color: #4e4e4e; background-color: #eeeeee; width: 470px; padding: 20px; font: italic 20px/30px Georgia, serif; border: 1px solid #ccc;"&gt;
“If you were to peel away these layers one at a time, you would travel through time.”
&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;The homes owned by various members of my family have surely sacrificed 5% of their square footage to layers of wallpaper madness. If you were to peel away these layers one at a time, you would travel through time and witness various patterns and colors that were once seen as fit to cover a room but were years later scorned as a hideous mistake and replaced with something that would only serve to continue this ceaseless cycle.&lt;/p&gt;
&lt;p&gt;Compared to wallpaper, web design is still in its infancy, but we’ve already come far enough to see that the design trends here operate on the same principles. Grab any design trend that seemed so awesome five years ago and it likely now serves as something that dates a site. &lt;/p&gt;
&lt;p&gt;We saw this in practice with the patterns, textures and bevel effects used on the site from Web Design Critique #74:&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/DSCRT-74-2.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;Here we see what once may have been cutting edge design, but now simply feels like something well past its time. Web designers are fickle beasts and when the mob moves on, you either move with it or get left behind.&lt;/p&gt;
&lt;p&gt;Even if you account for the fact that the site above has an intentionally retro feel, the design still doesn’t work because the way that we pull off retro actually evolves over the years as well!&lt;/p&gt;
&lt;div style="overflow: auto; color: #4e4e4e; background-color: #eeeeee; width: 470px; padding: 20px; font: italic 20px/30px Georgia, serif; border: 1px solid #ccc;"&gt;
“Fashion, television, Hollywood, food, nothing escapes the reach of the trendy.”
&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;You may think that staying up with modern design trends (or setting new ones) is silly, but that’s absolutely not the case. Web design trends evolve as a part of your culture as a whole. Fashion, television, Hollywood, food, nothing escapes the reach of the trendy. Just as workers in all of those industries have to keep up or risk becoming irrelevant, so too do you as a web designer. &lt;/p&gt;
&lt;p&gt;Don’t believe me? Find someone who hasn’t built a website since 1999 and let them design your new portfolio. Odds are, you shutter at the thought. &lt;/p&gt;
&lt;h2&gt;4. Many Web Designers Still Struggle with Typography&lt;/h2&gt;
&lt;p&gt;In the past two or three years, web designers have fully embraced typography. This particular area of design has gone far beyond a trend for many designers and has grown into an obsession. Run a search for “typography” on Pinterest or Dribbble and you’ll see countless examples of amazing typographic art.&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;a href="http://dribbble.com/search?page=3&amp;amp;q=typography"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/critiquelessons-2.jpg" alt="screenshot" width="510"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Combine this with services like Typekit and Google Web Fonts, which bring beautiful custom fonts to the web, and you see an industry that has grown by leaps and bounds in this area in a very brief amount of time. &lt;/p&gt;
&lt;p&gt;That being said, one of the issues that I come across most often in web design is poor typography. This takes many forms: little knowledge of how to effectively combine typefaces, poor choice of fonts, ugly Photoshop kerning, odd sizing, squished line-height, etc. Here’s an example from &lt;a href="http://designshack.net/articles/critique-articles/web-design-critique-73-prezzybox/"&gt;Critique #73&lt;/a&gt;:&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/DSCRT-73-4.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;We may focus our attention on a piece of typographic art for hours on end, but when we’re working on a live project, type is rushed and pushed live without proper preparation or examination. Good print designers cringe at kerning examples like the one above because they know in their industry, there’s no going back. Once it’s printed, you’re done.&lt;/p&gt;
&lt;div style="overflow: auto; color: #4e4e4e; background-color: #eeeeee; width: 470px; padding: 20px; font: italic 20px/30px Georgia, serif; border: 1px solid #ccc;"&gt;
“Good print designers cringe at kerning examples like the one above because they know in their industry, there’s no going back. Once it’s printed, you’re done.”
&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;With web designers, the knowledge that everything can easily be updated at any time can make for sloppy, rushed work. Take the time to get your type right the first time. &lt;/p&gt;
&lt;h2&gt;5. Less is More&lt;/h2&gt;
&lt;p&gt;As I’ve looked through these 85 websites and suggested changes that need to be made, it’s honestly a very rare case where my impression is that the page is too sparse.&lt;/p&gt;
&lt;p&gt;Instead, I’m always struggling to get designers to understand that they’re actually trying too hard to fill up the page. This results in cluttered, text-heavy designs that no one really takes the time to sift through. &lt;/p&gt;
&lt;div style="overflow: auto; color: #4e4e4e; background-color: #eeeeee; width: 470px; padding: 20px; font: italic 20px/30px Georgia, serif; border: 1px solid #ccc;"&gt;
“I’m always struggling to get designers to understand that they’re actually trying too hard to fill up the page.”
&lt;/div&gt;
&lt;p&gt;&lt;!-- br--&gt;&lt;/p&gt;
&lt;p&gt;The web is a fast-paced place. There’s a reason the term is worded “browsing the web” rather than “reading the web.” We jump around quickly from place to place looking for anything that jumps out and holds our attention.&lt;/p&gt;
&lt;p&gt;The things that do so are typically simple and attractive with a few bold statements and/or images that stand out from their surroundings. Pages full of clutter present a case of information overload and we quickly move on.&lt;/p&gt;
&lt;p&gt;Consider the example below from &lt;a href="http://designshack.net/articles/critique-articles/web-design-critique-68-oasis-christian-center/"&gt;Critique #68&lt;/a&gt;:&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/DSCRT-68-10.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;This box isn’t ugly by any means, but it can be made more effective by stripping out most of the text and making adding in a little typographical contrast:&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/DSCRT-68-11.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;Type isn’t the only area where things need to be simplified though. Consider this example from &lt;a href="http://designshack.net/articles/critique-articles/web-design-critique-77-capital-teas/"&gt;Critique #77&lt;/a&gt;:&lt;/p&gt;
&lt;div class="tutorialimage"&gt;&lt;img class="alignNone size-full wp-image-1611" src="http://designshack.co.uk/wp-content/uploads/DSCRT-77-3.jpg" alt="screenshot" width="510"&gt;&lt;/div&gt;
&lt;p&gt;This is a classic example of simply trying to squeeze too much stuff into a small space. We don’t think critically about content organization but instead hit a point where we still have a lot of stuff that needs to be included and no place to put it, so we just cram and the result is ugly, ineffective clutter.&lt;/p&gt;
&lt;h2&gt;What Have You Learned?&lt;/h2&gt;
&lt;p&gt;So there you have it, five lessons that I’ve learned about web design from writing eighty five critiques. Now it’s your turn.&lt;/p&gt;
&lt;p&gt;Do you read our web design critiques? What have you learned from them? How can we make them even better? Leave a comment and let us know.&lt;/p&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://kidaworld.blogspot.com/2012/11/5-design-lessons-that-i-learned.html</link><author>noreply@blogger.com (UXAWY)</author><thr:total>1</thr:total></item></channel></rss>