<?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>610 Design &#187; design</title>
	<atom:link href="http://www.610design.com/category/design/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.610design.com</link>
	<description>Design the code</description>
	<lastBuildDate>Tue, 08 Feb 2011 12:57:15 +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>Best Practices for CSS3</title>
		<link>http://www.610design.com/coding/best-practices-for-css3/</link>
		<comments>http://www.610design.com/coding/best-practices-for-css3/#comments</comments>
		<pubDate>Fri, 28 May 2010 14:14:07 +0000</pubDate>
		<dc:creator>schoey</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[user experience]]></category>
		<category><![CDATA[web-design]]></category>

		<guid isPermaLink="false">http://www.610design.com/?p=391</guid>
		<description><![CDATA[Since CSS3 has become such a big deal in the future-thinking minds of web designers today, I think it would be appropriate for front-end developers to begin formulating some best-practice habits and techniques so that any CSS3 development we do is done right, and we therefore are able to get CSS3 development off to a [...]]]></description>
			<content:encoded><![CDATA[<p>Since CSS3 has become such a big deal in the future-thinking minds of   web designers today, I think it would be appropriate for front-end   developers to begin formulating some best-practice habits and techniques   so that any CSS3 development we do is done right, and we therefore are   able to get CSS3 development off to a good start.</p>
<p>By no means do I assume that everything in this article is etched in   stone and error-free, but I think this will be a good starting point for   this topic, and I will be happy to add to or amend any points that   anyone feels need adjusting or clarification.</p>
<p>Consider this a starting point for discussing best practices for   CSS3, especially since there don&#8217;t seem to be many articles available   yet that exclusively discuss CSS3 best practices.</p>
<h2>Think Progressive Enhancement</h2>
<p>The most accessible and widely-supported websites are those created   with progressive enhancement in mind. Standards proponents have for   years discussed the benefits of accessible, backwards-compatible content   &ndash; specifically in relation to <a href="http://www.impressivewebs.com/ajax-progressive-enhancement/">JavaScript   and Ajax-based websites and applications</a>.</p>
<p>The same principles apply to CSS3 development. Website and app   visuals that are critical to the user experience should not be dependent   on CSS3. CSS3 should be used to enrich and enhance an already   fully-functional experience.</p>
<p>Since CSS3 has now crossed into a <a href="http://www.marcofolio.net/reviews/your_two_cents_css3_animation_and_lazy_loading.html">gray   area of event-driven features</a>, more care needs to be taken to   ensure that non-supporting browsers do not greatly hinder the user   experience.</p>
<h2>Organize and Comment Vendor-Specific Syntax</h2>
<p>Unfortunately, since many CSS3 features are supported with different   proprietary syntaxes, this means that some parts of your CSS code will   become bloated. But you can still keep those areas of your code   organized by inserting comments indicating the browser version that the   code is for, and also by keeping the different lines of code in a   recognizable order with the standard format listed last.</p>
<p>It&#8217;s also best practice to list your CSS3 items last in the CSS   declaration. So, for example, if you&#8217;re rotating an item with CSS3, your   code might look something like this:</p>
<pre class="brush: css; title: ; notranslate">
#rotation {
	float: left;
	width: 200px;
	-webkit-transform: rotate(-5deg); // chrome, safari
	-moz-transform: rotate(-5deg); // firefox
	-o-transform: rotate(-5deg); // opera
	transform: rotate(-5deg);
}
</pre>
<p>In the example above, I don&#8217;t believe the standard syntax is   supported by any browser, but this code just serves as a way to   theoretically demonstrate the method of listing CSS3 properties last,   and the standard property at the end of the declaration. Keeping the   CSS3 properties last will also ensure that any &ldquo;fallback&rdquo; properties are   in their correct place. Which brings us to the next point.</p>
<h2>Use Fallbacks for Background-Related Enhancements</h2>
<p>Some of the new CSS3 features require that the background   property be used. The background property is nothing new   to CSS, but the possible values have been upgraded with CSS3, allowing   use of RGBA, HSLA, gradients and even multiple background images.</p>
<p>In most cases, a non-supporting browser will still display a similar   feature, and the lack of an HSLA or RGBA color will not affect the   result. But with a gradient, you may need to declare an IE-only fallback   in a separate stylesheet, or a background color that it will fall back   to if a gradient is not supported.</p>
<p>So, you might need something like this:</p>
<pre class="brush: css; title: ; notranslate">
#element {
	background-image: url(images/bg-transparent.png);
	background-color: rgba(98, 135, 167, .5);
}
</pre>
<p>In the case of multiple backgrounds, be sure to list the most   important element first, so it serves as the fallback.</p>
<p>For most situations, I don&#8217;t think this particular practice will be   necessary, but it&#8217;s good to keep in mind the possibility that a fallback   color or background image may be needed.</p>
<h2>Use Rotations, Animations &amp; Scaling Sparingly</h2>
<p>Although WebKit-based browsers have opened up some incredible   possibilities with CSS3, we don&#8217;t want to get carried away. Subtle,   tastefully selected events and animations are usually the best choice.</p>
<p>There&#8217;s a reason that Flash intro pages became a tiresome practice;   they were often self-indulgent and pretty pointless, doing nothing but   slowing down the user and making them download more resources than   necessary.</p>
<p>To prevent the web from becoming filled with CSS3 trash, let&#8217;s use   the new features carefully and in a dignified manner that doesn&#8217;t harm   or slow down the user experience.</p>
<h2>Be Careful With Typography</h2>
<p>Making enhancements on text with CSS3 has become more common, and   many sites are now employing the @font-face technique to   use custom fonts.</p>
<p>Make sure that any typography-related enhancements do not affect the   readability of the site. Sometimes, as designers, we take an overall   view of a website&#8217;s layout, and try to make every little detail as   beautiful as possible, but forget the most important thing: That the   content should be accessible and readable.</p>
<p>So, if you&#8217;re considering using shadows, gradients, or transforms on   typographical elements, think twice about it, and strip out any   unnecessary enhancements that cause undue harm to the readability or   accessibility of the site.</p>
<h2>Test in All Browsers With Fallbacks Enabled</h2>
<p>Testing of course is one of the most important parts of successfully   adding enhancements. But the advent of CSS3 features may add more   pressure in this area.</p>
<p>Don&#8217;t be content to just test the enhancements at full-throttle in   the most supportive browsers; test in the non-supporting browsers while   temporarily removing some of the enhancements, maybe one by one, to see   the experience with fallback options enabled.</p>
<p>This makes commenting and organizing code even more important, and   will likely add more quality assurance testing to many design teams&#8217;   schedules.</p>
<h2>What Did I Miss?</h2>
<p>Surely this is not a complete list. Add your comments below if you   feel there are important CSS3 enhancements that require a best practice   method or technique, and I&#8217;ll be happy to add to a few end-points to   this article to round it out.</p>
<p class="source">Source: <a href="http://www.impressivewebs.com" target="_blank">impressivewebs</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.610design.com/coding/best-practices-for-css3/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>5 awesome HTML5 demos</title>
		<link>http://www.610design.com/coding/5-awesome-html5-demos/</link>
		<comments>http://www.610design.com/coding/5-awesome-html5-demos/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 18:21:22 +0000</pubDate>
		<dc:creator>schoey</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[web-design]]></category>

		<guid isPermaLink="false">http://www.610design.com/?p=372</guid>
		<description><![CDATA[You’ve probably seen a bunch of tutorials or articles about HTML5 on design blogs recently, but didn’t try to use it because most users will not be able to view it anyway. Now to motivate you, I compiled a few HTML5 demos that should make you want to start learning this new markup. Be aware [...]]]></description>
			<content:encoded><![CDATA[<p>You’ve probably seen a bunch of tutorials or articles about HTML5 on design blogs recently, but didn’t try to use it because most users will not be able to view it anyway. Now to motivate you, I compiled a few HTML5 demos that should make you want to start learning this new markup.</p>
<p>Be aware that you may not be able to see some of the demos. To know what elements of HTML5 your browser supports, take a look at <a href="http://findmebyip.com/litmus#target-selector" target="_blank">this chart</a>.</p>
<h3>1. <a href="http://apirocks.com/html5/html5.html" target="_blank">APIrocks HTML5 slideshow</a></h3>
<p>If you only have time to watch one of the demos suggested in this article, take a look at this great slideshow by APIrocks. It is not the most spectacular demo in the list, but it gives some cool examples with explanations and code examples.</p>
<h3>2. <a href="http://jilion.com/sublime/video" target="_blank">Sublime Video: a HTML5 video player</a></h3>
<p>Ready to see some videos in your browser with no plugin or flash required? If so go take a look at SublimeVideo. I’m not even mentionning how gorgeous the player is or how cool the full-window functionality is.</p>
<h3>3. <a href="http://www.craftymind.com/2010/04/20/blowing-up-html5-video-and-mapping-it-into-3d-space/" target="_blank">Blowing up HTML5 video</a></h3>
<p>This will probably not only blow a video in your browser, it will also blow your mind. It’s very experimental and hard to see a use for this, but it’s good to see that technical limits will be pushed.</p>
<h3>4. <a href="http://www.benjoffe.com/code/" target="_blank">HTML5 canvas games</a></h3>
<p>The screenshot that you see under this text is taken from the Tetris 3D created in javascript by Ben Joffe using the HTML5 canvas element. Don’t miss his other games and demos, it’s just amazing.</p>
<h3>5. <a href="http://alteredqualia.com/canvasmol/" target="_blank">Canvasmol</a></h3>
<p>Another HTML5 demo using canvas, it shows you some molecules in a rotation.</p>
<h3>And much more</h3>
<p>On the <a href="http://html5demos.com/" target="_blank">HTML5 demo site</a>, go take a look there.</p>
<p class="source">Source: <a href="http://www.designer-daily.com" target="_blank">designer-daily</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.610design.com/coding/5-awesome-html5-demos/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>CSS Techniques I Wish I Knew When I Started Designing Websites</title>
		<link>http://www.610design.com/coding/css-techniques-i-wish-i-knew-when-i-started-designing-websites/</link>
		<comments>http://www.610design.com/coding/css-techniques-i-wish-i-knew-when-i-started-designing-websites/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 11:26:16 +0000</pubDate>
		<dc:creator>schoey</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[resources]]></category>

		<guid isPermaLink="false">http://www.610design.com/?p=343</guid>
		<description><![CDATA[CSS is the best thing to happen to the web since Tim Berners-Lee. It’s simple, powerful, and easy to use. But even with all its simplicity, it hides some important capabilities. Ask any designer, and they’ll tell you that the majority of their code headaches are caused and ultimately solved by CSS. All designers at [...]]]></description>
			<content:encoded><![CDATA[<p><strong>CSS</strong> is the best thing to happen to the web since  Tim Berners-Lee. It’s simple, powerful, and easy to use. But even with  all its simplicity, it hides some important capabilities. Ask any  designer, and they’ll tell you that the majority of their code  headaches are caused and ultimately solved by CSS.</p>
<p>All designers  at some point in their career go through the process of encountering a  weird display issue, searching for a resolution, and discovering a  trick, technique, or hack could have saved them hours of frustration—<em>if they had only known when they started.</em></p>
<p>We’ve  put together a list of the most frustrating and time-consuming CSS  headaches and, more importantly, their solutions (along with examples  and further resources). I hope this list will help you save some gray  hairs. As for me, I think I feel some coming in right now…</p>
<h3>Resets &amp; Browser Inconsistencies</h3>
<p>Not all browsers are created equal. In fact, every browser is different. What is the default margin, padding, or font-size of a &lt;p&gt;  element? You might be surprised at the wide range of values. To handle  the differences between browsers, many of us want to level the playing  field and start from scratch, by using <strong>CSS reset styles</strong>.</p>
<p>The early stages of resets, designers dealt with differing margin and padding values, using a global reset:</p>
<pre class="brush: css; title: ; notranslate">
* { margin: 0; padding: 0; }
</pre>
<p>But,  as more people used and discussed resets, it became clear that  resetting only margin &amp; padding wasn’t enough (and, applying the  above rule to <strong>every element</strong> is taxing on the rendering engine). Thanks to <a target="_blank" href="http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/">the work of Eric Meyer</a> and other CSS pioneers, a better, more complete collection of reset rules was created:</p>
<pre class="brush: css; title: ; notranslate">
html, body, div, span, applet, object, iframe,  h1, h2, h3, h4, h5, h6, p, blockquote, pre,  a, abbr, acronym, address, big, cite, code,  del, dfn, em, font, img, ins, kbd, q, s, samp,  small, strike, strong, sub, sup, tt, var,  dl, dt, dd, ol, ul, li,  fieldset, form, label, legend,  table, caption, tbody, tfoot, thead, tr, th, td {
	margin: 0;
	padding: 0;
	border: 0;
	outline: 0;
	font-weight: inherit;
	font-style: inherit;
	font-size: 100%;
	font-family: inherit;
	vertical-align: baseline;
}

/* remember to define focus styles! */
  :focus {
	outline: 0;
}

body {
	line-height: 1;
	color: black;
	background: white;
}

ol, ul {
	list-style: none;
}

/* tables still need 'cellspacing=&quot;0&quot;' in the markup */
  table {
	border-collapse: separate;
	border-spacing: 0;
}

caption, th, td {
	text-align: left;
	font-weight: normal;
}

blockquote:before, blockquote:after,  q:before, q:after {
	content: &quot;&quot;;
}

blockquote, q {
	quotes: &quot;&quot; &quot;&quot;;
}
  </pre>
<p>As important as it is to note which elements are included in the  most popular CSS reset available today .It’s also important to note  some of the elements that are deliberately excluded from this list:</p>
<ul>
<li>input</li>
<li>button</li>
<li>hr</li>
</ul>
<p>These  elements were excluded because their cross-browser differences are so  vast that you would have to completely unstyle them to create a  &quot;bulletproof&quot; element. They’re so weird, that even then, there’s no  guarantee.</p>
<h4>Resources for Resets</h4>
<ul>
<li><a target="_blank" href="http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/">Eric Meyer’s Resets</a> and the <a target="_blank" href="http://meyerweb.com/eric/thoughts/2007/04/18/reset-reasoning/">reasoning behind them</a></li>
<li><a target="_blank" href="http://www.smashingmagazine.com/2007/09/21/css-frameworks-css-reset-design-from-scratch/">Smashing article: “Design from Scratch”</a></li>
<li><a target="_blank" href="http://code.google.com/p/blueprintcss/">Google BluePrint CSS &amp; Resets</a></li>
<li><a target="_blank" href="http://developer.yahoo.com/yui/reset/">Yahoo YUI CSS Resets</a></li>
</ul>
<h3>Box Model — Margin, Padding &amp; Borders</h3>
<p>The box model is the basis for all layouts. It governs the  dimensions &amp; spacing of the elements on a page. To understand it,  we have to understand the difference between <strong>block-level</strong> elements and <strong>inline</strong> elements.</p>
<p><strong>Block-level</strong> elements, by default, take up the entire width of their containing element and the height of the default <em>line-height</em>.  They will stack up underneath each other, top-to-bottom. Therefore, by  default, they will take up their own line on a page. Some block-level  elements are: &lt;div&gt;, &lt;pre&gt;, &lt;p&gt;, &lt;ul&gt;, &lt;ol&gt;, &lt;li&gt;, etc.</p>
<p><strong>Inline</strong> elements are, just as their name implies, in-line. They will stack up  next to each other, left-to-right. When given content, they will take  up the exact width and height of that content. Given no content, they  will collapse down and have no width or height. Some in-line elements  are: &lt;img&gt;, &lt;em&gt;, &lt;strong&gt;, &lt;a&gt;, &lt;span&gt;, etc.</p>
<p>All HTML <em>block-level elements</em> have five spacing properties: <strong>height</strong>, <strong>width</strong>, <strong>margin</strong>, <strong>padding</strong>, and <strong>border</strong> (inline elements have them too, they just work a bit differently).  Width and height are tricky attributes, as they require a bit of  calculation. When measuring an element’s width, designers must consider <strong>the entire box</strong>.</p>
<p>In the example below, the box  has a total width of 260px. The margin, padding, and border are 30px  each (remember, that’s 30px on top, 30 on bottom, 30 right, and 30  left). So, in this example, the margin takes up 60 pixels of the box’s  width. Likewise, the border and padding consume 60px each. All  together, the margin, border, and padding amount to 180 pixels of the  box’s total width.</p>
<p><a href="http://www.610design.com/wp-content/uploads/2010/04/box-model.png"><img class="aligncenter size-full wp-image-342" title="box-model" src="http://www.610design.com/wp-content/uploads/2010/04/box-model.png" alt="box-model" width="260" height="260" /></a></p>
<p>We know that the box’s total width is 260px, but in CSS the width attribute refers to the <strong>content area</strong> on the inside of the box. So, for this example, we have to subtract 180  pixels (for margin, border, and padding) from 260 (total box width),  leaving us with a content area of 80px. Therefore, our CSS looks like  this:</p>
<pre class="brush: css; title: ; notranslate">
div {
	margin:30px;
	border:30px solid yellow;
	padding:30px;
	width:80px;
	height:80px;
    }
</pre>
<h4>Extras</h4>
<ol>
<li>All of the examples and rules we’re discussed for the width property also apply to height.</li>
<li>margin can support <strong>negative</strong> values. Use them cautiously but they can prove to be very strong design elements.</li>
<li>Don’t forget the <strong>units</strong> with the box model. Only a zero-value (margin:0;) can be written without a unit specified.</li>
</ol>
<h4>Resources for CSS Box Model</h4>
<ul>
<li><a target="_blank" href="http://www.w3.org/TR/CSS2/box.html">W3C CSS Specifications</a></li>
<li><a target="_blank" href="http://www.yourhtmlsource.com/stylesheets/cssspacing.html">HTMLsource Box Model tutorial</a> by Ross Shannon</li>
<li><a target="_blank" href="http://webdesignernotebook.com/css/guide-to-margins-and-paddings/">“Beginner’s Guide to Margins and Paddings”</a> at Web Designer Notebook</li>
</ul>
<h3>Dimensions — Width, Height, Min &amp; Max</h3>
<p>Now  that we understand how to use width and height in unison with the box  model, let’s look at some of the flexibility of CSS dimensions. Modern  browsers support min- and max-width (and the same for height), allowing  us to get creative with dimensions and create flexible layouts.</p>
<p><strong>Width/height</strong> specify the space an object should occupy. They can be measured in pixels (10px), ems (10em) and percentages (10%), as well as <a target="_blank" href="http://htmlhelp.com/reference/css/units.html">a few other units</a>.  Defining a width or height for an element will force that element to  keep those dimensions, regardless of the content inside it. So, if our  content is too big for its container, it will be cut off, hiding the  bottom of our content (or just look really messed up).</p>
<h4>Min-width &amp; min-height</h4>
<p>Giving  an element a min-width or min-height will set the element to our exact  dimension by default. But, since we only provided a minimum dimension,  as the content grows, the containing element will allowed to stretch  and all of our content will remain visible.</p>
<p>Min-width &amp; min-height can he useful for form elements like &lt;input /&gt; and &lt;textarea&gt;. We can define them with a minimum width/height and let them expand as the user types.</p>
<p>In  IE6, &quot;height&quot; acts the same way &quot;min-height&quot; does in modern browsers as  a container will grow with content (something to be aware of when using  building for IE6).</p>
<h4>Max-width &amp; max-height</h4>
<p>If we give  an element a max-width or max-height, it will collapse down to the size  of our content by default. As our content grows, the container will  stretch—until it reaches our maximum. Then our remaining content will  be cut off or look really weird hanging of the bottom of a content  block.</p>
<p>Max-width &amp; max-height can be useful for browsing long lists (if you correctly manage your <strong>overflow</strong> – create scrolling if the list goes too long).</p>
<h4>Using Max &amp; Min width in IE6</h4>
<p><strong>Min &amp; Max width</strong> are both great tools to have in your design arsenal, but unfortunately  they don’t work in IE6, so what do we do? We usually lock down the  width of our site instead of creating the ideal fluid layout we want,  sacrificing user experience for out of date browsers.</p>
<p>Luckily, we can use a short <strong>JavaScript command targetting IE</strong> to accomplish a nice fluid layout with max &amp; min widths in IE6:</p>
<pre class="brush: css; title: ; notranslate">
#page-wrap{
	min-width:800px;
	max-width:1000px;
	width:expression(document.body.clientWidth &lt; 800? &quot;800px&quot; : document.body.clientWidth &gt; 1000? &quot;1000px&quot; : &quot;auto&quot;);
}
</pre>
<p>In the above example, you can see that the smallest width for this  page is 800px, and the largest is 1000px; not much of a flex, but the  concept can be applied to any element.</p>
<p>And if you only wanted to use min-width:</p>
<pre class="brush: css; title: ; notranslate">
#page-wrap{
	min-width:800px;
	width:expression(document.body.clientWidth &lt; 800? &quot;800px&quot;: &quot;auto&quot; );
}
</pre>
<h4>Resources for dimensions</h4>
<ul>
<li><a target="_blank" href="http://articles.sitepoint.com/article/top-ten-css-tricks">Top 10 CSS Tricks from SitePoint</a></li>
<li><a target="_blank" href="http://www.adamkparker.com/2009-04-23/cross-browser-minimum-height-css/">Cross Browser Min-height</a></li>
<li><a target="_blank" href="http://www.cssplay.co.uk/boxes/minwidth.html">Min-width for Internet Explorer</a></li>
<li><a target="_blank" href="http://www.w3schools.com/Css/css_dimension.asp">CSS Dimension Properties</a></li>
</ul>
<h3>Floats &amp; Clearing</h3>
<p>A  float will place an element outside the normal flow of elements and  moves the element right or left until it reaches the margin or padding  of another block-level element. Float and clear are some of the most  powerful—and the most misunderstood—properties in CSS. To understand  it, we must refer back to <strong>block-level</strong> vs. <strong>inline</strong> elements.</p>
<p><strong>Applying float to an element will automatically make it a block-level element.</strong> This means two things: 1) by default, all floated elements (even &lt;span&gt; and &lt;strong&gt;) will behave like block-level elements, 2) Giving an element both float:left; and display:block; is redundant and unnecessary. Also, using display:inline on a floated image is actually a very popular method of fixing many cross-browser quirks.</p>
<h4>Floating a div to clear a div</h4>
<p>Floating  a div to clear a div is one of those things you stumble upon with some  experimenting and frustration. What basically happens is that you can  apply a float to a parent element that contains other floated elements  and they will all equalize and clear properly:</p>
<h5>HTML</h5>
<pre class="brush: xml; title: ; notranslate">
&lt;div class=&quot;parent-element&quot;&gt;
     &lt;div class=&quot;floating-element&quot;&gt;&lt;/div&gt;&lt;!--/.floating-element--&gt;
     &lt;div class=&quot;floating-element&quot;&gt;&lt;/div&gt;&lt;!--/.floating-element--&gt;
     &lt;div class=&quot;floating-element&quot;&gt;&lt;/div&gt;&lt;!--/.floating-element--&gt;
&lt;/div&gt;&lt;!--/.parent-element--&gt;
</pre>
<h5>CSS</h5>
<pre class="brush: css; title: ; notranslate">
.floating-element   { float:left;width:33%; }
.parent-element     { float:left; }
</pre>
<p>And, of course you’ll need some content in there to fill out the divs.</p>
<p>There  are a lot of clearing techniques you can use to clear floated divs.  Some require extra markup, some don’t work in IE 6 and some are great,  but don’t apply to every situation. What did I wish I knew about  clearing floats when I started? <strong>Everything</strong>.</p>
<h4>Resources for clear and float</h4>
<ul>
<li><a target="_blank" href="http://www.smashingmagazine.com/2007/05/01/css-float-theory-things-you-should-know/">CSS Float Theory</a></li>
<li><a target="_blank" href="http://www.w3schools.com/css/pr_class_float.asp">CSS Float Property</a></li>
<li><a target="_blank" href="http://www.quirksmode.org/css/clearing.html">Clearing Floats</a></li>
<li><a target="_blank" href="http://webdesign.about.com/od/advancedcss/a/aa010107.htm">Using Floats for Layout</a></li>
</ul>
<h3>Conditional Comments</h3>
<p>Back in 2004, when I really got into full-time Web design I used a lot of <strong>IE hacks</strong> and techniques to patch together sites in an attempt to achieve some  level of cross browser compatibility. This can cause very bloated and  slow loading style sheets. Everyone was doing it, heck, there were even  articles about how to best organize your IE hacks.</p>
<p>Little by  little the design community discovered a hidden gem buried within the  functionality of the Triton rendering engine (Internet Explorer). You  could use IE specific HTML to target specific versions of the browser  and then load a special style sheet just to deal with those issues.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;!--[if IE]&gt;
Target all versions of IE
&lt;![endif]--&gt;

&lt;!--[if lte IE 7]&gt;
Target all versions of IE that are less than or equal to &quot;7&quot;
&lt;![endif]--&gt;

&lt;!--[if IE 6]&gt;
Target IE 6
&lt;![endif]--&gt;
</pre>
<p>Using conditional comments to target IE and cut out your hacks, will  slim down your main style sheet, and help load the page quicker in  browsers that don’t need the correction code.</p>
<h4>Resources for Conditional Comments</h4>
<ul>
<li><a target="_blank" href="http://www.quirksmode.org/css/condcom.html">Conditional Comments</a></li>
<li><a target="_blank" href="http://www.dedestruct.com/2008/04/03/how-to-css-conditional-comments/">How to: CSS Conditional Comments</a></li>
<li><a target="_blank" href="http://msdn.microsoft.com/en-us/library/ms537512%28VS.85%29.aspx">About Conditional Comments from Microsoft</a></li>
</ul>
<h3>Overflow &amp; Zoom</h3>
<p>Like  many designers, if there’s time to be wasted on a project, it usually  gets wasted dealing with IE 6 and some of it’s weirder quirks. This is  where <strong>overflow</strong> and <strong>zoom</strong> have helped me a great deal.</p>
<h4>Overflow</h4>
<p>Many-a-times when I’ve encountered a serious layout issue, a simple application of overflow:hidden on the offensive div would solve the problem. It’s difficult to pin  point specific issues for this, but it can happen in any browser (I  just had it happen in Safari a couple weeks ago) and the overflow  property can provide a quick solution to your cross browser woes.</p>
<h4>Zoom</h4>
<p>To  my surprise, the zoom property is not very well know, but a very  powerful tool in dealing with cross browser issues; particularly IE  6/7. Zoom is a proprietary IE property that actually does effect the  zoom level of a page (if you set the zoom to 2 you’ll see everything  get bigger). As a site effect it also triggers hasLayout on the  offending element, and fixes a lot of layout issues. Try it out, it  actually saves a lot of time.</p>
<pre class="brush: css; title: ; notranslate">
body { zoom:1; }
</pre>
<p>Since hasLayout won’t trigger in any other browser, it’s generally  thought to be safe to put zoom in your main style sheet, but it you’re  doing IE specific work anyway, I’d advise putting it in with the rest  of the IE CSS just in case there are any problems in the future,  &quot;future proofing&quot;.</p>
<h4>Resources for Overflow &amp; Zoom</h4>
<ul>
<li><a target="_blank" href="http://www.webmasterworld.com/css/3637301.htm">Web Master World Forum</a></li>
<li><a target="_blank" href="http://www.bennadel.com/blog/1354-The-Power-Of-ZOOM-Fixing-CSS-Issues-In-Internet-Explorer.htm">The Power of Zoom</a></li>
<li><a target="_blank" href="http://www.quirksmode.org/css/overflow.html">About Overflow from QuirksMode</a></li>
</ul>
<h3>When CSS isn’t the Answer</h3>
<p>Believe  it or not, CSS is not always the answer. Especially now when we live on  a Web that is in the middle of the biggest browser war to date.  Sometimes CSS just doesn’t do everything we want on as many platforms  as we need it to.</p>
<p>Spending hours searching for a CSS solution to  a non-critical element that can be easily fixed with JavaScript usually  just isn’t worth it. Now that we have great libraries like <a target="_blank" href="http://jquery.com">jQuery</a> readily available to us, anyone well versed in CSS can quickly pick up  JavaScript. And let me tell you… if I new more about JavaScript when I  started it would have saved me a lot of time and frustration.</p>
<h3>Conclusion</h3>
<p>There  are a lot of little idiosyncrasies with CSS that you’ll encounter over  time with experience and frustration, but we’re looking for ways to  minimize that frustration. The best advice I can give someone in  dealing with CSS is the same advice someone gave me when I was in  college: <strong>go to class</strong>. If you read the blogs, keep up  with all the information and learn everything you can you’ll save a lot  of time when you do encounter the inevitable rendering problem. To be  honest, half the battle is knowing what a bug is called so you can <a target="_blank" href="http://www.google.com/search?q=css">Google it</a>.</p>
<p>But of course an article like this always poses the question: <strong>What do you YOU wish you knew when you started?</strong></p>
<p class="source">Source: <a target="_blank" href="http://www.noupe.com">Noupe</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.610design.com/coding/css-techniques-i-wish-i-knew-when-i-started-designing-websites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A guide to CSS Opacity</title>
		<link>http://www.610design.com/coding/a-guide-to-css-opacity/</link>
		<comments>http://www.610design.com/coding/a-guide-to-css-opacity/#comments</comments>
		<pubDate>Thu, 25 Mar 2010 13:37:05 +0000</pubDate>
		<dc:creator>schoey</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[css]]></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&#8217;s been especially frustrating for developers trying to implement opacity (also referred to as CSS transparency) in a cross-browser fashion, because it&#8217;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&#8217;s been especially frustrating for developers trying to implement opacity (also referred to as CSS transparency) in a cross-browser fashion, because it&#8217;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&#8217;s been in use for a number of years now, it has never been, and is currently not a standard property. It&#8217;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 &#8220;opacity&#8221; comes from the word &#8220;opaque&#8221;, which is the opposite of &#8220;transparent&#8221;. The lower the opacity (or &#8220;opaqueness&#8221;), the closer you&#8217;ll be to transparency.</p>
<p>The <code>opacity</code> property can be set to two decimal places, so a value of &#8220;.01&#8243; would be different from a value of &#8220;.02&#8243;, although the visible difference would be very hard to notice. Generally, it&#8217;s best to stick to one decimal place, using values like &#8220;.3&#8243; or &#8220;.7&#8243;.</p>
<h3>CSS Opacity in Internet Explorer</h3>
<p>As usual, Internet Explorer doesn&#8217;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 &#8220;have layout&#8221;. 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 &#8220;4&#8243;, but this is only to correct a problem with the code highlighter; the value should be &#8220;40&#8243;)</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 &#8220;progid&#8221; 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&#8217;t have to worry about an element &#8220;having layout&#8221; 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 &#8220;.4&#8243;. The speed of the animation is set using the value &#8220;1000&#8243;, 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 &#8220;.4&#8243; in the CSS, then you won&#8217;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&#8217;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&#8217;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&#8217; 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&#8217;ve covered the most important facts and code for cross-browser CSS opacity. If I&#8217;ve left out any important information, or made any errors, feel free to comment and I&#8217;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>
]]></content:encoded>
			<wfw:commentRss>http://www.610design.com/coding/a-guide-to-css-opacity/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>HTML5 &amp; CSS3 Tools, Resources And Guides</title>
		<link>http://www.610design.com/design/html5-css3-tools-resources-and-guides/</link>
		<comments>http://www.610design.com/design/html5-css3-tools-resources-and-guides/#comments</comments>
		<pubDate>Thu, 25 Mar 2010 12:00:32 +0000</pubDate>
		<dc:creator>schoey</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[tutorials]]></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&#8217; 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>
]]></content:encoded>
			<wfw:commentRss>http://www.610design.com/design/html5-css3-tools-resources-and-guides/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>10 tips for front-end web developers</title>
		<link>http://www.610design.com/design/10-tips-for-front-end-web-developers/</link>
		<comments>http://www.610design.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[tutorials]]></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>
]]></content:encoded>
			<wfw:commentRss>http://www.610design.com/design/10-tips-for-front-end-web-developers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Pseudo Classes to the Rescue</title>
		<link>http://www.610design.com/coding/pseudo-classes-to-the-rescue/</link>
		<comments>http://www.610design.com/coding/pseudo-classes-to-the-rescue/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 16:02:10 +0000</pubDate>
		<dc:creator>schoey</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[pseudo-class]]></category>
		<category><![CDATA[resources]]></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.610design.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.610design.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 &gt; img {
	float: left;
	}

.post &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>
]]></content:encoded>
			<wfw:commentRss>http://www.610design.com/coding/pseudo-classes-to-the-rescue/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>HTML and CSS Common Mistakes</title>
		<link>http://www.610design.com/coding/html-and-css-common-mistakes/</link>
		<comments>http://www.610design.com/coding/html-and-css-common-mistakes/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 12:19:21 +0000</pubDate>
		<dc:creator>schoey</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[resources]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://www.610design.com/?p=240</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>
]]></content:encoded>
			<wfw:commentRss>http://www.610design.com/coding/html-and-css-common-mistakes/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>CSS: The Box Model, Margin, &amp; Padding</title>
		<link>http://www.610design.com/coding/css-the-box-model-margin-padding/</link>
		<comments>http://www.610design.com/coding/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[coding]]></category>
		<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>
]]></content:encoded>
			<wfw:commentRss>http://www.610design.com/coding/css-the-box-model-margin-padding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Predictable Design &#8211; Subjective?</title>
		<link>http://www.610design.com/design/predictable-design-subjective/</link>
		<comments>http://www.610design.com/design/predictable-design-subjective/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 16: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.610design.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.610design.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>
]]></content:encoded>
			<wfw:commentRss>http://www.610design.com/design/predictable-design-subjective/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

