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

<channel>
	<title>Design the Code</title>
	<atom:link href="http://www.designthecode.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.designthecode.com</link>
	<description>Design is intelligence made visible</description>
	<lastBuildDate>Thu, 01 Apr 2010 13:34:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Create a modern gallery using z-index and jQuery</title>
		<link>http://www.designthecode.com/coding/create-a-modern-gallery-using-z-index-and-jquery/</link>
		<comments>http://www.designthecode.com/coding/create-a-modern-gallery-using-z-index-and-jquery/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 11:42:53 +0000</pubDate>
		<dc:creator>schoey</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[resources]]></category>
		<category><![CDATA[web-design]]></category>

		<guid isPermaLink="false">http://www.designthecode.com/?p=334</guid>
		<description><![CDATA[Introduction In this tutorial we want to create a unique picture gallery utilizing the CSS property z-index. In our example we have the appearance of a pile of pictures, on the next action we put the first picture on the last position and on the previous action we get the picture from the last position [...]]]></description>
			<content:encoded><![CDATA[<h3>Introduction</h3>
<p>In this tutorial we want to create a unique picture gallery utilizing the CSS property <a href="http://www.w3schools.com/Css/pr_pos_z-index.asp">z-index</a>.  In our example we have the appearance of a pile of pictures, on the  next action we put the first picture on the last position and on the  previous action we get the picture from the last position to the first.  All done just by altering the z-index, of course with a animation to  underline the imagination to have a pile of pictures.</p>
<h3>Preparing the xHTML, CSS and Pictures</h3>
<h3>xHTML</h3>
<pre class="brush: xml; title: ; notranslate">
&lt;!-- relevant for the tutorial - start --&gt;
&lt;div class=&quot;grid_6 prefix_1 suffix_1&quot; id=&quot;gallery&quot;&gt;
  &lt;div id=&quot;pictures&quot;&gt;
    &lt;img src=&quot;images/picture1.png&quot; alt=&quot;&quot; /&gt;
    &lt;img src=&quot;images/picture2.png&quot; alt=&quot;&quot; /&gt;
    &lt;img src=&quot;images/picture3.png&quot; alt=&quot;&quot; /&gt;
    &lt;img src=&quot;images/picture4.png&quot; alt=&quot;&quot; /&gt;
    &lt;img src=&quot;images/picture5.png&quot; alt=&quot;&quot; /&gt;
  &lt;/div&gt;

  &lt;div class=&quot;grid_3 alpha&quot; id=&quot;prev&quot;&gt;
    &lt;a href=&quot;#previous&quot;&gt;« Previous Picture&lt;/a&gt;
  &lt;/div&gt;
  &lt;div class=&quot;grid_3 omega&quot; id=&quot;next&quot;&gt;
    &lt;a href=&quot;#next&quot;&gt;Next Picture »&lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- relevant for the tutorial - end --&gt;
</pre>
<p>We have the wrapping container gallery, a container pictures for the  pictures and two controls prev and next for swapping the pictures.</p>
<p>We can add as many pictures as we want because our script will pick them up dynamically.</p>
<p>If the class names of the DIV’s don’t look fimilar to you, they are from the <a href="http://960.gs/">960 Grid System</a> and just there to positioning the blocks. They don’t affect the jQuery code or the functionality of our gallery in any way.</p>
<h3>CSS</h3>
<pre class="brush: css; title: ; notranslate">
/* relevant for the tutorial - start */
#gallery { position: relative; }
  #pictures { position: relative; height: 408px; }
  #pictures img { position: absolute; top: 0; left: 0; }

  #prev, #next { margin-top: 30px; text-align: center; font-size: 2.0em; }
/* relevant for the tutorial - end */
</pre>
<p>The pictures container has relative position (under the heading) and a  height of one picture. The img’s inside of the pictures container have  absolute position. As they are all have a top and left of zero they  overlap each other. The last picture (5) in the markup is on top, and  the first (1) is on last position.</p>
<h3>Pictures</h3>
<p>In the example we use PNG’s, they all are transparent and have the  same height and width. To create the effect of a pile of pictures each  picture has a smooth drop-shadow and is gently rotated in different  directions. I did that manually with Photoshop. If you want to do it  programmatically then server side <a href="http://www.imagemagick.org/script/index.php" target="_blank">Image Magick</a> may help or you have a look at <a href="https://developer.mozilla.org/en/Canvas_tutorial" target="_blank">Canvas</a> (which is pretty fun by the way!).</p>
<h3>The principle of changing z-index</h3>
<p>The z-index will represent the position of a picture, 1 is the last  position and 5 (since we have 5 example pictures) is the top position.</p>
<p>In the next picture action we want to put the first picture to the  last postion, means set z-index to 1. All other pictures’ z-index need  to be increased by one. Former second picture (4) will become the top  picture and so on.</p>
<p>In the previous picture action we want to put the last picture,  means z-index 1, to the first position 5. All other pictures’ z-index  need to be decreased by one. Former top picture (5) will be put on  position 4 and so on.</p>
<h3>The Code</h3>
<pre class="brush: jscript; title: ; notranslate">
$(document).ready(function() { //perform actions when DOM is ready
  var z = 0; //for setting the initial z-index's
  var inAnimation = false; //flag for testing if we are in a animation

  $('#pictures img').each(function() { //set the initial z-index's
    z++; //at the end we have the highest z-index value stored in the z variable
    $(this).css('z-index', z); //apply increased z-index to &lt;img&gt;
  });

  function swapFirstLast(isFirst) {
    if(inAnimation) return false; //if already swapping pictures just return
    else inAnimation = true; //set the flag that we process a image

    var processZindex, direction, newZindex, inDeCrease; //change for previous or next image

    if(isFirst) { processZindex = z; direction = '-'; newZindex = 1; inDeCrease = 1; } //set variables for &quot;next&quot; action
    else { processZindex = 1; direction = ''; newZindex = z; inDeCrease = -1; } //set variables for &quot;previous&quot; action

    $('#pictures img').each(function() { //process each image
      if($(this).css('z-index') == processZindex) { //if its the image we need to process
        $(this).animate({ 'top' : direction + $(this).height() + 'px' }, 'slow', function() { //animate the img above/under the gallery (assuming all pictures are equal height)
          $(this).css('z-index', newZindex) //set new z-index
            .animate({ 'top' : '0' }, 'slow', function() { //animate the image back to its original position
              inAnimation = false; //reset the flag
            });
        });
      } else { //not the image we need to process, only in/de-crease z-index
        $(this).animate({ 'top' : '0' }, 'slow', function() { //make sure to wait swapping the z-index when image is above/under the gallery
          $(this).css('z-index', parseInt($(this).css('z-index')) + inDeCrease); //in/de-crease the z-index by one
        });
      }
    });

    return false; //don't follow the clicked link
  }

  $('#next a').click(function() {
    return swapFirstLast(true); //swap first image to last position
  });

  $('#prev a').click(function() {
    return swapFirstLast(false); //swap last image to first position
  });
});
</pre>
<p>Let’s break that small script into pieces of interest.</p>
<pre class="brush: jscript; title: ; notranslate">
$('#pictures img').each(function() { //set the initial z-index's
  z++; //at the end we have the highest z-index value stored in the z variable
  $(this).css('z-index', z); //apply increased z-index to &lt;img&gt;
});
</pre>
<p>We haven’t set the initial z-index in the markup nor the CSS. To have a  starting point we set the z-index’s via jQuery. The order is just as in  the markup. After finishing looping through all img in the pictures  container we also have the number of pictures and highest z-index value  in the variable z.</p>
<pre class="brush: jscript; title: ; notranslate">
function swapFirstLast(isFirst) {
</pre>
<p>We use the same function for the previous and next action as they are doing basically the same thing.</p>
<pre class="brush: jscript; title: ; notranslate">
if(inAnimation) return false; //if already swapping pictures just return
else inAnimation = true; //set the flag that we process a image
</pre>
<p>We only want to process one picture at a time. The inAnimation flag  determines if we are in a process. If so we just return to the caller  without doing anything, if not we set the flag and go on with the  picture swapping.</p>
<pre class="brush: jscript; title: ; notranslate">
var processZindex, direction, newZindex, inDeCrease; //change for previous or next image

if(isFirst) { processZindex = z; direction = '-'; newZindex = 1; inDeCrease = 1; } //set variables for &quot;next&quot; action
else { processZindex = 1; direction = ''; newZindex = z; inDeCrease = -1; } //set variables for &quot;previous&quot; action
</pre>
<p>As we use one function for two processes we need to set some necessary  variables. processZindex is the position we need to process, either the  first position for the next picture or the last position for the  previous picture. The direction is where a picture will animate while  swapping, either above or under (-) the pile of pictures. The newZindex  will be set to the picture we process, 1 for the last position and the  highest z-index for the first position. Last but not least the variable  inDeCrease tells if the rest of the pictures’ z-index will be increased  (+1 position) or decreased (-1 position) by one.</p>
<pre class="brush: jscript; title: ; notranslate">
$('#pictures img').each(function() { //process each image
</pre>
<p>We loop through all images to check the z-index and alter it.</p>
<pre class="brush: jscript; title: ; notranslate">
if($(this).css('z-index') == processZindex) { //if its the image we need to process
  $(this).animate({ 'top' : direction + $(this).height() + 'px' }, 'slow', function() { //animate the img above/under the gallery (assuming all pictures are equal height)
    $(this).css('z-index', newZindex) //set new z-index
      .animate({ 'top' : '0' }, 'slow', function() { //animate the image back to its original position
        inAnimation = false; //reset the flag
      });
  });
}
</pre>
<p>We check if it’s the image we need to process (either first or last  position). If so we go on and animate the picture either above or under  the rest of the pile of pictures. When finished with this we set the  new z-index to the picture and animate it back in position. When  finished and the picture is back in place we release the inAnimation  flag.</p>
<pre class="brush: jscript; title: ; notranslate">
else { //not the image we need to process, only in/de-crease z-index
  $(this).animate({ 'top' : '0' }, 'slow', function() { //make sure to wait swapping the z-index when image is above/under the gallery
    $(this).css('z-index', parseInt($(this).css('z-index')) + inDeCrease); //in/de-crease the z-index by one
  });
}
</pre>
<p>Here we bind the click event to the prev and next controls. We  return the return value of our function which is always false.  Returning false from that click event means we don’t follow the clicked  link.</p>
<h3>Conclusion</h3>
<p>We created a nice looking gallery with just a few lines of code. Of  course it could be extended with other features (randomness is pretty  kewl: random picture control, slightly random positions each time…) but  you get the idea of how to combine a CSS property and the power of  jQuery. Feel free to change the code to your needs and be so kind to  share it with us in the comments if you like. Every other comment is  welcome as well.</p>
<p><strong><a href="http://www.610design.com/sandbox/z-index/">View Demo on 610 Design</a></strong></p>
<p class="source">Source: 610design.com</p>
<p><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fcoding%2Fcreate-a-modern-gallery-using-z-index-and-jquery%2F&amp;linkname=Create%20a%20modern%20gallery%20using%20z-index%20and%20jQuery" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fcoding%2Fcreate-a-modern-gallery-using-z-index-and-jquery%2F&amp;linkname=Create%20a%20modern%20gallery%20using%20z-index%20and%20jQuery" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fcoding%2Fcreate-a-modern-gallery-using-z-index-and-jquery%2F&amp;linkname=Create%20a%20modern%20gallery%20using%20z-index%20and%20jQuery" title="Digg" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fcoding%2Fcreate-a-modern-gallery-using-z-index-and-jquery%2F&amp;linkname=Create%20a%20modern%20gallery%20using%20z-index%20and%20jQuery" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.designthecode.com%2Fcoding%2Fcreate-a-modern-gallery-using-z-index-and-jquery%2F&amp;title=Create%20a%20modern%20gallery%20using%20z-index%20and%20jQuery" id="wpa2a_2"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.designthecode.com/coding/create-a-modern-gallery-using-z-index-and-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A guide to CSS Opacity</title>
		<link>http://www.designthecode.com/css/a-guide-to-css-opacity/</link>
		<comments>http://www.designthecode.com/css/a-guide-to-css-opacity/#comments</comments>
		<pubDate>Thu, 25 Mar 2010 08:37:05 +0000</pubDate>
		<dc:creator>schoey</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[resources]]></category>

		<guid isPermaLink="false">http://www.610design.com/?p=302</guid>
		<description><![CDATA[CSS opacity has been a bit of a trendy technique for a few years now, and it’s been especially frustrating for developers trying to implement opacity (also referred to as CSS transparency) in a cross-browser fashion, because it’s taken a while for the different browsers to finally agree on settings. There is still not a [...]]]></description>
			<content:encoded><![CDATA[<p>CSS opacity has been a bit of a trendy technique for a few years now, and it’s been especially frustrating for developers trying to implement opacity (also referred to as CSS transparency) in a cross-browser fashion, because it’s taken a while for the different browsers to finally agree on settings. There is still not a universal method to ensure opacity settings work on all currently-used browsers, but things have improved in the last little while.</p>
<p>This reference is going to provide a detailed overview of CSS opacity, along with some code examples and explanations to help you implement this useful CSS technique in your projects equally across all browsers.</p>
<p>One thing that should be noted about CSS opacity is that, although it’s been in use for a number of years now, it has never been, and is currently not a standard property. It’s a non-standard technique that is supposed to be part of the CSS3 specification.</p>
<h3>Old Opacity Settings</h3>
<p>Here are the old opacity settings that were required for older versions of Firefox and Safari:</p>
<pre class="brush: css; title: ; notranslate">
#myElement {
	-khtml-opacity: .5;
	-moz-opacity: 0.5;
}
</pre>
<p>The <code>-khtml-opacity</code> setting was for older versions of the webkit rendering engine, and was necessary in order to get older versions of Safari to work. This proprietary property is now obsolete and is no longer needed unless you know that you have a significant amount of web traffic coming from visitors using Safari 1.x., which is highly unlikely.</p>
<p>The next line uses the proprietary property <code>-moz-opacity</code>, which was aimed at very early versions of the Mozilla rendering engine, and dates back even to Netscape Navigator. Firefox stopped requiring the <code>-moz-opacity</code> property since Firefox 0.9. Firefox 3.5 (now using the Gecko engine) has dropped support for this property.</p>
<h3>CSS Opacity in Firefox, Safari, Chrome, and Opera</h3>
<p>Here is the simplest and most up to date syntax for CSS opacity in all current browsers except Internet Explorer:</p>
<pre class="brush: css; title: ; notranslate">
#myElement {
	opacity: .7;
}
</pre>
<p>The syntax above will set an element to 70% opacity (or 30% transparency). A setting of <code>opacity: 1</code> would make the element opaque, whereas a setting of <code>opacity: 0</code> would make the element completely invisible. This is easy to remember if you keep in mind that the word “opacity” comes from the word “opaque”, which is the opposite of “transparent”. The lower the opacity (or “opaqueness”), the closer you’ll be to transparency.</p>
<p>The <code>opacity</code> property can be set to two decimal places, so a value of “.01″ would be different from a value of “.02″, although the visible difference would be very hard to notice. Generally, it’s best to stick to one decimal place, using values like “.3″ or “.7″.</p>
<h3>CSS Opacity in Internet Explorer</h3>
<p>As usual, Internet Explorer doesn’t play well with others, and since there are currently three different versions of Internet Explorer in common use, the transparency settings are different, and sometimes require additional CSS to get them to work.</p>
<pre class="brush: css; title: ; notranslate">
#myElement {
	filter: alpha(opacity=40);
}
</pre>
<p>The above css uses the proprietary <code>filter</code> property to get transparency to work in Internet Explorer versions 6-8. There is one caveat for IE6 and IE7: In order for the transparency settings to take effect, the element in question needs to “have layout”. An element can be given layout using a number of CSS properties, including <code>width</code> and <code>position</code>. For details on the Microsoft-only <code>hasLayout</code> property, and how to trigger it, <a href="http://reference.sitepoint.com/css/haslayout">see this article</a>.</p>
<p>Another way to set transparency via CSS in Internet Explorer 8 uses the following syntax (note the comments that indicate which versions):</p>
<pre class="brush: css; title: ; notranslate">
#myElement {
	filter: progid:DXImageTransform.Microsoft.Alpha(opacity=40);
	/* first line works in IE6, IE7, and IE8*/
	-ms-filter: &quot;progid:DXImageTransform.Microsoft.Alpha(opacity=4)&quot;;
	/*second line is IE8 only*/
}
</pre>
<p>(note that the second line defines opacity at “4″, but this is only to correct a problem with the code highlighter; the value should be “40″)</p>
<p>The first line will work in all currently-in-use versions of IE, and the second line works only in IE8. Notice the differences between the two lines: In line two, there is a <code>-ms-</code> prefix attached to the <code>filter</code> property, and there are quotations around the entire value declaration, both of which are necessary for that syntax to work.</p>
<p>To be honest, I really have no idea why you would even need either of the “progid” methods, since the filter property works on any element that has layout in all versions of IE using the syntax <code>alpha(opacity=40)</code>, as shown in the first example in this section.</p>
<h3>Setting and Changing CSS Opacity with JavaScript</h3>
<p>You can access the CSS <code>opacity</code> property in JavaScript using the following syntax:</p>
<pre class="brush: jscript; title: ; notranslate">
document.getElementById(&quot;myElement&quot;).style.opacity = &quot;.4&quot;;
// for most browsers
document.getElementById(&quot;myElement&quot;).style.filter = &quot;alpha(opacity=40)&quot;;
// for IE
</pre>
<p>The above lines of code could be used inside of a loop or other dynamic function that alter the values in an incrementing fashion. Of course, you would first identify the client capabilities using <a href="http://www.nczonline.net/blog/2009/12/29/feature-detection-is-not-browser-detection/">feature detection</a> in order to decide which line of code to use.</p>
<h3>Setting and Changing CSS Opacity with jQuery</h3>
<p>Setting CSS opacity directly using jQuery is much more practical and easier to implement, because the code is exactly the same for all browsers, and you don’t have to worry about an element “having layout” in IE:</p>
<pre class="brush: jscript; title: ; notranslate">
$(&quot;#myElement&quot;).css({ opacity: .4 });
// works in all browsers
</pre>
<p>You can also <a href="http://api.jquery.com/animate/">animate the opacity</a> of an element using the following jQuery code:</p>
<pre class="brush: jscript; title: ; notranslate">
$(&quot;#myElement&quot;).animate({
	opacity: .4
	}, 1000, function() {
	// Animation complete; works in all browsers
});
</pre>
<p>Whatever the opacity of the element is when the animation begins, it will animate until it reaches an opacity level of “.4″. The speed of the animation is set using the value “1000″, which is the duration of the animation in milliseconds. The final property listed is an optional callback function that will run some code when the animation is complete.</p>
<p>If the opacity of this element is already set to “.4″ in the CSS, then you won’t notice any difference when the animation runs, so the animated value has to be something significantly different.</p>
<h3>Transparency Through RGBA</h3>
<p>Another CSS3 technique that is supported by a few newer browsers (namely Firefox 3+, Opera 10.1+, Chrome 2+, Safari 3.1+) is setting opacity by means of an alpha channel in RGBA. Here is the syntax:</p>
<pre class="brush: css; title: ; notranslate">
#rgba {
	background: rgba(98, 135, 167, .4);
}
</pre>
<p>In the above declaration, the background is given a color in RGB (the first three numbers), then an alpha setting is given last, to implement transparency on the given color. This alpha setting works the same way as the <code>opacity</code> property, with any number accepted from 0 to 1, up to two decimal places. The higher the number, the closer the color will be to full opacity (opaqueness).</p>
<h3>Transparency Through HSLA</h3>
<p>Similar to the previous declaration, CSS3 also allows the ability to set a color along with an alpha value using HSLA, which represents Hue, Saturation, Lightness, and Alpha. Here is an example of HSLA transparency:</p>
<pre class="brush: css; title: ; notranslate">
#hsla {
	background: hsla(207, 38%, 47%, .4);
}
</pre>
<p>For a further explanation on HSLA colors, see <a href="http://www.w3.org/TR/2003/CR-css3-color-20030514/#hsla-color">this article on W3.org</a>. As is the case with RGBA transparency, the last number represents the transparency setting, and works the same way as RGBA.</p>
<h3>Effects on Validation of CSS</h3>
<p>If you’re using any opacity settings in your CSS, your CSS code <a href="http://jigsaw.w3.org/css-validator/">will not validate</a> according to current W3C standards. Many developers are not as concerned about CSS validation as they are about HTML validation, but it’s something to keep in mind. This can be partially resolved for Microsoft-specific styles by placing them in separate stylesheets using conditional comments, but other browsers’ opacity styles (specifically the <code>opacity</code> property) would still be in your main stylesheet, causing validation errors.</p>
<p>The CSS opacity property is part of the <a href="http://www.w3.org/TR/2008/WD-css3-color-20080721/">CSS Color Module Level 3</a> (which is part of CSS3), and is (as of this writing) in the <a href="http://www.w3.org/Style/CSS/current-work#color">last call</a> phase on the specification track, so although it is well supported, there is still some time before it is an official standard.</p>
<p>I hope I’ve covered the most important facts and code for cross-browser CSS opacity. If I’ve left out any important information, or made any errors, feel free to comment and I’ll gladly make any corrections or additions.</p>
<h3>Resources</h3>
<ul type="disc">
<li><a href="http://www.w3.org/TR/2008/WD-css3-color-20080721/">CSS Color Module Level 3</a></li>
<li><a href="http://www.w3.org/TR/2003/CR-css3-color-20030514/#hsla-color">W3.org</a></li>
<li><a href="http://api.jquery.com/animate/">animate the opacity</a></li>
</ul>
<p><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fcss%2Fa-guide-to-css-opacity%2F&amp;linkname=A%20guide%20to%20CSS%20Opacity" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fcss%2Fa-guide-to-css-opacity%2F&amp;linkname=A%20guide%20to%20CSS%20Opacity" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fcss%2Fa-guide-to-css-opacity%2F&amp;linkname=A%20guide%20to%20CSS%20Opacity" title="Digg" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fcss%2Fa-guide-to-css-opacity%2F&amp;linkname=A%20guide%20to%20CSS%20Opacity" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.designthecode.com%2Fcss%2Fa-guide-to-css-opacity%2F&amp;title=A%20guide%20to%20CSS%20Opacity" id="wpa2a_4"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.designthecode.com/css/a-guide-to-css-opacity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5 &amp; CSS3 Tools, Resources And Guides</title>
		<link>http://www.designthecode.com/css/html5-css3-tools-resources-and-guides/</link>
		<comments>http://www.designthecode.com/css/html5-css3-tools-resources-and-guides/#comments</comments>
		<pubDate>Thu, 25 Mar 2010 07:00:32 +0000</pubDate>
		<dc:creator>schoey</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[resources]]></category>

		<guid isPermaLink="false">http://www.610design.com/?p=296</guid>
		<description><![CDATA[HTML5 and CSS3 are bringing new features to us and in this article you’ll be able to find some great tools, cheat sheets and much more you could need to master these new features. Maybe those new features aren&#8217;t yet supported fully, but it&#8217;s a very good thinking to learn new technologies now so you [...]]]></description>
			<content:encoded><![CDATA[<p>HTML5 and CSS3 are bringing new features to us and in this article you’ll be able to find some great tools, cheat sheets and much more you could need to master these new features.</p>
<p>Maybe those new features aren&#8217;t yet supported fully, but it&#8217;s a very good thinking to learn new technologies now so you would be able to use them fully when they are supported. Be modern designer!</p>
<h3>1. <a href="http://tools.css3.info/selectors-test/test.html" target="_blank">CSS3 Selectors Test</a></h3>
<p>After starting the testsuite it will automatically run a large number of small tests which will determine if your browser is compatible with a large number of CSS selectors. If it is not compatible with a particular selector it is marked as such. You can click on each selector to see the results, including a small example and explaination for each of tests.</p>
<h3>2. <a href="http://css3please.com/" target="_blank">CSS3 Please!</a></h3>
<p>CSS3 Please!, produced by Paul Irish and Jonathon Neal, aims to simplify the design process by allowing designers to enter one value, and have this instantly synced and normalised for each vendor-specific prefix, with the corresponding code generated automatically.</p>
<h3>3. <a href="http://www.css3generator.com/" target="_blank">CSS3 Generator</a></h3>
<p>Allows you to create and costumize multiple CSS3 effects.</p>
<h3>4. <a href="http://westciv.com/tools/transforms/index.html" target="_blank">CSS3 Transforms</a></h3>
<p>You can rotate, scale, skew, and otherwise transform HTML elements with CSS 3. Explore CSS3 CSS Transforms  (supported in Opera 10.5, Firefox 3.5 and Safari 4 and higher).</p>
<h3>5. <a href="http://gradients.glrzad.com/" target="_blank">CSS3 Gradient Generator</a></h3>
<p>The CSS3 Gradient Generator was created as showcase of the power of CSS based gradients as well as a tool for developers and designers to generate a gradient in CSS. CSS gradients generate an image result, meaning the result of a CSS gradient can be used anywhere an image can be used, be it a background-image, mask,border, or list item bullet.</p>
<h3>6. <a href="http://border-radius.com/" target="_blank">Border Radius</a></h3>
<p>Allows you to create rounded edge rectangles.</p>
<h3>7. <a href="http://www.modernizr.com/" target="_blank">Modernizr</a></h3>
<p>Modernizr is a small and simple JavaScript library that helps you take advantage of emerging web technologies (CSS3, HTML 5) while still maintaining a fine level of control over older browsers that may not yet support these new technologies.</p>
<h3>8. <a href="http://www.widgetpad.com/694/" target="_blank">CSS3 Generator</a></h3>
<p>This simple CSS generator helps you to understand capabilities of CSS3 introduced by WebKit.</p>
<h3>9. <a href="http://www.css3.info/preview/" target="_blank">CSS3 Previews</a></h3>
<p>Many new CSS3 feature previews and demos.</p>
<h3>10. <a href="http://www.w3.org/TR/css3-layout/#introduction" target="_blank">CSS Template Layout Module</a></h3>
<p>Learn about popular CSS3 modules and opportunities CSS3 offers.</p>
<h3>11. <a href="http://net.tutsplus.com/tutorials/html-css-techniques/5-techniques-to-acquaint-you-with-css-3/" target="_blank">5 Techniques to Acquaint You With CSS 3</a></h3>
<p>Learn some of the most popular new CSS3 features.</p>
<h3>12. <a href="http://www.webdevout.net/browser-support-css" target="_blank">Web Browser CSS Support</a></h3>
<p>This document is a section of the web browser standards support document. It includes detailed information about CSS support in major web browsers.</p>
<h3>13. <a href="http://labs.thecssninja.com/font_dragr/" target="_blank">Font Drag</a></h3>
<p>Font Dragr is a HTML5/CSS3 powered web app for testing custom web fonts. The app allows you to drag and drop your truetype (ttf), opentype (otf), scalable vector graphics (svg) or Web Open Font Format (WOFF) fonts into the webpage for an instant preview of how the font will be rendered in the browser, you can even edit the example text.</p>
<h3>14. <a href="http://www.smashingmagazine.com/2009/07/13/css-3-cheat-sheet-pdf/" target="_blank">CSS3 Cheat Sheet </a></h3>
<p>Downloadable PDF file containing complete listing of all the properties, selectors types and allowed values in the current CSS 3 specification from the W3C.</p>
<h3>15. <a href="http://sizzlejs.com/" target="_blank">Sizzle</a></h3>
<p>A pure-JavaScript CSS selector engine designed to be easily dropped in to a host library.</p>
<h3>16. <a href="http://www.findmebyip.com/litmus/#target-selector" target="_blank">Web Designers’ Browser Support Checklist</a></h3>
<p>Displays web browser support on HTML5 and CSS3.</p>
<h3>17. <a href="http://www.codenique.com/web_color/css3_color_names.php" target="_blank">CSS3 Color Names</a></h3>
<p>CSS3 supports 147 different colors by name (the 17 standard colors plus 130 more). This lists them all, along with their RGB and hexadecimal values.</p>
<h3>18. <a href="http://woork.blogspot.com/2009/09/html-5-visual-cheat-sheet-by-woork.html" target="_blank">HTML5 Visual Cheat Sheet</a></h3>
<p>HTML 5 Visual Cheat Sheet is an useful cheat sheet for web designers and developers designed by Woork. This cheat sheet is essentially a simple visual grid with a list of all HTML tags and of their related attributes supported by HTML versions 4.01 and/or 5.</p>
<h3>19. <a href="http://html5demos.com/" target="_blank">HTML5 Demos And Previews</a></h3>
<p>You can watch HTML5 demos, new features and check out browser support.</p>
<h3>20. <a href="http://perishablepress.com/press/2009/07/19/power-of-html5-css3/" target="_blank">The Power Of HTML5 and CSS3</a></h3>
<p>Article covering HTML5 and CSS3 combination advantages.</p>
<h3>21. <a href="http://www.smashingmagazine.com/2009/07/06/html-5-cheat-sheet-pdf/" target="_blank">HTML5 Cheat Sheet</a></h3>
<p>HTML5 features and useful info at one place.</p>
<h3>22. <a href="http://html5gallery.com/" target="_blank">HTML5 Gallery</a></h3>
<p>A showcase of sites using HTML5 markup</p>
<p class="source"><a href="http://www.1stwebdesigner.com" target="_blank">Source: 1stwebdesigner</a></p>
<p><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fcss%2Fhtml5-css3-tools-resources-and-guides%2F&amp;linkname=HTML5%20%26%23038%3B%20CSS3%20Tools%2C%20Resources%20And%20Guides" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fcss%2Fhtml5-css3-tools-resources-and-guides%2F&amp;linkname=HTML5%20%26%23038%3B%20CSS3%20Tools%2C%20Resources%20And%20Guides" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fcss%2Fhtml5-css3-tools-resources-and-guides%2F&amp;linkname=HTML5%20%26%23038%3B%20CSS3%20Tools%2C%20Resources%20And%20Guides" title="Digg" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fcss%2Fhtml5-css3-tools-resources-and-guides%2F&amp;linkname=HTML5%20%26%23038%3B%20CSS3%20Tools%2C%20Resources%20And%20Guides" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.designthecode.com%2Fcss%2Fhtml5-css3-tools-resources-and-guides%2F&amp;title=HTML5%20%26%23038%3B%20CSS3%20Tools%2C%20Resources%20And%20Guides" id="wpa2a_6"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.designthecode.com/css/html5-css3-tools-resources-and-guides/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>10 tips for front-end web developers</title>
		<link>http://www.designthecode.com/design/10-tips-for-front-end-web-developers/</link>
		<comments>http://www.designthecode.com/design/10-tips-for-front-end-web-developers/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 11:05:51 +0000</pubDate>
		<dc:creator>schoey</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[elements]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[resources]]></category>
		<category><![CDATA[web-design]]></category>

		<guid isPermaLink="false">http://www.610design.com/?p=267</guid>
		<description><![CDATA[Explain which div you&#8217;re closing Most of the time when I&#8217;m viewing a website source, I see, at the very bottom of the page, an almost endless list of closing &#60;/div&#62; tags. In fact, many beginners think they just have to use divs instead of tables to produce quality code. Divs are cleaners than tables, [...]]]></description>
			<content:encoded><![CDATA[<h3>Explain which div you&#8217;re closing</h3>
<p>Most of the time when I&#8217;m viewing a website source, I see, at the very bottom of the page, an almost endless list of closing <em>&lt;/div&gt;</em> tags. In fact, many beginners think they just have to use divs instead  of tables to produce quality code. Divs are cleaners than tables, but  without proper code organization, it can be as (or even sometimes more)  messy as table based code.</p>
<p>Using indentation is a good start. But  a tip that can definitely make you save lot of time is to comment every  div tag you&#8217;re closing, as shown in the example below:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;div id=&quot;header&quot;&gt;
  &lt;div id=&quot;sub&quot; class=&quot;first left&quot;&gt;
    ...
  &lt;/div&gt;&lt;!-- #sub.first.left --&gt;
&lt;/div&gt;
&lt;p&gt;
  &lt;!-- #header --&gt;
</pre>
<h3>Use a CSS reset</h3>
<p>Unless you&#8217;re a beginner or if you were on  vacation on a desert island for the last 6 years, you might already  know how useful a CSS reset it. Because by default, browsers don&#8217;t  apply the same default styling to HTML elements, a CSS reset will  ensure that all element have no particular style so you can define your  own without the risk of many cross-browser rendering issues.</p>
<p><strong>Source: <a href="http://meyerweb.com/eric/tools/css/reset/index.html" target="_blank">http://meyerweb.com/eric/tools/css/reset/index.html</a></strong></p>
<h3>Don&#8217;t use @import</h3>
<p>CSS files can be included using the  @import directive. This can be useful when, for example, you want to  include a stylesheet into another. Another common practice is to  include CSS file in html documents using the following:</p>
<pre class="brush: css; title: ; notranslate">
&lt;style type=&quot;text/css&gt;
  @import url('a.css');
  @import url('b.css');
&lt;/style&gt;
</pre>
<p>While it works, the @import directive is much slower than the other way to include stylesheets into a html document:</p>
<pre class="brush: css; title: ; notranslate">
&lt;link rel='stylesheet' type='text/css' href='a.css'&gt;
&lt;link rel='stylesheet' type='text/css' href='proxy.css'&gt;
</pre>
<p>It will not make a difference on low traffic websites, but if you have  the chance to own a popular website, don&#8217;t waste your visitor&#8217;s time  using <em>@import</em>.<br />
<strong>Source: <a href="http://www.stevesouders.com/blog/2009/04/09/dont-use-import/">http://www.stevesouders.com/blog/2009/04/09/dont-use-import/</a></strong></p>
<h3>&#8220;Smush&#8221; your images</h3>
<p>Being a developer, I always found that  optimizing my images for the web wasn&#8217;t easy. I tried the good old  &#8220;Save for web&#8221; Photoshop command, but most of the time, I ended up with  images that were either too big or without a sufficient quality.<br />
As  a result, I had the bad habit of using unoptimized images on my  websites. This isn&#8217;t a problem when you don&#8217;t have to care about your  site&#8217;s bandwidth, but after my recent switch on my <a href="http://couponsforbloggers.com/go/vpsnet">vps.net</a> virtual private server, I had to be careful with image sizes.</p>
<p>At this time, I found a very cool tool named <a href="http://www.smush.it">Smush It</a>:  You enter your unoptimized image url, and Smush It will create a  perfectly optimized image for you. You can save up to 70% of the file  size, while keeping the original quality.</p>
<h3>Don&#8217;t mix CSS with HTML</h3>
<p>As  a markup language, the right use of HTML is to organize documents by  defining a header, a footer, lists, blockquotes, etc. Some time ago,  front-end web developers often used now deprecated HTML attributes to  style a particular element.</p>
<p>Nowadays, the <em>style</em> attribute  allows developers to insert CSS directly into a html document. This is  very useful for testing or when you&#8217;re in a hurry. But the <em>style</em> attribute is bad practice, that goes completely against the CSS philosophy.</p>
<p>The following example illustrates how dirty and hard to read a simple line of code can become, with the <em>style</em> attribute:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;a href=&quot;http://www.610design.com&quot; style=&quot;background:#069;padding:3px;font-weight:bold;color:#fff;&quot;&gt;610 Design&lt;/a&gt;
</pre>
<h3>Don&#8217;t mix Javascript with HTML</h3>
<p>Just like mixing your html  code with css is bad practice, you shouldn&#8217;t use any Javascript in your  html documents. The following bad practice illustrates an <em>onclick</em> event:</p>
<pre class="brush: jscript; title: ; notranslate">
&lt;a id=&quot;cwc&quot; href=&quot;http://www.610design.com&quot; onclick=&quot;alert('I love this site!');&quot;&gt;610 design&lt;/a&gt;
</pre>
<p>The same result can be achieved using unobstructed Javascript. In this example, I&#8217;m using the popular jQuery framework:</p>
<pre class="brush: jscript; title: ; notranslate">
$(document).ready(function() {
  $('#cwc').click(function() {
    alert('I love this website');
  });
});
</pre>
<p>This may seems a bit harder at first, especially for beginners; but it  is definitely not, and it will keep your html document clean.</p>
<h3>Use conditional comments</h3>
<p>You know it, IE sucks, and some  clients suck even more by requiring you to create webpages which are  compatible with this obsolete browser. To target specific versions of  IE, you can use the well known IE hacks, as shown below:</p>
<pre class="brush: css; title: ; notranslate">
height: 200px; /* normal browsers */
_height: 300px; /* IE6 */
.height: 250px; /* IE7 */
*height: 350px; /* All IEs */
</pre>
<p>Those hacks are extremely useful sometimes, but they are not the  best way to target a specific version of IE, and it will cause your CSS  validation to fail.</p>
<p>Instead, you should use the conditional comment shown below to target IE6.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;link href=&quot;style.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;

&lt;!--[if lte IE 6]&gt;
  &lt;link href=&quot;ie.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
&lt;![endif]--&gt;
</pre>
<h3>Place Javascript file at the bottom</h3>
<p>A popular practice of the late 90&#8242;s/early 2000&#8242;s was to place Javascript files within the <em>&lt;head&gt;</em> and <em>&lt;/head&gt;</em> tags. The problem is that your javascript files will be loaded first, and consequently your content will be loaded after.</p>
<p>By  placing Javascript files at the bottom of your documents, you&#8217;ll ensure  that JS files will be loaded only when the content has been properly  displayed.</p>
<pre class="brush: xml; title: ; notranslate">
    ...
    &lt;script type='text/javascript' src='jquery.js?ver=1.3.2'&gt;&lt;/script&gt;
  &lt;/body&gt;
&lt;/html&gt;
</pre>
<h3>Use HTML semantically</h3>
<p>HTML is not a programming language. It  is a markup language, used to create structured documents by denoting  structural semantics for text such as headings, paragraphs, lists, and  more.</p>
<p>If you started to create websites in the good old 90&#8242;s or in  the beginning of the century, you know how dirty the markup was at the  time. But happilly, it has evolved.<br />
Among other things, it is  important to use html element semantically. As an example, a navigation  menu should always be an unordered list:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#&quot;&gt;About&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Contact&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Blog&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  </pre>
<h3>Test WHILE you build to avoid cross-browser issues</h3>
<p>One of  the biggest mistake I ever made when developing html, CSS, and  javascript, was not to test my pages on multiple browser while I was  writing them. Instead, I used to write all my code and just view in  Firefox to see how it was rendered.</p>
<p>In theory, this should be good.  But as you know, cross-browser issues are a major problem for front-end  developers, especially due to IE. If you test your documents on  Firefox/IE/Chrome while your writing it, cross-browser rendering  problems will be much easier to fix. I have lost hours not doing it, so  I hope this final tip will help you saving your precious time. To test  on multiple versions of IE, I use <a href="http://spoon.net/browsers/" target="_blank">this very handy tool</a>.</p>
<p class="source">Source: <a href="http://www.catswhocode.com">Cats who code</a></p>
<p><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fdesign%2F10-tips-for-front-end-web-developers%2F&amp;linkname=10%20tips%20for%20front-end%20web%20developers" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fdesign%2F10-tips-for-front-end-web-developers%2F&amp;linkname=10%20tips%20for%20front-end%20web%20developers" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fdesign%2F10-tips-for-front-end-web-developers%2F&amp;linkname=10%20tips%20for%20front-end%20web%20developers" title="Digg" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fdesign%2F10-tips-for-front-end-web-developers%2F&amp;linkname=10%20tips%20for%20front-end%20web%20developers" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.designthecode.com%2Fdesign%2F10-tips-for-front-end-web-developers%2F&amp;title=10%20tips%20for%20front-end%20web%20developers" id="wpa2a_8"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.designthecode.com/design/10-tips-for-front-end-web-developers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pseudo Classes to the Rescue</title>
		<link>http://www.designthecode.com/design/pseudo-classes-to-the-rescue/</link>
		<comments>http://www.designthecode.com/design/pseudo-classes-to-the-rescue/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 16:02:10 +0000</pubDate>
		<dc:creator>schoey</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[pseudo-class]]></category>

		<guid isPermaLink="false">http://www.610design.com/?p=251</guid>
		<description><![CDATA[5 Advanced CSS Pseudo Classes that will Save your Day CSS3 provides powerful pseudo-classes that allow the designer to select multiple elements according to their positions in a document tree. Using these pseudo-classes can be a little confusing at first, but it becomes a lot easier over time to set up your layout. In today&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<h3>5 Advanced CSS Pseudo Classes that will Save your Day</h3>
<p>CSS3 provides powerful pseudo-classes that allow the designer to <strong>select multiple elements according to their positions in a document tree</strong>. Using these pseudo-classes can be a little confusing at first, but it becomes a lot easier over time to set up your layout.</p>
<p>In today&#8217;s article I’m going to take a look at <strong>5 pseudo-classes that will simplify our design process</strong> and reduces a lot of time to create a certain visual effects. You will also find demonstration below each point to demonstrate how we can use these selectors in different design scenario you face everyday in your designing process.</p>
<div id="nth">
<h3>1. The ‘nth-child&#8217; Pseudo-selector</h3>
<p>One of my favorite pseudo-selectors is the <code>nth-child</code>. This can be very useful if you are dealing with a Content Management System where you have no ability to change the server-side code to add classes into the markup.</p>
<p>This pseudo-class matches elements on the basis of their positions within a parent element’s list of child elements. The pseudo-class accepts an argument, <code>N</code>, which can be a keyword or a number. The argument <code>N</code> can also be given as an+b, where a and b are integers (for example, <code>3n+1</code>). For example, if the argument is <strong>3</strong>, the <strong>third</strong> element will be selected.</p>
<h4>How to use the <code>nth-child</code></h4>
<p>If you put simply a number in the parentheses, it will only affect the element associated with that number. For example, here is how to select only the 3rd element:</p>
<pre class="brush: css; title: ; notranslate">
ul li:nth-child(3) {
  background-color: #333;
}
</pre>
<p>Now let&#8217;s look at the table below for Pseudo-class Expressions, the first column of the table represents values for n, and the other columns display the results (for N) of various example expressions.</p>
<p><a href="http://reference.sitepoint.com/css/understandingnthchildexpressions" target="blank"><img src="http://www.designthecode.com/wp-content/uploads/2010/03/nth.jpg" alt="The 'nth-child' Pseudo-selector" /></a></p>
<p>Thus the expression <code>2n+1</code> will match the first, third, fifth, seventh, ninth, and so on, elements if they exist. This can be used to create alternated <code>&lt;li&gt;</code> background color.</p>
<pre class="brush: css; title: ; notranslate">
ul li:nth-child(2n+1) {
  background:#dfe6ec;
  color: #333;
}
</pre>
<p><img src="http://www.designthecode.com/wp-content/uploads/2010/03/nth.png" alt="The 'nth-child' Pseudo-selector" /></p>
<p>Check out our <a href="http://www.610design.com/sandbox/advancedcss-1.html">demo</a>.</p>
<p><strong>Browser Support</strong>:</p>
<p>Internet Explorer has no support at all for the <code>:nth-child</code> pseudo-class. But if you are using jQuery, which supports all CSS selector including :nth-child, the selector will work, even in Internet Explorer.</p>
<h4>Further Resources on how to use the <code>nth-child</code></h4>
<ul>
<li><a href="http://reference.sitepoint.com/css/understandingnthchildexpressions">Understanding :nth-child Pseudo-class Expressions</a></li>
<li><a href="http://css-tricks.com/how-nth-child-works/">How nth-child Works</a></li>
<li><a href="http://24ways.org/2009/cleaner-code-with-css3-selectors">Cleaner Code with CSS3 Selectors</a></li>
</ul>
</div>
<h3>2. The :target pseudo-class</h3>
<p>This pseudo-class affects an element that’s the target of a fragment identifier ( point to a specific element on a page, represented by a “#” and an anchor) in the document’s URL. When we click on a link that ends with a fragment identifier that element we are pointing to becomes the target (hence <code>:target</code>).</p>
<h4>How to use the <code>target</code></h4>
<p>For example, if the URI was <a href="http://www.610design.com/coding/pseudo-classes-to-the-rescue#nth">http://www.610design.com/coding/pseudo-classes-to-the-rescue#nth</a>, the following selector would match the element that had an id attribute of “nth”:</p>
<pre class="brush: css; title: ; notranslate">
div &gt; div:target {
background:#FFC1E4 none repeat scroll 0 0;
border:3px solid #EF4F7A;
padding:10px;
}
</pre>
<p><strong>Browser Support</strong>:</p>
<p>Internet Explorer has no support at all for the <code>:target</code> pseudo-class. Opera doesn’t support this selector when using the back and forward buttons. Other than that, it has support from the other major browsers.</p>
<h4>Further Resources on how to use the <code>target</code></h4>
<ul>
<li>- <a href="http://webdesignernotebook.com/css/the-css3-target-pseudo-class-and-css-animations/">The CSS3 :target Pseudo-class And CSS Animations</a></li>
</ul>
<h3>3. Use the <code>:focus</code> Pseudo Class</h3>
<p>You can apply styling to your input areas and textareas that only takes affect when a user has clicked into that area using the <code>:focus</code> pseudo class. For example, you could change the background and border color on those elements like so:</p>
<pre class="brush: css; title: ; notranslate">
textarea:focus, input:focus {
	background:#FFC1E4;
        border:3px solid #EF4F7A;
}
</pre>
<p><strong>Browser Support</strong>:</p>
<p>Most browsers support the <code>:focus</code> Pseudo Class.</p>
<h3>4. The negation pseudo-class: <code>:not()</code></h3>
<p>The <code>:not()</code> pseudo-class is extremely useful when you want to apply a style to a class or group of elements, and want to exclude some element(s).</p>
<p>The code below selects all div elements that do not have .comment class.</p>
<pre class="brush: css; title: ; notranslate">
div:not(.comment) {
border:1px solid #333
}
</pre>
<p>You can use a comma to choose more than one class. The code below selects all div elements that do not have .comment or .post classes.</p>
<pre class="brush: css; title: ; notranslate">
div:not(.comment, .post) {
border:1px solid #333
}
</pre>
<p><strong>Browser Support</strong>:</p>
<p>The <code>:not()</code> pseudo-class is only supported by modern browsers (Firefox, Safari and Opera), but not internet explorer.</p>
<h3>5. The <code>only-of-type</code> pseudo-class</h3>
<p>The <code>only-of-type</code> pseudo-class matches an element that’s the only child element of its type.</p>
<p>This selector will match an img element that’s the only child img element of its parent element:</p>
<pre class="brush: css; title: ; notranslate">
.post &amp;gt; img {
	float: left;
	}

.post &amp;gt; img:only-of-type {
	float: none;
	margin: 10px;
	}
</pre>
<p><strong>Browser Support</strong>:</p>
<p>The <code>only-of-type</code> pseudo-class is only supported by modern browsers (Firefox, Safari and Opera), but not internet explorer.</p>
<p class="source">Source: http://devsnippets.com</p>
<p><!-- div > div:target { background:#FFC1E4 none repeat scroll 0 0; border:3px solid #EF4F7A; padding:10px; } &#8211;></p>
<p><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fdesign%2Fpseudo-classes-to-the-rescue%2F&amp;linkname=Pseudo%20Classes%20to%20the%20Rescue" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fdesign%2Fpseudo-classes-to-the-rescue%2F&amp;linkname=Pseudo%20Classes%20to%20the%20Rescue" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fdesign%2Fpseudo-classes-to-the-rescue%2F&amp;linkname=Pseudo%20Classes%20to%20the%20Rescue" title="Digg" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fdesign%2Fpseudo-classes-to-the-rescue%2F&amp;linkname=Pseudo%20Classes%20to%20the%20Rescue" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.designthecode.com%2Fdesign%2Fpseudo-classes-to-the-rescue%2F&amp;title=Pseudo%20Classes%20to%20the%20Rescue" id="wpa2a_10"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.designthecode.com/design/pseudo-classes-to-the-rescue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML and CSS Common Mistakes</title>
		<link>http://www.designthecode.com/css/html-and-css-common-mistakes/</link>
		<comments>http://www.designthecode.com/css/html-and-css-common-mistakes/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 18:14:05 +0000</pubDate>
		<dc:creator>schoey</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://www.designthecode.com/?p=33</guid>
		<description><![CDATA[Beginners through advanced coders make mistakes in their HTML and CSS files, either through carelessness or lack of experience. Clean code is very important though and will help further your skills as a developer, as well as save you time in editing later on! It never hurts to review if you’re a skilled developer, many [...]]]></description>
			<content:encoded><![CDATA[<p>Beginners through advanced coders make mistakes in their HTML and CSS files, either through carelessness or lack of experience. Clean code is very important though and will help further your skills as a  developer, as well as save you time in editing later on! It never hurts  to review if you’re a skilled developer, many mistakes are caused by  going too quickly and not practicing good coding skills from the  beginning. Here’s a helpful list of common mistakes and missteps that  I’ve encountered through my own work, as well as working with others.</p>
<h2>HTML Mistakes</h2>
<h3>Forgetting to Close a Tag</h3>
<p>This is very common, especially in beginners. Several tags require  closing tags such as divs, strong tags, and links to name a few. Other  tags require a closing slash to end the line such as an img tag.</p>
<pre class="brush: xml; title: ; notranslate">&lt;div&gt;Text inside the div.&lt;/div&gt;

&lt;img src=&quot;images/imagename.jpg&quot; /&gt; </pre>
<h3>Incorrect DOCTYPE</h3>
<p>HTML requires that you start out the document with the <a href="http://www.w3schools.com/tags/tag_DOCTYPE.asp" target="_blank">correct DOCTYPE declaration</a>.  It needs to be before anything else in the code, starting the document  by declaring what type of HTML you’re using. Here’s the DOCTYPE for  XHTML 1.0 Transitional.</p>
<pre class="brush: css; title: ; notranslate">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
</pre>
<h3>Improperly nesting tags</h3>
<p>It’s very important to open and close tags in the proper order. Once  something (for example a div) has opened, it must close before anything  above it can close. The following is incorrect.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;div&gt;&lt;strong&gt;text&lt;/div&gt;&lt;/strong&gt;
</pre>
<h3>Capitalizing tags</h3>
<p>This is just considered bad practice, but won’t result in your code  not being validated. You should always use lowercase for tags like  divs, links, and images. The following is incorrect.</p>
<pre class="brush: xml; title: ; notranslate">&lt;DIV&gt;&lt;/DIV&gt;</pre>
<h3>Forgetting to open or close quotes</h3>
<p>I’ve seen this a lot in beginners and will result in broken code and  things not functioning properly. HTML requires double quotes that open  and close correctly. Here’s an example of correct usage.</p>
<pre class="brush: xml; title: ; notranslate">&lt;img src=&quot;images/headerimage.jpg&quot; /&gt;</pre>
<h3>Using Inline Styles</h3>
<p>This is another one that is considered bad practice. Inline styles  do work but will result in headaches later on! Items should be styled  globally through an external stylesheet. It will be much easier to edit  and add styles to in the future. An example of inline styles:</p>
<pre class="brush: xml; title: ; notranslate">&lt;a href=&quot;link.html&quot; style=&quot;color: #000; text-decoration: none;&quot;&gt;link name&lt;/a&gt;</pre>
<h3>Not Encoding Special Characters</h3>
<p>Characters like “©” and “&amp;” should be shown with the proper HTML code for the character. <a href="http://rabbit.eng.miami.edu/info/htmlchars.html">Here’s a great list of characters</a> and their HTML counterparts that you should use.</p>
<h3>Confusing Classes and Ids</h3>
<p>Classes are for items that are used more than once on one page. This  can be a link style that you’ll call in multiple times on one page but  doesn’t follow the global link styling. Ids are items that are called  in just once, like the header div. Classes and ids are often overused  and used in unnecessary places as well. Stick to the minimum amount of  classifications that you need.</p>
<h2>CSS</h2>
<h3>Forgetting to Close Things Properly</h3>
<p>Each div or item called in starts with the opening curly bracket and  ends with the closing curly bracket. Each style called in needs to end  with a semicolon. The last declaration within an item doesn’t need a  semicolon, but it’s best to use it in case you plan on adding more  items later on, you may forget to add it back in. An example of proper  use:</p>
<pre class="brush: css; title: ; notranslate">
#divname {
	width: 40px;
	height: 30px;
}
</pre>
<p>Condensing your stylesheet and putting all declarations for a div on  one line is up for debate. I prefer to put each declaration on its own  line, I think it’s easier to edit that way, but some may say that it  just produces longer code.</p>
<h3>Not Using Global Styles</h3>
<p>Many things should be styled globally like paragraph and heading  styles for text as well as link styles. This will reduce the risk of  mistakes and will also cut down on the amount of code in your  stylesheet.</p>
<h3>Not Using Unique Names for Ids and Classes</h3>
<p>It’s very important to choose names that are unique so that it’s  easy to edit later on, and easy to identify in your stylesheet. Name  your divs specific things like #home-left-column which is better than  just #left.</p>
<h3>Not Using Shorthand Code</h3>
<p>Shorthand code is another way to condense your stylesheet, which is  helpful for speeding up user load times as well as finding things when  you’re editing later on. Instead of calling in padding-top, -left,  -bottom, and -right you can just use:</p>
<pre class="brush: css; title: ; notranslate">
padding: 5px 10px 0 10px;
</pre>
<p>Shorthand code can be used for many declarations including: padding, margin, border, and font.</p>
<h3>Not Using Shortened Color Declarations</h3>
<p>Hex numbers that repeat like #ffffff and #000000 can be condensed to  #fff and #000. This is another way to condense your code and keep  things short and easy to look at.</p>
<h3>Incorrectly Using Positioning</h3>
<p><a href="http://www.w3schools.com/Css/css_positioning.asp" target="_blank">Positioning</a> is tough to understand when you’re first starting out with CSS. Your  choices are static, relative, absolute, and fixed. Static is the  default option and is positioned according to the normal page flow. A  relative item is positioned relative to itself, meaning you can move it  up, down, left or right, based on where it would normally sit. Absolute  allows you to place an item anywhere on the page, and is the most  misused positioning statement. The values you set for it will be  relative to the last parent item with relative or absolute, and if  there aren’t any, it defaults back to the html tag, allowing you to  position it anywhere by declaring top left right or bottom values.  Fixed is positioned relative to the browser window, so an item will  stay in place if a user has to scroll. Learning how to use positioning  correctly is important, but shouldn’t be used excessively. I rarely use  these at all in my stylesheets.</p>
<h2>Validate</h2>
<p>Validating your <a href="http://validator.w3.org/" target="_blank">HTML</a> and <a href="http://jigsaw.w3.org/css-validator/" target="_blank">CSS</a> files will help in reducing errors and figuring out where a problem  might be coming from. Your website may function correctly with some of  the common HTML and CSS mistakes, but it doesn’t make it good practice  or valid code. The validator will help identify these problems and  you’ll be able to adjust the way you code for the future.</p>
<p class="source">Source: <a href="http://webdesignledger.com" target="_blank">webdesign ledger</a></p>
<p><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fcss%2Fhtml-and-css-common-mistakes%2F&amp;linkname=HTML%20and%20CSS%20Common%20Mistakes" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fcss%2Fhtml-and-css-common-mistakes%2F&amp;linkname=HTML%20and%20CSS%20Common%20Mistakes" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fcss%2Fhtml-and-css-common-mistakes%2F&amp;linkname=HTML%20and%20CSS%20Common%20Mistakes" title="Digg" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fcss%2Fhtml-and-css-common-mistakes%2F&amp;linkname=HTML%20and%20CSS%20Common%20Mistakes" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.designthecode.com%2Fcss%2Fhtml-and-css-common-mistakes%2F&amp;title=HTML%20and%20CSS%20Common%20Mistakes" id="wpa2a_12"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.designthecode.com/css/html-and-css-common-mistakes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS: The Box Model, Margin, &amp; Padding</title>
		<link>http://www.designthecode.com/design/css-the-box-model-margin-padding/</link>
		<comments>http://www.designthecode.com/design/css-the-box-model-margin-padding/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 18:29:08 +0000</pubDate>
		<dc:creator>schoey</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[user experience]]></category>

		<guid isPermaLink="false">http://www.610design.com/?p=225</guid>
		<description><![CDATA[In the first of the CSS In depth series, we’ll be talking about margins, padding and the box model. Margins and padding are some of the most widely used styles in CSS, but are often the source of frustration in cross-browser compatibility. In this post, we’ll explain the difference between padding and margins, how the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>In the first of the CSS In depth series, we’ll be talking about margins, padding and the box model. Margins and padding are some of the most widely used styles in CSS, but are often the source of frustration in cross-browser compatibility.</strong></p>
<p>In this post, we’ll explain the difference between padding and  margins, how the box model effects browsers and some tips and tricks  dealing with cross-browser issues.</p>
<h3>What are margins?</h3>
<p>Beginning developers often use margins and padding interchangeably, but there’s actually a difference between the two.</p>
<p>Margins are the spaces around an element. In order for margins to  work properly, the element must be floated or positioned relative. This  style is often used to move the element it’s applied to, or to move  other elements around it.</p>
<p>An element can have equal margins on all sides of it, which is simply written as:</p>
<pre class="brush: css; title: ; notranslate">
element { margin: 5px; }
</pre>
<p>This gives an equal 5px to every side of an element. (Every element is a “block” or 4 sided square or rectable, regardless of it’s visible shape.) An element can also have different margins, or no margins at all on some or all of its sides. This can be written in the short-hand or long-hand style:</p>
<pre class="brush: css; title: ; notranslate">
element {margin: 5px 10px 2px 4px;}
/*margin: Top, Right, Bottom, Left*/

element {
	margin-left: 4px;
	margin-right: 10px;
	margin-top: 5px;
	margin-bottom: 2px;
} /*if you don't want margins on a side, just leave it out of your CSS*/
</pre>
<p>There are a few IE issues with margins that probably cause most of all IE layout problems.</p>
<ul>
<li><strong>Double margins</strong> – The double margin bug in IE6 is probably <strong>the</strong> hardest bug developers struggle with. If any element is floated and has a margin in the same direction, IE6 will double that margin. So if you have an element that is floated left and also has a margin of 5px to the left, IE6 will give it a left margin of 10px.</li>
<li><strong>Bottom margins</strong> – All IE versions like to ignore bottom margins, so it’s better to use padding for bottom spacing instead.</li>
</ul>
<h3>What is Padding?</h3>
<p>Like <code>margins</code>, <code>padding </code>is the space around an element. However unlike margins, which deal with the space around the outside of an element, padding can effect either the outside or inside of an element.</p>
<p>Padding can also be written in the shorthand or longhand version of CSS:</p>
<pre class="brush: css; title: ; notranslate">
element {padding: 10px;}

element {padding: 5px 10px 2px 4px;} /*padding: Top, Right, Bottom, Left*/

element {
	padding-left: 4px;
	padding-right: 10px;
	padding-top: 5px;
	padding-bottom: 2px;
} /*if you don't want padding on a side, just leave it out of your CSS*/
</pre>
<p>The way padding is handled in the browser is called the box model. IE6+ (in standards mode), Firefox, Safari and Chrome all handle the calculations of padding the same, while versions of IE5 and lower calculate it completely different.</p>
<p>So how does the box model and padding work? Let’s say the element below is 100px in width and height.</p>
<p>Now, let’s say we give it an equal padding of 10px because we have some nice text inside of it and we don’t want it touching the element’s edges. However as you can see below, the padding didn’t push the text inside the element, it just made the element itself bigger! This is when padding is most similar to margins, as it affects the outside of the element.</p>
<p>This is where the idea of the box model comes in. Adding 10px of padding to an 100px element will increase it’s dimensions to 120px. (100px element + 10px top + 10px bottom = 120px).</p>
<p>So if we wanted to keep the element only 100px in height and width, but push the contents inside the element by 10px, we’d need to adjust the actual dimensions to 80px in height and width. Then our element would look like:</p>
<p>Unlike margins, an element with padding does not need to be floated or positioned relatively for it to work, if it’s dealing with padding on the inside of the element. However, if you’re using padding to move the element (or another element around it), it does need to be floated or positioned.</p>
<p>IE5 and below calculate padding opposite of the rest of the browsers. IE5 simply assumes that when you apply padding, you want it affect the inside of the element. Therefor, if you gave an element of 100px a padding of 10px, it would simply push the inside contents 10px in, so there’s no need to adjust dimensions.</p>
<h3>Plenty of space</h3>
<p>Margins and padding can be tricky when dealing with cross-browser compatibility, but once you get the hang of it, it becomes much easier to anticipate the reactions of browsers.</p>
<p class="source"><a href="http://spyrestudios.com">spy restudios</a></p>
<p><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fdesign%2Fcss-the-box-model-margin-padding%2F&amp;linkname=CSS%3A%20The%20Box%20Model%2C%20Margin%2C%20%26amp%3B%20Padding" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fdesign%2Fcss-the-box-model-margin-padding%2F&amp;linkname=CSS%3A%20The%20Box%20Model%2C%20Margin%2C%20%26amp%3B%20Padding" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fdesign%2Fcss-the-box-model-margin-padding%2F&amp;linkname=CSS%3A%20The%20Box%20Model%2C%20Margin%2C%20%26amp%3B%20Padding" title="Digg" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fdesign%2Fcss-the-box-model-margin-padding%2F&amp;linkname=CSS%3A%20The%20Box%20Model%2C%20Margin%2C%20%26amp%3B%20Padding" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.designthecode.com%2Fdesign%2Fcss-the-box-model-margin-padding%2F&amp;title=CSS%3A%20The%20Box%20Model%2C%20Margin%2C%20%26amp%3B%20Padding" id="wpa2a_14"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.designthecode.com/design/css-the-box-model-margin-padding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learning jQuery: 11 excellent resources</title>
		<link>http://www.designthecode.com/javascript/learning-jquery-11-excellent-resources/</link>
		<comments>http://www.designthecode.com/javascript/learning-jquery-11-excellent-resources/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 18:27:56 +0000</pubDate>
		<dc:creator>schoey</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[designers]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[resources]]></category>

		<guid isPermaLink="false">http://www.610design.com/?p=216</guid>
		<description><![CDATA[Blog posts with tons of jQuery scripts are pretty cool, but you&#8217;ll have to know how to use them first. To be able to use these scripts, you&#8217;ll have to learn jQuery first. For that, here is a list of the best resources for learning how to use the javascript framework. 1. jQuery tutorials This [...]]]></description>
			<content:encoded><![CDATA[<p>Blog posts with tons of jQuery scripts are pretty cool, but you&#8217;ll have to know how to use them first. To be able to use these scripts, you&#8217;ll have to learn jQuery first. For that, here is a list of the best resources for learning how to use the javascript framework.</p>
<h3>1. <a href="http://docs.jquery.com/Tutorials" target="_blank">jQuery tutorials</a></h3>
<p>This is a page that lists a comprehensive list of quality tutorials in several languages, I’ve been learning a lot from there.</p>
<h3>2. <a href="http://docs.jquery.com/Main_Page" target="_blank">jQuery docs</a></h3>
<p>Not for beginners, but this section will let you browse references and find most of the informations that you could need.</p>
<h2>Blogs and websites</h2>
<p>Like for other popular frameworks, jQuery gets some websites dedicated to it. The following websites are great resources for anyone wanting to learn jQuery.</p>
<h3>3. <a href="http://www.learningjquery.com/" target="_blank">Learning jQuery</a></h3>
<p>Multi-author weblog providing jQuery tutorials, demos, and announcements. There is tutorials for all skill levels.</p>
<h3>4. <a href="http://www.jqueryfordesigners.com/" target="_blank">jQuery for Designers</a></h3>
<p>One of my favorite jQuery related resources for visual effects.</p>
<h3>5. <a href="http://www.learnjquerynow.com/" target="_blank">Learn jQuery Now</a></h3>
<p>Lots of great tips and tutorials for the jQuery learner.</p>
<h3>6. <a href="http://blog.themeforest.net/screencasts/jquery-for-absolute-beginners-video-series/" target="_blank">jQuery for absolute beginners video series</a></h3>
<p>If you are starting from scratch, these videos will explain you in details how to do some things with jQuery.</p>
<h3>7. <a href="http://jquery-howto.blogspot.com/" target="_blank">jQuery How-To</a></h3>
<p>A tutorial blog for jQuery, good to follow for great advice.</p>
<h3>8. <a href="http://visualjquery.com/1.1.2.html" target="_blank">Visual jQuery</a></h3>
<p>Not exactly a place to learn jQuery, but I understood a lot about the framework by getting a visual overview of the functions.</p>
<h2>Books about jQuery</h2>
<p>Some people learn better from books, the best advantage of working with it is that you’ll get a better overview and deeper understanding of the topic.</p>
<h3>9. <a href="http://www.amazon.com/gp/product/1933988355?ie=UTF8&amp;tag=desidail-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=1933988355" target="_blank">jQuery in Action</a></h3>
<p>This book introduces you to the jQuery programming model and guides you through the major features and techniques you’ll need to be productive immediately.</p>
<h3>10. <a href="http://www.amazon.com/gp/product/0321647491?ie=UTF8&amp;tag=desidail-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0321647491" target="_blank">jQuery: Visual QuickStart Guide</a></h3>
<p>This book will teach readers how to make the most of jQuery using the task-based, step-by-step, visual format.</p>
<h3>11. <a href="http://www.amazon.com/gp/product/0596159773?ie=UTF8&amp;tag=desidail-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0596159773" target="_blank">jQuery Cookbook</a></h3>
<p>Learn how to add components from the jQuery library to your websites and web applications, with detailed recipes for tasks ranging from basic integration to complex user interface development.</p>
<p class="source">Source: <a href="http://www.designer-daily.com/">Designer Daily</a></p>
<hr /><a rel="attachment wp-att-217" href="http://www.designthecode.com/javascript/learning-jquery-11-excellent-resources/attachment/jquery/"><img class="aligncenter size-full wp-image-217" title="jQuery" src="http://www.designthecode.com/wp-content/uploads/2010/03/jquery.jpg" alt="jQuery" width="630" height="250" /></a></p>
<p><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fjavascript%2Flearning-jquery-11-excellent-resources%2F&amp;linkname=Learning%20jQuery%3A%2011%20excellent%20resources" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fjavascript%2Flearning-jquery-11-excellent-resources%2F&amp;linkname=Learning%20jQuery%3A%2011%20excellent%20resources" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fjavascript%2Flearning-jquery-11-excellent-resources%2F&amp;linkname=Learning%20jQuery%3A%2011%20excellent%20resources" title="Digg" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fjavascript%2Flearning-jquery-11-excellent-resources%2F&amp;linkname=Learning%20jQuery%3A%2011%20excellent%20resources" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.designthecode.com%2Fjavascript%2Flearning-jquery-11-excellent-resources%2F&amp;title=Learning%20jQuery%3A%2011%20excellent%20resources" id="wpa2a_16"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.designthecode.com/javascript/learning-jquery-11-excellent-resources/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS3 Pushing Web Design Into The Future</title>
		<link>http://www.designthecode.com/css/css3-pushing-web-design-into-the-future/</link>
		<comments>http://www.designthecode.com/css/css3-pushing-web-design-into-the-future/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 12:14:32 +0000</pubDate>
		<dc:creator>designthecode</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[CSS3]]></category>

		<guid isPermaLink="false">http://www.designthecode.com/?p=3</guid>
		<description><![CDATA[There are exciting new features in the pipeline for Cascading Style Sheets that will allow for an explosion of creativity in Web design. These features include CSS styling rules that are being released with the upcoming CSS3 specification.]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;"><a rel="attachment wp-att-4" href="http://www.designthecode.com/css/css3-pushing-web-design-into-the-future/attachment/css3selectors/"><img class="size-full wp-image-4 alignnone" title="css3selectors" src="http://www.designthecode.com/wp-content/uploads/2010/03/css3selectors.png" alt="CSS3 Selectors" width="630" height="250" /></a>There are exciting new features in the pipeline for Cascading Style Sheets that will allow for an explosion of creativity in Web design. These features include CSS styling rules that are being released with the upcoming <strong>CSS3 specification</strong>. Realistically, you won’t be able to use these on your everyday client projects for another few years, but for design blogs and websites aimed at the Web design community, these features can help you push the boundaries of modern Web design today, adding that extra spice to your design and helping the industry move forward.<span id="more-3"></span></p>
<p>Here are five techniques snatched from the future that you can put into practice in your website designs today.</p>
<h3>1. Border Radius</h3>
<p>Probably the most common CSS3 feature currently being used is border-radius. Standard HTML block elements are square-shaped with 90-degree corners. The CSS3 styling rule allows rounded corners to be set.</p>
<pre class="brush: css; title: ; notranslate">-moz-border-radius: &lt;span class=&quot;code-green&quot;&gt;20px&lt;/span&gt;;
-webkit-border-radius: &lt;span class=&quot;code-green&quot;&gt;20px;&lt;/span&gt;
border-radius: &lt;span class=&quot;code-green&quot;&gt;20px;&lt;/span&gt;</pre>
<p>Border-radius can also be used to target individual corners, although the syntax for -moz- and -webkit- is slightly different:</p>
<pre class="brush: css; title: ; notranslate">-moz-border-radius-topleft: &lt;span class=&quot;code-green&quot;&gt;20px&lt;/span&gt;;
 -moz-border-radius-topright: &lt;span class=&quot;code-green&quot;&gt;20px&lt;/span&gt;;
 -moz-border-radius-bottomleft: &lt;span class=&quot;code-green&quot;&gt;10px&lt;/span&gt;;
 -moz-border-radius-bottomright: &lt;span class=&quot;code-green&quot;&gt;10px&lt;/span&gt;;
 -webkit-border-top-right-radius: &lt;span class=&quot;code-green&quot;&gt;20px&lt;/span&gt;;
 -webkit-border-top-left-radius: &lt;span class=&quot;code-green&quot;&gt;20px&lt;/span&gt;;
 -webkit-border-bottom-left-radius: &lt;span class=&quot;code-green&quot;&gt;10px&lt;/span&gt;;
 -webkit-border-bottom-right-radius: &lt;span class=&quot;code-green&quot;&gt;10px&lt;/span&gt;;</pre>
<p>Supported in Firefox, Safari and Chrome.</p>
<p>As used by: <a href="http://twitter.com" target="_blank">Twitter</a>.</p>
<p>See also:</p>
<ul>
<li><a href="http://www.w3.org/TR/css3-background/#the-border-radius" target="_blank">W3C Working Draft</a></li>
<li><a href="http://www.css3.info/preview/rounded-border/" target="_blank">Border-radius on CSS3.info</a></li>
<li><a href="http://www.the-art-of-web.com/css/border-radius/" target="_blank">The Art of Web</a></li>
</ul>
<h3>2. Border Image</h3>
<p>Border-image, as the name suggests, allows an image file to be used as the border of an object. The image is first created in relation to each side of an object, where each side of the image corresponds to a side of the HTML object. This is then implemented with the following syntax:</p>
<pre class="brush: css; title: ; notranslate">&lt;span class=&quot;code-element&quot;&gt;border&lt;/span&gt;: &lt;span class=&quot;code-green&quot;&gt;5px solid #cccccc&lt;/span&gt;;
 -webkit-border-image: &lt;span class=&quot;code-green&quot;&gt;url&lt;/span&gt;(/images/border-image.png) &lt;span class=&quot;code-green&quot;&gt;5 repeat&lt;/span&gt;;
 -moz-border-image: &lt;span class=&quot;code-green&quot;&gt;url&lt;/span&gt;(/images/border-image.png) &lt;span class=&quot;code-green&quot;&gt;5 repeat&lt;/span&gt;;
 border-image: &lt;span class=&quot;code-green&quot;&gt;url&lt;/span&gt;(/images/border-image.png) &lt;span class=&quot;code-green&quot;&gt;5 repeat&lt;/span&gt;;</pre>
<p>The <code>{border: 5px}</code> attribute specifies the overall width of the border, and then each border-image rule targets the image file and tells the browser how much of the image to use to fill up that 5px border area.</p>
<p>Border images can also be specified on a per-side basis, allowing for separate images to be used on each of the four sides as well as the four corners:</p>
<pre class="brush: css; title: ; notranslate">border-bottom-right-image
 border-bottom-image
 border-bottom-left-image
 border-left-image
 border-top-left-image
 border-top-image
 border-top-right-image
 border-right-image</pre>
<p>Supported in Firefox 3.1, Safari and Chrome.</p>
<p>As used by: <a href="http://www.blog.spoongraphics.co.uk" target="_blank">Blog.SpoonGraphics</a>.</p>
<p>See also:</p>
<ul>
<li><a href="http://www.w3.org/TR/2002/WD-css3-border-20021107/#the-border-image-uri" target="_blank">W3C Working Draft</a></li>
<li><a href="http://www.css3.info/preview/border-image/" target="_blank">Border-image on CSS3.info</a></li>
<li><a href="http://ejohn.org/blog/border-image-in-firefox/" target="_blank">Border-image in Firefox</a></li>
</ul>
<h3>3. Box Shadow and Text Shadow</h3>
<p>Drop shadows: don’t you just love them?! They can so easily make or break a design. Now, with CSS3, you don’t even need Photoshop! The usage we’ve seen so far has really added to the design, a good example being this year’s <a href="http://24ways.org" target="_blank">24 Ways website</a>.</p>
<pre class="brush: css; title: ; notranslate"> -webkit-box-shadow: &lt;span class=&quot;code-green&quot;&gt;10px 10px 25px #ccc&lt;/span&gt;;
 -moz-box-shadow: &lt;span class=&quot;code-green&quot;&gt;10px 10px 25px #ccc&lt;/span&gt;;
 box-shadow: &lt;span class=&quot;code-green&quot;&gt;10px 10px 25px #ccc&lt;/span&gt;;</pre>
<p>The first two attributes determine the offset of the shadow in relation to the element, in this case, 10 pixels on the x and y axis. The third attribute sets the level of blurriness of the shadow. And finally, the shadow color is set.</p>
<p>Also, the text-shadow attribute is available for use on textual content:</p>
<pre class="brush: css; title: ; notranslate">&lt;span class=&quot;code-element&quot;&gt;text-shadow&lt;/span&gt;: &lt;span class=&quot;code-green&quot;&gt;2px 2px 5px #ccc&lt;/span&gt;;</pre>
<p>Supported in Firefox 3.1, Safari, Chrome (box-shadow only) and Opera (text-shadow only).</p>
<p>As used by: <a href="http://24ways.org" target="_blank">24 Ways</a>.</p>
<p>See also:</p>
<ul>
<li><a href="http://www.w3.org/TR/css3-background/#the-box-shadow" target="_blank">W3C Working Draft</a></li>
<li><a href="http://www.css3.info/preview/box-shadow/" target="_blank">Box-shadow on CSS3.info</a></li>
<li><a href="http://www.w3.org/TR/2003/CR-css3-text-20030514/#text-shadows" target="_blank">W3C Working Draft</a></li>
<li><a href="http://www.css3.info/preview/text-shadow/" target="_blank">Text-shadow on CSS3.info</a></li>
</ul>
<h3>4. Easy Transparency with RGBA and Opacity</h3>
<p>The use of PNG files in Web design has made transparency a key design feature. Now, an alpha value or opacity rule can be specified directly in the CSS.</p>
<pre class="brush: css; title: ; notranslate"> rgba(&lt;span class=&quot;code-green&quot;&gt;200, 54, 54, 0.5&lt;/span&gt;);
 &lt;span class=&quot;code-comment&quot;&gt;/* example: */&lt;/span&gt;
 &lt;span class=&quot;code-element&quot;&gt;background&lt;/span&gt;: rgba(&lt;span class=&quot;code-green&quot;&gt;200, 54, 54, 0.5&lt;/span&gt;);
 &lt;span class=&quot;code-comment&quot;&gt;/* or */&lt;/span&gt;

 &lt;span class=&quot;code-element&quot;&gt;color&lt;/span&gt;: rgba(&lt;span class=&quot;code-green&quot;&gt;200, 54, 54, 0.5&lt;/span&gt;);</pre>
<p>The first three numbers refer to the red, green and blue color channels, and the final value refers to the alpha channel that produces the transparency effect.</p>
<p>Alternatively, with the opacity rule, the color can be specified as usual, with the opacity value set as a separate rule:</p>
<pre class="brush: css; title: ; notranslate">&lt;span class=&quot;code-element&quot;&gt;color&lt;/span&gt;: &lt;span class=&quot;code-green&quot;&gt;#000&lt;/span&gt;;
 opacity: &lt;span class=&quot;code-green&quot;&gt;0.5&lt;/span&gt;;</pre>
<p>Supported in Firefox, Safari, Chrome, Opera (opacity) and IE7 (opacity, with fixes).</p>
<p>As used by: <a href="http://24ways.org" target="_blank">24 Ways</a> (RGBA).</p>
<p>See also:</p>
<ul>
<li><a href="http://www.w3.org/TR/css3-color/#rgba-color" target="_blank">W3C Working Draft</a></li>
<li><a href="http://www.css3.info/preview/rgba/" target="_blank">RGBA on CSS3.info</a></li>
<li><a href="http://www.stevenyork.com/tutorial/pure_css_opacity_and_how_to_have_opaque_children" target="_blank">Pure CSS Opacity</a></li>
</ul>
<h3>5. Custom Web Fonts with @Font-Face</h3>
<p>There has always been a set of safe fonts that can be used on the Web, as you know: Arial, Helvetica, Verdana, Georgia, Comic Sans (ahem…), etc. Now the @font-face CSS3 rule allows fonts to be called from an online directory and used to display text in a whole new light. This does bring up issues of copyright, so there are only a handful of specific fonts that can be used for @font-face embedding.</p>
<p>The styling is put into practice like so:</p>
<pre class="brush: css; title: ; notranslate">@font-face {
 &lt;span class=&quot;code-element&quot;&gt;font-family&lt;/span&gt;:&lt;span class=&quot;code-class&quot;&gt;'Anivers'&lt;/span&gt;;
 &lt;span class=&quot;code-element&quot;&gt;src&lt;/span&gt;: &lt;span class=&quot;code-green&quot;&gt;url&lt;/span&gt;(&lt;span class=&quot;code-class&quot;&gt;'/images/Anivers.otf'&lt;/span&gt;) &lt;span class=&quot;code-green&quot;&gt;format&lt;/span&gt;(&lt;span class=&quot;code-class&quot;&gt;'opentype'&lt;/span&gt;);
 }</pre>
<p>The rest of the font family, containing secondary options, is then called as usual:</p>
<pre class="brush: css; title: ; notranslate">h1 { &lt;span class=&quot;code-element&quot;&gt;font-family&lt;/span&gt;: ‘Anivers’, &lt;span class=&quot;code-gray&quot;&gt;Helvetica&lt;/span&gt;, Sans-&lt;span class=&quot;code-gray&quot;&gt;Serif&lt;/span&gt;;</pre>
<p>Supported in Firefox 3.1, Safari, Opera 10 and IE7 (with <strong>lots</strong> of fixes: if you are brave enough, you can <a href="http://jontangerine.com/log/2008/10/font-face-in-ie-making-web-fonts-work" target="_blank">make font-face work in IE</a> (thanks for heads up, Jon Tan))</p>
<p>As used by: <a href="http://www.taptaptap.com" target="_blank">TapTapTap</a>.</p>
<p>See also:</p>
<ul>
<li><a href="http://www.webfonts.info/wiki/index.php?title=Fonts_available_for_%40font-face_embedding" target="_blank">Fonts available for font-face embedding</a></li>
<li><a href="http://jontangerine.com/log/2008/10/font-face-in-ie-making-web-fonts-work" target="_blank">Font-face in IE, making Web fonts work</a></li>
<li><a href="http://www.alistapart.com/articles/cssatten" target="_blank">Web fonts, the next big thing – A List Apart</a></li>
</ul>
<p>Although CSS3 is still under development, the rules listed here are supported by some browsers right now. <a href="http://www.apple.com/safari/">Safari</a> in particular has extensive support for these new features. Unfortunately, despite being a top-quality browser, Safari has a relatively low number of users, so it is probably not worthwhile adding extra features solely for this group of users. But with Apple’s Mac computers making their way into everyday life, Safari’s usage is likely to continually increase.</p>
<p><a href="http://getfirefox.com/" target="_blank">Firefox</a>, on the other hand, now has a considerably large user base. What’s more, the soon-to-be-released Firefox 3.1 has added support for a range of CSS3 features. Assuming that most users of Firefox will update their browsers, there will soon be a large group of users with support for these new styling rules.</p>
<p><a href="http://www.google.com/chrome" target="_blank">Google Chrome</a> was released this year. Based on the WebKit engine, this browser has much of the same support as Safari. While Safari makes up a good proportion of Mac users, Chrome has burst onto the scene, making up a decent proportion of Windows users.</p>
<p>Percentage-wise, the <a href="http://www.w3schools.com/browsers/browsers_stats.asp" target="_blank">W3’s browser statistics</a> indicate that, as of November 2008, 44.2% of W3School’s users across the Web were browsing with Firefox, 3.1% with Chrome and 2.7% with Safari. That means almost <strong>50% of all Internet users</strong> should be able to view these features. Within the Web design community in particular, which is much more conscious of browser choice, the range of users with CSS3 support is much higher, at <strong>73.6%</strong> (according to the stats at <a href="http://www.blog.spoongraphics.co.uk">Blog.SpoonGraphics</a>).</p>
<h3>6. The downside</h3>
<p>Your website may now have a range of fancy new design features, but there are a few negatives to take into consideration:</p>
<ul>
<li><strong>Internet Explorer</strong>: 46% of Internet users won’t see these features, so don’t use them as a crucial part of the design of your website. Make sure that secondary options are in place, such as a standard border in place of border-image and a normal font in place of @font-face. Please notice that Internet Explorer supports <code>@font-face</code> with EOT (<a href="http://jontangerine.com/log/2008/10/font-face-in-ie-making-web-fonts-work" target="_blank">more details</a>) since v4 (<em>thanks for heads up, Jon Tan</em>).</li>
<li><strong>Invalid style sheets</strong>: These CSS3 features have not been released as a final specification. They are currently implemented with tags that target different browsers. This can invalidate your style sheet.</li>
<li><strong>Extra CSS markup</strong>: Following the last point, having to add a different tag for each browser to specify the same rule, as well as include the standard rule for the final CSS specification, adds a lot of extra code to your CSS markup.</li>
<li><strong>Potentially horrific usage</strong>: Just as is done with traditional Photoshop filters, the use of these new styling features could result in some eye-wrenching designs. Drop shadows in particular ring warning bells for us; we’re not looking forward to seeing the Marketing Department’s choices with that one!</li>
</ul>
<p><a rel="attachment wp-att-4" href="http://www.designthecode.com/css/css3-pushing-web-design-into-the-future/attachment/css3selectors/"><img class="alignnone size-full wp-image-4" title="css3selectors" src="http://www.designthecode.com/wp-content/uploads/2010/03/css3selectors.png" alt="CSS3 Selectors" width="630" height="250" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.designthecode.com/css/css3-pushing-web-design-into-the-future/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Predictable Design &#8211; Subjective?</title>
		<link>http://www.designthecode.com/design/predictable-design-subjective/</link>
		<comments>http://www.designthecode.com/design/predictable-design-subjective/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 11:24:22 +0000</pubDate>
		<dc:creator>schoey</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[elements]]></category>

		<guid isPermaLink="false">http://www.610design.com/?p=194</guid>
		<description><![CDATA[The $64,000 question in software industry today is: How do you transform a software design process into its ideal form—an objective, deliberate activity that furthers the cause of commerce—from its typically subjective, clumsy one, which always seems at odds with the bottom line? Its deceivingly simple answer requires that we overcome some elegant human imperfections. [...]]]></description>
			<content:encoded><![CDATA[<p>The $64,000 question in software industry today is:</p>
<div class="quote">
<h3>How do you transform a software design process into its ideal form—an objective, deliberate activity that furthers the cause of commerce—from its typically subjective, clumsy one, which always seems at odds with the bottom line?</h3>
</div>
<p>Its deceivingly simple answer requires that we overcome some elegant human imperfections. Ironically, the answer came to me from a subculture that has its roots deeply planted in the exploration of the human condition: <em>rap</em>.</p>
<h3>Design&#8217;s Got a Bad Rap</h3>
<p>The early courtship process in a relationship is usually characterized by a healthy curiosity for each other&#8217;s tastes: favorite restaurant, type of food, fit of jeans, color, movie, book, music, and so on. Music is always high on the list. If your experiences have been anything like mine, a conversation about musical preferences can get as contentious as a political or religious debate.</p>
<p>I was a bit of a music snob when my wife and I met. &#8220;After all,&#8221; I would think to myself, &#8220;I&#8217;ve been playing the guitar for the better part of the last two decades; I <em>must</em> be a better judge of music than the everyday listener.&#8221;</p>
<p>So, imagine my plight when my wife (girlfriend at the time) disclosed to me, very proudly and excitedly, that she was into hip-hop and pop, and <em>looooooved</em> Jay-Z, Beyonce, and Usher. My heart sank, but I was determined to &#8220;cure&#8221; her. No love of mine could enjoy to such heathen music.</p>
<p>&#8220;It&#8217;s not <em>real</em> music,&#8221; I explained. &#8220;It&#8217;s <em>exactly</em> what&#8217;s destroying this generation. I can&#8217;t believe you would support such crap.&#8221;</p>
<p>In her unwitting wisdom, she responded, &#8220;That&#8217;s just one way to look at it. I just like the beats and melodies. It makes me want to dance. It&#8217;s fun.&#8221; Blasphemy. The woman I was intending to marry was trying to compromise my values for some… <em>fun?!</em></p>
<p>The crux of her argument (which took me a good couple of years to accept after umpteen discussions) was that people listen to and select music in different ways. There is no <em>right</em> way to select music. In fact, you could argue that at a cognitive level, <em>music selects us</em> for varying reasons: we relate to the artist, the beat inspires us to dance, a particular melody reignites a fond memory, the song was recommended by someone we trust, and so on.</p>
<p>Subjectivity in musical taste tracks closely to our orientation toward <em>design</em>. And I mean &#8220;design&#8221; in the broad sense—inclusive of user experience, visual design, information architecture, and so on—even though it&#8217;s going to peeve some of my peer &#8220;designers&#8221; in the software culture.</p>
<h3>Is the Lemon Really Yellow?</h3>
<p><img src="http://www.designthecode.com/wp-content/uploads/2010/02/lemon.jpg" alt="Lemon, yellow?" align="left" />Sensory experiences—in this context, experiences stimulated by objects or actions that have an inherent aesthetic quality such as music, art, or visual design—are truly subjective. What you sense when you see a color, for instance, can only be accurately described through <em>your</em> sensation of it. Every other account is an approximation at best. It&#8217;s no wonder there is a massive body of literature on the topic of color, which has intrigued everyone from Aristotle to Faust&#8217;s author, <a href="http://en.wikipedia.org/wiki/Goethe" target="_blank">Johann Wolfgang von Goethe</a>.</p>
<p>Goethe was an influential, mid-18th century polymath: a person whose expertise spanned a variety of subjects such as poetry, drama, literature, science, and so on. Among other works, he produced an extensive study titled <em><a href="http://en.wikipedia.org/wiki/Zur_Farbenlehre" target="_blank">Zur Farbenlehre (Theory of Colours)</a></em>, in which he questioned <a href="http://en.wikipedia.org/wiki/Newton_isaac" target="_blank">Newton</a>&#8216;s application of the scientific method to color theory (pg xxxviii).</p>
<p>Physics alone, Goethe argued, couldn&#8217;t sufficiently explain color. To truly understand color, one must look to its softer, cognitive, and often contradictory attributes. Unfortunately, these are not easily quantifiable; as a result, color remains an intriguing topic for exploration even today.</p>
<p><a href="http://www.drawright.com/" target="_blank">Betty Edwards</a>&#8216; book <em><a href="http://www.amazon.com/gp/product/1585422193?ie=UTF8&amp;tag=uxma-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=1585422193" target="_blank">Color: A Course in Mastering the Art of Mixing Colors</a></em> presents a fitting and eloquent observation that affirms Goethe&#8217;s hypothesis even today:</p>
<div class="quote">
<h3>&#8220;Scientists and philosophers have written huge tomes to ponder the question, What is color? This seemingly simple question defies an objective, simple response.&#8221;</h3>
</div>
<p>Fortunately, a scientific understanding of color theory is not a prerequisite for appreciating or applying color evocatively. One need look no further than the <a href="//kuler.adobe.com/" target="_blank">Kuler gallery</a> to see evidence of this.</p>
<p>This is not to say that everyday color enthusiasts are experts at &#8220;painting pretty pixels.&#8221;  But it does suggest two things about the aesthetics of experience design: picking harmonious colors isn&#8217;t a scientific exercise and, more importantly, certain individuals are more proficient at it than others.</p>
<h3>It&#8217;s Not Personal</h3>
<p>Edwards also writes about how our sensations are influenced by cognitive bias. Various brain processes affect our ability to see what is actually there—that is, the true data reflected back to the retina—rather than what our preconceptions tell us we are seeing.</p>
<p><img src="http://www.designthecode.com/wp-content/uploads/2010/02/chairs.jpg" alt="chair sketches" /></p>
<p>Take the phenomenon of <em>size constancy</em>, a neural process that jumbles perception by actually overriding the direct data hitting our retina, causing us to &#8220;see&#8221; images that fit our preexisting notions of the situation. This is the reason some of us &#8220;can&#8217;t draw.&#8221; Even though the retinal image of the chair is exactly as shown in the image on the left, our brains convince us to draw the right image because we <em>know</em> the relative dimensions of the chair.</p>
<p>Our personal conflicts with creative representations—whether music or the visual design of a Web page—are just that: <em>personal</em>. And, as size constancy illustrates, these conflicts are deceiving enough to pass undetected, despite their irrational origins. Of course, problems arise when we pretend that our personal and subjective sensations are objective.</p>
<p>The tendency to assume that our views correspond to reality has its benefits. Evolutionarily, it has helped us quickly interpret the world. We know, for example, that a silhouette of an elephant on the distant horizon <em>is</em> an elephant. But paradoxically, we find this very quality at the root of our disagreements about music and design.</p>
<div class="quote">
<h3>&#8220;The Brilliance of a good designer is not defined by their ability to represent the world as they sees it, but by their trained ability to represent it as others expect to see it.&#8221;</h3>
</div>
<p>Ultimately, it&#8217;s this same predisposition that leads us to question our creative counterparts&#8217; aesthetic talents and irrationally promote our own views as fact.</p>
<p>In a sense, you could say that the brilliance of a good designer is not defined by her ability to represent the world as she sees it, but by her <em>trained</em> ability to represent it as others expect to see it.</p>
<p>Again, certain individuals are more proficient at it than others.</p>
<h3>Is Design Subjective?</h3>
<p>We&#8217;ve all heard that <em>design is subjective</em> and that &#8220;beauty lies in the eye of the beholder.&#8221; Unfortunately, we often misinterpret these aphorisms and use them to rationalize why we don&#8217;t like certain designs. When someone argues that our reasoning is faulty, it ruffles our feathers.</p>
<p>Another (redundant) way of putting the point is to say that design is subjective from the perspective of the <em>subject</em> (the beholder). From the perspective of the designer, however, design is as objective as anything else. A designer feels that his product is deterministic—no different from a line of code.</p>
<p>Good designers have an acute, trained, and almost instinctual ability to communicate with an audience through their products. Great designers are so objective that what they produce may not even remotely resemble their personal tastes and intuitions.</p>
<h3>It&#8217;s Time to Grow up</h3>
<p>For a design process to produce an extraordinary product, two conditions must be met: stakeholders and participants must unequivocally accept that they aren&#8217;t designers, <strong>and</strong> trust the <em>real</em> designers&#8217; abilities. This of course requires that the real designers are good at what they do. Bill Buxton provides a great template for identifying good designers.</p>
<p>Simple as this recipe seems, few get it right. <a href="http://www.ewherry.com/" target="_blank">Elaine Wherry</a> of <a href="http://www.meebo.com/" target="_blank">Meebo</a> recently wrote a piece on why UX professionals are some of the most professionally unhappy folks she&#8217;s encountered. Doug Bowman&#8217;s <a href="http://stopdesign.com/archive/2009/03/20/goodbye-google.html" target="_blank">legendary goodbye letter to Google</a> tragically confirms some of her observations. Clearly, our industry is not there yet. But we must persevere, for the rewards are rich.</p>
<p>A good understanding of a designer&#8217;s process naturally encourages other behaviors integral to designing good products. It allows clients to let designers do their work without telling them how to do it. It makes it easier for designers to measure their work objectively, not relative to their clients&#8217; personal (and often limited) understanding of the context. It improves how designers and other participants collaborate. It streamlines the design process with an undying focus on the customer experience. It frees up team members to focus on their core areas.</p>
<p>Ultimately, it is this simple recipe of acceptance that transforms a design process into its ideal form—an objective, deliberate activity that furthers the cause of commerce—from its typically subjective, clumsy one, which always seems at odds with the bottom line.</p>
<p><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fdesign%2Fpredictable-design-subjective%2F&amp;linkname=Predictable%20Design%20%26%238211%3B%20Subjective%3F" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fdesign%2Fpredictable-design-subjective%2F&amp;linkname=Predictable%20Design%20%26%238211%3B%20Subjective%3F" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fdesign%2Fpredictable-design-subjective%2F&amp;linkname=Predictable%20Design%20%26%238211%3B%20Subjective%3F" title="Digg" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.designthecode.com%2Fdesign%2Fpredictable-design-subjective%2F&amp;linkname=Predictable%20Design%20%26%238211%3B%20Subjective%3F" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.designthecode.com%2Fdesign%2Fpredictable-design-subjective%2F&amp;title=Predictable%20Design%20%26%238211%3B%20Subjective%3F" id="wpa2a_18"><img src="http://www.designthecode.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.designthecode.com/design/predictable-design-subjective/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

