<?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>Webdesigner Depot &#187; Programming</title> <atom:link href="http://www.webdesignerdepot.com/category/programming/feed/" rel="self" type="application/rss+xml" /><link>http://www.webdesignerdepot.com</link> <description>Web Design Resources and Tutorials</description> <lastBuildDate>Thu, 02 Sep 2010 10:30:55 +0000</lastBuildDate> <generator>http://wordpress.org/?v=abc</generator> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Fight Div-itis and Class-itis With the 960 Grid System</title><link>http://www.webdesignerdepot.com/2010/03/fight-div-itis-and-class-itis-with-the-960-grid-system/</link> <comments>http://www.webdesignerdepot.com/2010/03/fight-div-itis-and-class-itis-with-the-960-grid-system/#comments</comments> <pubDate>Wed, 31 Mar 2010 17:05:59 +0000</pubDate> <dc:creator>Walter</dc:creator> <category><![CDATA[CSS]]></category> <category><![CDATA[Code]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[960 grid system]]></category> <category><![CDATA[960gs]]></category> <category><![CDATA[HTML]]></category><guid
isPermaLink="false">http://www.webdesignerdepot.com/?p=16089</guid> <description><![CDATA[Years ago, HTML tables were the standard for laying out web pages. CSS and semantic thinking changed that, and today CSS frameworks make designing relatively easy.
But they can also generate a surprising number of superfluous elements.
The 960 Grid System encourages the addition of &#60;div&#62; elements and class attributes, especially on complicated pages. Is this really [...]]]></description> <content:encoded><![CDATA[<p><a
href="http://www.webdesignerdepot.com/2010/03/fight-div-itis-and-class-itis-with-the-960-grid-system"><img
class="alignleft" src="http://netdna.webdesignerdepot.com/uploads/divitis/divitis-teaser.gif" alt="" width="200" height="160" /></a>Years ago, HTML tables were the standard for laying out web pages. CSS and semantic thinking changed that, and today CSS frameworks make designing relatively easy.</p><p>But they can also generate a surprising number of superfluous elements.</p><p>The 960 Grid System encourages the addition of <code>&lt;div&gt;</code> elements and <code>class</code> attributes, especially on complicated pages. Is this really an improvement over nested tables?</p><p>Creating cleaner code means going beyond the framework and thinking about what it really represents.</p><p><span
id="more-16089"></span></p><p>CSS frameworks provide a workflow solution, namely a rapid deployment of grid-based web layouts. One of the most popular frameworks today is the 960 Grid System (<a
href="http://960.gs/">960.gs</a>), named after its default width. With practice, 960.gs can be a great tool for any web designer. But it also revisits a few old problems.</p><p>Before CSS saw widespread use, tables provided all the layout a web designer needed. More complicated designs had tables nested within tables, but used in excess these created a tangled mess of HTML. CSS-based layouts lured designers with the promise of less HTML; they also appealed to semantics enthusiasts. Simply put, CSS encouraged the use of HTML that described what content was about, not what it should look like.</p><p>As designers learned to use CSS, div elements replaced tables. But divs can be—and often are—nested, just like tables.</p><p><br
class="spacer_" /></p><h1>The Spread of Class-itis and Div-itis</h1><p>Clear, lean code offers many advantages. It’s easy to fix, quick to download and causes fewer problems across different types of browsers. Relevant tags help screen readers, search engines and mobile devices interpret meaning in addition to layout.</p><p>Other than the semantics, the great advantage of using <code>&lt;div&gt;…&lt;/div&gt;</code> over <code>&lt;table&gt;&lt;tr&gt;&lt;td&gt;…&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</code> is that we end up with less code to do the same job. But now designers face a glut of classes and divs.</p><p>Do CSS frameworks such as 960.gs recreate the underlying problem with tables? If their goal is efficient HTML, can designers and developers use 960.gs without spreading “class-itis” (i.e. excessive use of classes) and “div-itis” (i.e. so many divs that tables start looking good again)? Yes, they can.</p><p>To understand how, we need to look at the framework itself.</p><p><br
class="spacer_" /></p><h1>A Rundown of 960.gs</h1><p>960.gs provides a set of columns, written in CSS, that facilitate the laying out of web pages. Download the files, add them to your website and it’s ready to go. No special plug-ins or new technology are needed, and you can use it in conjunction with other CSS files.</p><p>Columns are contained within blocks called (naturally) “containers.” The defaults are <code>container_12</code> and <code>container_16</code>, which divide into 12 and 16 columns, respectively. Custom sizes are available.</p><p><img
src="http://netdna.webdesignerdepot.com/uploads/divitis/containers-sample.gif" alt="diagram of 960-pixel-wide containers" /></p><p>The diagram above shows the two default containers with 12 and 16 columns. The gray won’t be visible on your final website, of course. The columns merely show where blocks, called “grids,” can be arranged.</p><p>A grid is a block of content that can cross more than one column in a container. Grids float left by virtue of being held in <code>.container_x</code>, making them ideal for modular layouts. The width of each block is determined by which grid you apply to it: <code>grid_1</code> is one column wide, <code>grid_5</code> is five columns wide, etc.</p><p><img
src="http://netdna.webdesignerdepot.com/uploads/divitis/grids-sample-1.gif" alt="diagram of various grids within a container" /></p><p>Above, <code>.container_12</code> holds three grids. Each grid, in turn, would hold different elements of the page’s content.</p><p><img
src="http://netdna.webdesignerdepot.com/uploads/divitis/grids-sample-2.gif" alt="diagram of various grids within a container" /></p><p>Above, <code>.container_16</code> holds two blocks of 12 and 4 columns, respectively. Like <code>.container_12</code>, this 16-column-wide layout measures 960 pixels wide—but its columns are narrower.</p><p>Resizing the grids in which the content’s elements fit is simple: change the <code>grid_<em>x</em></code> in each div.</p><p><a
href="http://960.gs">The official 960.gs website</a> showcases websites that were built on the framework, and it also provides page templates, links to a custom grid generator and the framework itself. Detailed instructions are included, too, because there’s more to learn. Grid margins and the ability to step into gutters between grids make the system even more flexible.</p><p>In spite of these benefits, embedding <code>&lt;div class="grid_x"&gt;…&lt;/div&gt;</code> in <code>&lt;div class="container_x"&gt;…&lt;/div&gt;</code> encourages coders to use many class attributes (class-itis) and divs (div-itis).</p><p><br
class="spacer_" /></p><h1>Solutions</h1><p>Arguing against tables for layout is easy enough. But using three or more levels of nested divs doesn’t solve the problem—it just replaces one set of tags with another. Frameworks help but don’t always solve the dilemma. With a little forethought, many of these problems can be avoided.</p><h2>Only Use Classes That You Actually Need</h2><p>The simplest solution to excessive CSS code is to cut out what isn’t necessary. 960.gs was conceived as a wireframing tool, meant to be replaced when the website goes live. It includes more than 180 class definitions.</p><p>If your design is structured on, say, <code>.container_12</code> and never uses more than <code>.grid_5</code> and <code>.grid_7</code>, then remove the others from the CSS.</p><h2>Apply class=&#8221;grid_x&#8221; to Appropriate Elements: Headings, Images, Links, Paragraphs</h2><p>The <code>.container_x</code> and <code>.grid_x</code> classes aren’t restricted to div elements. The <a
href="http://www.w3schools.com/tags/att_standard_class.asp">class attribute</a> can be applied to any element except <code>html</code>, <code>head</code>, <code>meta</code>, <code>param</code>, <code>script</code>, <code>title</code> and <code>style</code>—so, practically anything in the <code>body</code>. If a pair of div tags enclose only one item, then they may be unnecessary.</p><h2>Applying Grid Code to Non-Divs</h2><table
style="border-collapse: collapse" border="1" cellspacing="0" cellpadding="6" width="615" bordercolor="#999999"><tbody><tr><th
style="font-size: 12px;"> Using divs</th><th
style="font-size: 12px;"> Using semantic code</th></tr><tr><td><code>&lt;div class="grid_12"&gt;<br
/> &lt;h1&gt;…&lt;/h1&gt;<br
/> &lt;/div&gt;<br
/> </code></td><td><code>&lt;h1 class="grid_12"&gt;…&lt;/h1&gt;</code></td></tr><tr><td><code>&lt;div class="grid_3"&gt;<br
/> &lt;img src="…" alt="photo" /&gt;<br
/> &lt;/div&gt;<br
/> </code></td><td><code>&lt;img src="…" alt="photo" class="grid_3" /&gt;</code></td></tr><tr><td><code>&lt;div class="grid_6"&gt;<br
/> &lt;ul&gt;<br
/> &lt;li&gt;…&lt;/li&gt;<br
/> &lt;li&gt;…&lt;/li&gt;<br
/> &lt;li&gt;…&lt;/li&gt;<br
/> &lt;li&gt;…&lt;/li&gt;<br
/> &lt;/ul&gt;<br
/> &lt;/div&gt;<br
/> </code></td><td><code>&lt;ul class="grid_6"&gt;<br
/> &lt;li&gt;…&lt;/li&gt;<br
/> &lt;li&gt;…&lt;/li&gt;<br
/> &lt;li&gt;…&lt;/li&gt;<br
/> &lt;li&gt;…&lt;/li&gt;<br
/> &lt;/ul&gt;<br
/> </code></td></tr><tr><td><code>&lt;table&gt;<br
/> &lt;tr&gt;<br
/> &lt;td&gt;&lt;a href="#"&gt;…&lt;/a&gt;&lt;/td&gt;<br
/> &lt;td&gt;&lt;a href="#"&gt;…&lt;/a&gt;&lt;/td&gt;<br
/> &lt;td&gt;&lt;a href="#"&gt;…&lt;/a&gt;&lt;/td&gt;<br
/> &lt;td&gt;&lt;a href="#"&gt;…&lt;/a&gt;&lt;/td&gt;<br
/> &lt;/tr&gt;<br
/> &lt;/table&gt;<br
/> </code></td><td><code>&lt;a href="#" class="grid_3"&gt;…&lt;/a&gt;<br
/> &lt;a href="#" class="grid_3"&gt;…&lt;/a&gt;<br
/> &lt;a href="#" class="grid_3"&gt;…&lt;/a&gt;<br
/> &lt;a href="#" class="grid_3"&gt;…&lt;/a&gt;<br
/> </code></td></tr></tbody></table><p><br
class="spacer_" /></p><h2>Grant Grid Properties to Certain Elements</h2><p>Being simple CSS, <code>.grid_x</code> has properties that would work with any other class name—or any element. By copying the properties to certain elements, extra classes become unnecessary.</p><p><code>.examples li { (properties of .grid_4) }</code></p><pre><code>&lt;ul class="examples"&gt;
  &lt;li&gt;…&lt;/li&gt;
  &lt;li&gt;…&lt;/li&gt;
  &lt;li&gt;…&lt;/li&gt;
&lt;/ul&gt;
</code></pre><p><br
class="spacer_" /></p><p>Below, applying the grid to list items creates even columns, with minimal changes to the HTML.</p><p><img
src="http://netdna.webdesignerdepot.com/uploads/divitis/list-columns-example.gif" alt="three list items transformed into columns" /></p><p>CSS turns the above list into a multi-column group. If you need a normal list with bullet points, just discard the <code>class="examples"</code> attribute. Is this semantic? Certainly—as long as the content merits a list. The CSS merely changes how each bullet point is presented.</p><p>Another example:</p><pre><code>.photos p { (properties of .grid_10) }
.photos img { (properties of .grid_6) }</code></pre><pre><code>&lt;div class="container_16 photos"&gt;
  &lt;img src="…" alt="photo" /&gt;
  &lt;p&gt;First caption&lt;/p&gt;
  &lt;img src="…" alt="photo" /&gt;
  &lt;p&gt;Another caption&lt;/p&gt;
&lt;/div&gt;
</code></pre><p>This automatically puts captions, enclosed in paragraph tags, adjacent to photos.</p><p><img
src="http://netdna.webdesignerdepot.com/uploads/divitis/photo-on-16.jpg" alt="photo and caption on a grid with minimal HTML" /></p><p>When tables are not appropriate, the tabular effect is easy to create with non-tabular HTML.</p><pre><code>.datelist { (properties of .container_12) }
.datelist h3 { (properties of .grid_3) }
.datelist p { (properties of .grid_7) }
.datelist strong { (properties of .grid_1) }
</code></pre><pre><code>&lt;div class="datelist"&gt;
  &lt;h3&gt;subhead&lt;/h3&gt;
  &lt;p&gt;…&lt;/p&gt;
  &lt;strong&gt;3 p.m.&lt;/strong&gt;
  &lt;strong&gt;Jan 1, 2010&lt;/strong&gt;
  &lt;h3&gt;subhead&lt;/h3&gt;
  &lt;p&gt;…&lt;/p&gt;
  &lt;strong&gt;3 p.m.&lt;/strong&gt;
  &lt;strong&gt;Jan 1, 2010&lt;/strong&gt;
&lt;/div&gt;
</code></pre><p><br
class="spacer_" /></p><p><img
src="http://netdna.webdesignerdepot.com/uploads/divitis/faux-table-example.gif" alt="tablular data marked with non-table tags" /></p><p>The example above is a schedule of events in which each “cell” in the table has a different tag to reflect its unique content, rather than having the catch-all <code>&lt;td&gt;</code> tag. (Ideal? Maybe not. The HTML doesn’t distinguish between groups of content.)</p><p>Applying <code>.grid_x</code> properties to other elements requires some planning, but it results in less-cluttered HTML and doesn’t interfere with 960.gs itself.</p><p><br
class="spacer_" /></p><h1>Use Classes in Parent Items, not Child Items</h1><p>Div-itis and class-itis aren’t limited to CSS frameworks.</p><p>All of the examples in the last section share an interesting trait: only one class declaration in each. Wherever the same class attribute is used several times in a row in the HTML, change the parent instead of the children.</p><p>Unnecessary:</p><pre><code>.item { (various properties) }</code></pre><pre><code>
&lt;ul&gt;
  &lt;li class="item"&gt;…&lt;/li&gt;
  &lt;li class="item"&gt;…&lt;/li&gt;
  &lt;li class="item"&gt;…&lt;/li&gt;
  &lt;li class="item"&gt;…&lt;/li&gt;
  &lt;li class="item"&gt;…&lt;/li&gt;
  &lt;li class="item"&gt;…&lt;/li&gt;
&lt;/ul&gt;</code></pre><p><br
class="spacer_" /></p><p>Above, all six elements have a class. They’re redundant because the classes are identical. Here’s a better way:</p><pre><code>.group-of-items li { (various properties) }</code></pre><pre><code>&lt;ul class="group-of-items"&gt;
  &lt;li&gt;…&lt;/li&gt;
  &lt;li&gt;…&lt;/li&gt;
  &lt;li&gt;…&lt;/li&gt;
  &lt;li&gt;…&lt;/li&gt;
  &lt;li&gt;…&lt;/li&gt;
  &lt;li&gt;…&lt;/li&gt;
&lt;/ul&gt;</code></pre><p><br
class="spacer_" /></p><p>The remedy here for class-itis is to assign a single class to the parent element. CSS selectors do the job, applying the styling to every <code>&lt;li&gt;</code> inside the <code>.group-of-items</code> class. This method can be used on any group of elements with a common parent. For example:</p><pre><code>&lt;div&gt;
  &lt;h1 class="title"&gt;…&lt;/h1&gt;
  &lt;h1 class="subhead"&gt;…&lt;/h1&gt;
  &lt;p class="publication-date"&gt;…&lt;/p&gt;
  &lt;p class="body-text"&gt;…&lt;/p&gt;
  &lt;p class="body-text"&gt;…&lt;/p&gt;
  &lt;p class="body-text"&gt;…&lt;/p&gt;
  &lt;p class="body-text"&gt;…&lt;/p&gt;
  &lt;p class="body-text"&gt;…&lt;/p&gt;
&lt;/div&gt;</code></pre><pre><code>.title { (various properties) }
.subhead { (various properties) }
.publication-date { (various properties) }
.body-text { (various properties) }
</code></pre><p><br
class="spacer_" /></p><p>Most of the paragraphs above are just simple paragraphs and yet have needless class attributes. We also have two headings, distinguished only by their classes—yet adjoining <code>&lt;h1&gt;</code> elements don’t make for a good content structure. Here is a better solution:</p><pre><code>&lt;div class="article"&gt;
  &lt;h1&gt;…&lt;/h1&gt;
  &lt;h2&gt;…&lt;/h2&gt;
  &lt;p class="publication-date"&gt;…&lt;/p&gt;
  &lt;p&gt;…&lt;/p&gt;
  &lt;p&gt;…&lt;/p&gt;
  &lt;p&gt;…&lt;/p&gt;
  &lt;p&gt;…&lt;/p&gt;
  &lt;p&gt;…&lt;/p&gt;
&lt;/div&gt;</code></pre><pre><code>.article h1 { (various properties) }
.article h2 { (various properties) }
.article .publication-date { (various properties) }
.article p { (various properties) }
</code></pre><p><br
class="spacer_" /></p><p>Now only two classes remain. We’ve kept the <code>.publication-date</code> class to distinguish it from the normal paragraphs below it. Because HTML doesn’t have a “date” tag, this class is necessary to show what the paragraph contains. The new <code>.article</code> class enables you to style that div <em>and the elements in it</em> in the CSS with minimal mark-up. The CSS in both examples has four definitions each, and yet we end up with much cleaner code in the second.</p><p>In general, identical elements with a common parent do not need extra attributes. Classes only help when there’s a difference between them. A rule of thumb: use classes only when you need to distinguish between otherwise identical types of content.</p><h2>Simplify</h2><p>The purpose of the 960 Grid System, and CSS frameworks in general, is to reduce the effort needed to lay out web pages. The benefit of CSS is that it reduces the amount of HTML necessary to display a page. But as a layout language, <a
href="http://meyerweb.com/eric/thoughts/2009/02/17/wanted-layout-system/">CSS isn’t perfect</a>. Frameworks are merely tools that help people achieve solutions, not the solutions themselves. It’s up to designers and developers to combat class-itis and div-itis.</p><p><br
class="spacer_" /></p><p><em>Written exclusively for Webdesigner Depot by <a
href="http://benthinkin.net"> Ben Gremillion</a>. Ben is a freelance web designer who solves communication problems with better design.</em></p><p><em><strong>How do you say more with less? Share how you streamline code and your workflow in the comments below…</strong><br
/> </em></p><p><br/>If you find an exclusive RSS freebie on this feed or on the live WDD website, please use the following code to download it: H0Oa9C</p><style type="text/css">p img {display:inline-block; margin-right:10px;}
.alignleft {float:left;}
p.showcase {clear:both;}
body#browserfriendly p, body#podcast p, div#emailbody p{margin:0;}</style>]]></content:encoded> <wfw:commentRss>http://www.webdesignerdepot.com/2010/03/fight-div-itis-and-class-itis-with-the-960-grid-system/feed/</wfw:commentRss> <slash:comments>30</slash:comments> </item> <item><title>CSS Bugs and Inconsistencies in Firefox 3.x</title><link>http://www.webdesignerdepot.com/2010/03/css-bugs-and-inconsistencies-in-firefox-3-x/</link> <comments>http://www.webdesignerdepot.com/2010/03/css-bugs-and-inconsistencies-in-firefox-3-x/#comments</comments> <pubDate>Mon, 15 Mar 2010 17:12:50 +0000</pubDate> <dc:creator>Walter</dc:creator> <category><![CDATA[Code]]></category> <category><![CDATA[Firefox]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[bugs]]></category> <category><![CDATA[CSS]]></category> <category><![CDATA[css bugs]]></category> <category><![CDATA[firefox 3]]></category> <category><![CDATA[firefox errors]]></category> <category><![CDATA[inconsitencies]]></category><guid
isPermaLink="false">http://www.webdesignerdepot.com/?p=15960</guid> <description><![CDATA[There aren&#8217;t many articles covering incompatibilities, or CSS  differences in Firefox alone — and for good reason.
Firefox  has always done an excellent good job of supporting both CSS and  JavaScript in a standards-compliant manner without too many awkward  bugs.
There are, however, a few CSS properties and selectors that aren&#8217;t  supported [...]]]></description> <content:encoded><![CDATA[<p><a
href="http://www.webdesignerdepot.com/2010/03/css-bugs-and-inconsistencies-in-firefox-3-x/"><img
class="alignleft" src="http://netdna.webdesignerdepot.com/uploads/css_firefox_bugs/thumb.jpg" alt="" width="200" height="160" /></a>There aren&#8217;t many articles covering incompatibilities, or <strong>CSS  differences in Firefox</strong> alone — and for good reason.</p><p>Firefox  has always done an excellent good job of supporting both CSS and  JavaScript in a standards-compliant manner without too many awkward  bugs.</p><p>There are, however, a few CSS properties and selectors that aren&#8217;t  supported by one or more of the versions released since version 3.0.,  which I will cover here.</p><p>This article will cover <strong>bugs, inconsistencies, and nonsupport</strong>.  So, if you&#8217;re having trouble with a CSS property or selector in Firefox  and it&#8217;s not listed here, then you&#8217;ll probably have to rethink your  layout and reconsider what the culprit might be. <span
id="more-15960"></span></p><p>Since Firefox 2 is virtually <a
href="http://gs.statcounter.com/#browser_version-ww-monthly-200901-201002-bar">non-existent</a>,   I won&#8217;t be considering that version specifically, but this information   will generally apply to that version by default.</p><p>And I should note  that  the material for this post was taken primarily from the <a
href="http://www.sitepoint.com/blogs/2010/02/08/massive-sitepoint-reference-update-completed-itll-save-your-sanity/">newly-updated</a> SitePoint <a
href="http://reference.sitepoint.com/css">CSS reference</a>,  which  is hands-down the best and most comprehensive CSS reference  available  anywhere.</p><p><br
class="spacer_" /></p><h1>The Outline Overflow Bug</h1><p>In Firefox 3.x, when an element overflows the border of a parent that  has the <code>outline</code> property set, the outline will stretch to  fit the containing element, as shown in the screen capture below:</p><p><img
src="http://netdna.webdesignerdepot.com/uploads/css_firefox_bugs/outline-ff.gif" alt="" width="615" height="242" /></p><p>The correct implementation is shown in the next screen capture taken  from Chrome:</p><p><img
src="http://netdna.webdesignerdepot.com/uploads/css_firefox_bugs/outline-other.gif" alt="" width="615" height="242" /></p><p>As shown above, the outline should encompass the element that is  being outlined, and should not be affected by any overflowing elements.  To ensure there&#8217;s no confusion, note that this is a bug in the  implementation of the <code>outline</code> property, not the <code>border</code> property.</p><p><strong>Reference:</strong> <a
href="http://reference.sitepoint.com/css/outline">SitePoint CSS  Reference: outline Property</a></p><ul></ul><p><br
class="spacer_" /></p><h1>Tables with Collapsed Borders</h1><p>In Firefox, when a table has its borders set to <code>collapse</code> using the <code>border-collapse</code> property, the table&#8217;s top and  left margins in relation to nearby elements is 1 pixel off. This is  shown in a zoomed-in screenshot in the image below, which displays the  bottom border of a block-level element (red) touching the top border of a  collapsed table (blue):</p><p><img
src="http://netdna.webdesignerdepot.com/uploads/css_firefox_bugs/collapse-ff.gif" alt="" width="615" height="167" /></p><p>Here is the correct implementation of this property/value pair, as  shown in Chrome:</p><p><img
src="http://netdna.webdesignerdepot.com/uploads/css_firefox_bugs/collapse-other.gif" alt="" width="615" height="145" /></p><p>As shown above, because the borders are &#8220;collapsed&#8221;, and because the  table is not a block element, there should be a slight offset in the  left margin, and the top margin should be even with the bottom border of  the element above it.</p><p><strong>Reference:</strong> <a
href="http://reference.sitepoint.com/css/border-collapse">SitePoint  CSS Reference: border-collapse Property</a></p><ul></ul><p><br
class="spacer_" /></p><h1>Empty Cells in Table Rows</h1><p>This is a property value that is not implemented properly by any  browser, including Firefox. When a table row has no visible content and  all its cells have their <code>empty-cells</code> property set to <code>hide</code>,  the entire row should behave as if it were set to &#8220;display: none&#8221;, with  no borders or backgrounds visible.</p><p>No browser handles this correctly, so the table row is still visible,  as shown in the image below.</p><p><img
src="http://netdna.webdesignerdepot.com/uploads/css_firefox_bugs/empty-cells.gif" alt="" width="615" height="223" /></p><p><strong>Reference:</strong> <a
href="http://reference.sitepoint.com/css/empty-cells">SitePoint  CSS Reference: empty-cells Property</a></p><ul></ul><p><br
class="spacer_" /></p><h1>Word Spacing on Inline Elements</h1><p>In Firefox 3.x, a negative value on the <code>word-spacing</code> property will be treated as zero on adjacent inline elements. The  negative value should cause the inline elements to overlap one another,  as would be the case with text, but this doesn&#8217;t happen. Instead, the  elements are just given zero white space separation with no overlap.</p><p>The image below displays both the correct and incorrect  implementations:</p><p><img
src="http://netdna.webdesignerdepot.com/uploads/css_firefox_bugs/word-spacing.gif" alt="" width="615" height="300" /></p><p>In the examples shown above, the three words &#8220;Fruits&#8221;, &#8220;Vegetables&#8221;  and &#8220;Other Foods&#8221; are individually wrapped in <code>&lt;span&gt;</code> elements, while the paragraph that wraps them has its <code>word-spacing</code> property set to a negative value.</p><p>The second example (Firefox) fails to apply the negative word  spacing, except between the last two words because those words are not  individually wrapped by spans but are natural text elements.</p><p>As a side point, this bug occurs similarly in IE8, but not in  previous versions of IE.</p><p><strong>Reference:</strong> <a
href="http://reference.sitepoint.com/css/word-spacing">SitePoint  CSS Reference: word-spacing Property</a></p><ul></ul><p><br
class="spacer_" /></p><h1>Text Decoration on Floating Descendants</h1><p>When an element has a text-decoration value set, that value should  not be inherited by floating descendants. In Firefox 3.x, floating  descendants are given the same text-decoration values as their parent,  even though this should not be the case.</p><p><img
src="http://netdna.webdesignerdepot.com/uploads/css_firefox_bugs/decoration.gif" alt="" width="615" height="140" /></p><p>In the image above, the first line is a screenshot from IE8,  displaying a <code>&lt;span&gt;</code> element floated inside of an  anchor. The text inside the <code>&lt;span&gt;</code> does not have a  visible text decoration, which is the correct way to display it. In  Firefox (shown in the second example), the text-decoration is  incorrectly applied to the floating <code>&lt;span&gt;</code>.</p><p>You may have noticed this bug in Firefox when trying to remove the  text-decoration from floated images inside of anchors.</p><p><strong>Reference:</strong> <a
href="http://reference.sitepoint.com/css/text-decoration">SitePoint  CSS Reference: text-decoration Property</a></p><ul></ul><p><br
class="spacer_" /></p><h1>pre-line &amp; pre-wrap for the white-space property in FF 3.0</h1><p>Using the <code>white-space</code> property in Firefox 3.5, you can  specify whether multiple space characters should be collapsed down to a  single space or not. By default, HTML documents will collapse multiple  spaces down to a single space. In some instances, you can apply <code>white-space:  pre</code> to prevent white space from being collapsed, which is  similar to the use of the <code>&lt;pre&gt;</code> HTML tag.  Subsequently, you may want to remove that setting using <code>white-space:  pre-line</code> (to collapse white space).</p><p>Firefox 3.0 does not support this value, so the white space will be  retained. Firefox 3.5 collapses the space correctly. The image below  shows both examples:</p><p><img
src="http://netdna.webdesignerdepot.com/uploads/css_firefox_bugs/whitespace.gif" alt="" width="615" height="180" /></p><p>Similarly, when a paragraph of text is set to <code>white-space:  pre-wrap</code>, this should preserve white spaces between words, but  should naturally include line breaks. Firefox 3.0 fails to implement  this correctly, while later versions (and all other browsers) include  the natural line breaks. Both examples are shown below.</p><p><img
src="http://netdna.webdesignerdepot.com/uploads/css_firefox_bugs/whitespace-2.gif" alt="" width="615" height="300" /></p><p>Keep in mind that the outer element is given <code>white-space: pre</code> while an inner <code>&lt;span&gt;</code> is attempting to override the  lack of line breaks using <code>pre-wrap</code>. On its own, <code>pre-wrap</code> would not have any effect.</p><p>Firefox 3.x also treats the some of the <code>white-space</code> values differently from other browsers when those values are applied to  the <code>&lt;textarea&gt;</code> element. For example, applying <code>white-space:  nowrap</code> should cause all typed text in a <code>&lt;textarea&gt;</code> to form one line, but Firefox 3.x does not do this.</p><p><strong>Reference:</strong> <a
href="http://reference.sitepoint.com/css/white-space">SitePoint  CSS Reference: white-space Property</a></p><ul></ul><p><br
class="spacer_" /></p><h1>Page Break Properties</h1><p>CSS allows developers to specify where page breaks should or  shouldn&#8217;t occur using the three properties <code>page-break-before</code>, <code>page-break-inside</code>, and <code>page-break-after</code>.  Opera is the only browser that fully supports these properties, while  other browsers offer partial support or no support.</p><p>The <code>page-break-inside</code> property specifies whether or not a  page break can occur inside a single block-level element. Firefox does  not provide support for this property. Using the syntax <code>page-break-inside:  avoid</code>, you can prevent an element from being divided during  printing. The image below, from a print preview in Opera 10, shows how  this property can prevent an unordered list from being split over two  pages:</p><p><img
src="http://netdna.webdesignerdepot.com/uploads/css_firefox_bugs/page-break-inside.gif" alt="" width="615" height="293" /></p><p>By contrast, look at the image below, taken from the print preview  option in Firefox 3.5:</p><p><img
src="http://netdna.webdesignerdepot.com/uploads/css_firefox_bugs/page-break-inside-ff.gif" alt="" width="615" height="278" /></p><p><strong>Reference:</strong> <a
href="http://reference.sitepoint.com/css/pagedmedia">SitePoint  CSS Reference: Paged Media Properties</a></p><ul></ul><p><br
class="spacer_" /></p><h1>Orphans and Widows on Printable Pages</h1><p>The <code>orphans</code> and <code>widows</code> CSS properties are  supported only by Internet Explorer 8 and Opera since version 9. This  property is used to specify the minimum number of lines from a single  paragraph that can occur on a printed page, either at the bottom  (orphans) or the top (widows). Depending on the number chosen, lines  will be moved from one page to the next (or previous) in order to  prevent a single line from being printed at the top or bottom of a page.</p><p>Even with the <code>orphans</code> property set to a value of &#8220;3&#8243;, as  shown in the image below, Firefox&#8217;s print preview shows a single line  at the bottom of one of the printable pages:</p><p><img
src="http://netdna.webdesignerdepot.com/uploads/css_firefox_bugs/orphans-widows.gif" alt="" width="615" height="162" /></p><p>Similar to the <code>page-break-inside</code> property, Firefox also  fails to support the values <code>avoid</code>, <code>left</code>, and <code>right</code> for both the <code>page-break-before</code> and <code>page-break-after</code> properties.</p><p><strong>References:</strong> <a
href="http://reference.sitepoint.com/css/orphans">SitePoint CSS  Reference: orphans Property</a> | <a
href="http://reference.sitepoint.com/css/widows">SitePoint CSS  Reference: widows Property</a></p><ul></ul><p><br
class="spacer_" /></p><h1>The :first-line Pseudo-Element Bug</h1><p>The <code>:first-line</code> pseudo-element allows the first line of  any given text block to have different formatting from the rest of the  text. For example, the first line of a paragraph of text can be changed  to uppercase or to a different color. For this CSS element to work in a  practical manner, it should allow for the possibility of nested  block-level elements. For example, a <code>&lt;div&gt;</code> element  that contains a <code>&lt;p&gt;</code> element should allow the <code>:first-line</code> pseudo-element to change the styling of the first line of text inside  the <code>&lt;div&gt;</code>. In Firefox (and in many other browsers),  this is not possible unless the pseudo-element specifically targets the  child paragraph.</p><p>Internet Explorer 8, Chrome, and Safari implement this feature  correctly, preventing nesting of block elements from breaking the  styling, as shown in the image below:</p><p><img
src="http://netdna.webdesignerdepot.com/uploads/css_firefox_bugs/first-line.gif" alt="" width="615" height="249" /></p><p>In the paragraph above, the text is inside of a <code>&lt;p&gt;</code> element, which resides inside of a <code>&lt;div&gt;</code>. The <code>&lt;p&gt;</code> has the <code>:first-line</code> pseudo-element set to <code>color:  blue</code>, which fails in Firefox because of the nesting of the  paragraph inside the <code>&lt;div&gt;</code>.</p><p><strong>Reference:</strong> <a
href="http://reference.sitepoint.com/css/pseudoelement-firstline">SitePoint  CSS Reference: first-line Pseudo-Element</a></p><ul></ul><p><br
class="spacer_" /></p><h1>CSS3 Support in Firefox 3.x</h1><p>Firefox has gradually added better support for CSS3 since the release  of version 3.0. Below is a description of how Firefox handles different  features of CSS3. Some of these may still be in the <a
href="http://www.w3.org/Consortium/Process/Process-19991111/tr.html#RecsWD">working  draft</a> or <a
href="http://www.w3.org/Consortium/Process/Process-19991111/tr.html#RecsCR">candidate  recommendation</a> stage, therefore we can&#8217;t be dogmatic about what  should and shouldn&#8217;t be supported until they have reached the <a
href="http://www.w3.org/Consortium/Process/Process-19991111/tr.html#RecsW3C">recommendation</a> stage.</p><ul><li>Firefox 3.0 doesn&#8217;t support the <code>text-shadow</code> property</li><li>Firefox 3.x doesn&#8217;t support the <code>box-shadow</code> property,  except when using the proprietary prefix <code>-moz-</code></li><li>Firefox 3.x doesn&#8217;t support the <code>box-sizing</code> property,  except when using the proprietary prefix <code>-moz-</code></li><li>Firefox 3.x doesn&#8217;t support multiple columns unless the proprietary  prefix <code>-moz-</code> is used</li><li>Firefox 3.0 and 3.5 do not support CSS3 gradients and multiple  backgrounds (both of these were recently added in 3.6)</li><li>Firefox 3.0 doesn&#8217;t support the <code>border-image</code> property,  but 3.5 supports it using the <code>-moz-</code> proprietary prefix</li><li>Firefox 3.0 doesn&#8217;t support a number of CSS3 pseudo-classes  (:nth-child, :nth-last-child, :nth-of-type, etc.)</li><li>Firefox 3.0 doesn&#8217;t support CSS transforms</li><li>Firefox 3.x doesn&#8217;t support CSS transitions</li><li>Firefox 3.x doesn&#8217;t support CSS animations</li></ul><p><br
class="spacer_" /></p><h1>Other CSS Features Not Supported</h1><p>Some of the more significant bugs and incompatibilities were  discussed above, but there are a few others worth noting.</p><ul><li>Firefox up to version 3.5 doesn&#8217;t support the value <code>run-in</code> for the <code>display</code> property</li><li>Firefox doesn&#8217;t support the <code>::selection</code> pseudo-element</li><li>The @page at-rule is not supported by Firefox</li><li>The @font-face at-rule is not supported by Firefox 3.0</li></ul><p><br
class="spacer_" /></p><h1>Conclusion</h1><p>After going through this material, you can clearly see that <strong>lack  of support of CSS features in Firefox is minimal, and in many cases  quite irrelevant</strong> since many of the properties discussed here  are not very commonly used.</p><p>Nonetheless, I hope this will provide a decent reference for the most  significant bugs and inconsistencies in Firefox. If you are having  problems with a particular feature of CSS in Firefox that isn&#8217;t listed  here, chances are you&#8217;re doing something wrong or may not fully  understand certain CSS concepts and principles.</p><p>So, in that respect, this reference <strong>should work well as a  reverse-reference</strong>, since those not listed here can be trusted  to work fine if they are implemented correctly with proper syntax.</p><p>Of course, if there&#8217;s anything I&#8217;ve missed, or any errors, please  comment and I&#8217;ll do my best to make any necessary corrections and  additions.</p><p><br
class="spacer_" /></p><h1>Further References</h1><ul
class="tight_list"><li><a
href="https://developer.mozilla.org/En/CSS_improvements_in_Firefox_3">CSS  improvements in Firefox 3</a></li><li><a
href="https://developer.mozilla.org/En/Firefox_3.5_for_developers#Newly-supported_CSS_features">Newly-supported  CSS Features in Firefox 3.5</a></li></ul><p><br
class="spacer_" /></p><p><em>Firefox Image provided by <a
rel="nofollow" href="http://rakaz.nl/2004/10/firefox-wallpapers.html" target="_blank">Rakaz</a><br
class="spacer_" /></em></p><p><em>This post was written exclusively for Webdesigner Depot by Louis     Lazaris, a freelance writer and web developer. Louis runs <a
rel="nofollow" href="http://www.impressivewebs.com/">Impressive   Webs</a> where he  posts  articles and tutorials on web design. You  can  follow Louis <a
rel="nofollow" href="http://twitter.com/ImpressiveWebs">on Twitter</a> or get in  touch  with  him <a
rel="nofollow" href="http://www.impressivewebs.com/contact">through  his  website</a>.</em></p><p><br
class="spacer_" /></p><p><br/>If you find an exclusive RSS freebie on this feed or on the live WDD website, please use the following code to download it: H0Oa9C</p><style type="text/css">p img {display:inline-block; margin-right:10px;}
.alignleft {float:left;}
p.showcase {clear:both;}
body#browserfriendly p, body#podcast p, div#emailbody p{margin:0;}</style>]]></content:encoded> <wfw:commentRss>http://www.webdesignerdepot.com/2010/03/css-bugs-and-inconsistencies-in-firefox-3-x/feed/</wfw:commentRss> <slash:comments>38</slash:comments> </item> <item><title>How to Plan for the Absence of JavaScript</title><link>http://www.webdesignerdepot.com/2010/02/how-to-plan-for-the-absence-of-javascript/</link> <comments>http://www.webdesignerdepot.com/2010/02/how-to-plan-for-the-absence-of-javascript/#comments</comments> <pubDate>Fri, 05 Feb 2010 17:48:54 +0000</pubDate> <dc:creator>Walter</dc:creator> <category><![CDATA[Code]]></category> <category><![CDATA[How to]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Coding]]></category> <category><![CDATA[JavaScript]]></category><guid
isPermaLink="false">http://www.webdesignerdepot.com/?p=15025</guid> <description><![CDATA[Though the  methods used to gather website traffic statistics call into question the  validity of the stats themselves, the fact is that some of your  website&#8217;s visitors will have JavaScript disabled.
You  could divide your traffic sources into four broad categories:
Search  engines, mobile visitors, visitors using screen readers and visitors [...]]]></description> <content:encoded><![CDATA[<p><a
href="http://www.webdesignerdepot.com/2010/02/how-to-plan-for-the-absence-of-javascript/"><img
class="alignleft" src="http://netdna.webdesignerdepot.com/uploads/no_javascript/thumb.gif" alt="" width="200" height="160" /></a>Though the  methods used to gather website traffic statistics call into question the  validity of the stats themselves, the fact is that some of your  website&#8217;s visitors will have <strong>JavaScript disabled</strong>.</p><p>You  could divide your traffic sources into four broad categories:<strong> </strong></p><p><strong>Search  engines, mobile visitors, visitors using screen readers </strong>and<strong> visitors who  have JavaScript turned off</strong>.</p><p>When planning your information architecture  and design, you must figure out how to deal with these special groups.</p><p>I have assembled a few recent real-world scenarios to find clarity on   the issue.<span
id="more-15025"></span></p><p>When you want to hide lengthy content behind an animated scroller, or  rotate through products or testimonials in sequence, or present  categorized page-level content cleanly, you could use accordions,  carousels or any other imaginative solution.</p><p>If you keep up with  JavaScript best practices or use any of the myriad of JavaScript  libraries, you are probably already familiar with unobtrusive  JavaScript, which is the technique of presenting JavaScript  interactivity only when JavaScript is enabled.</p><p>This principle should be  extended to presentation as well: build your dynamic feature(s) and set  your display and visibility values only after the document is ready and  only if the visitor has JavaScript enabled, rather than set the  properties in your HTML code or define them server-side.</p><p>Like many screen readers, Google&#8217;s crawler tends to ignore content  wrapped in an element set to <code><span
style="color: #008000;">display: none</span></code>, while it does  crawl any content set to <code><span
style="color: #008000;">display: visible</span></code>.</p><p>So your task as a  designer is to <strong>plan the space and layout around your dynamic features</strong>,  and also to prepare for instances when &#8220;dynamic&#8221; is not an option.</p><p>If  the content on one of your pages will always be visible in the browsers  of certain users, how should it be displayed? Should hidden content  remain hidden even if JavaScript is disabled? Should all content be  available to screen readers and search engines? If a piece of content  becomes visible only after an AJAX call, how do you adequately fill that  space when JavaScript is disabled?</p><p><br
class="spacer_" /></p><h1>The Accordion</h1><p>An accordion is a structure that usually consists of a pattern of  pairs of heading and content. Blocks of content would expand one at a  time, in response to an event triggered in the heading.</p><p><a
href="http://www.hulu.com/"><img
class="image-border" src="http://netdna.webdesignerdepot.com/uploads/no_javascript/hulu_accordion2.jpg" alt="" width="615" height="343" /></a><em><br
/> Hulu&#8217;s Accordion</em></p><p>I recently helped one client overcome the problem of having very long  pages. This client had an online catalog of training courses and  stipulated that all of the information for a particular program must be  available up front: no page skipping or pop-ups for core course  descriptions or program definitions.</p><p>All program information had to be  available to the visitor on the same page, without having to navigate  back and forth in the course catalog.</p><p>The right solution here was an <strong>accordion</strong>, collapsing course  descriptions beneath headings for each area of study (math or history,  for example). A poor implementation would have been to set the  visibility of those collapsed course descriptions before the HTML was  rendered on the screen.</p><p>If the content was hidden pre-rendering, then  some visitors and search engines would miss much of the important  content.</p><p>Using jQuery, I targeted the content for collapsing and set the  accordion to trigger after the page had loaded and the document was  ready. For this client, making the content available to all audiences  was extremely important. Some of the content could run very long, and so  a design that could accommodate extreme vertical expansion was needed.</p><p><br
class="spacer_" /></p><h1>The Carousel</h1><p>You&#8217;ll see <strong>carousels</strong> fairly often in portfolios and product  spotlights.</p><p>Typically in carousels, content will scroll in response to a  time-out interval or some user interaction (see &#8220;Your Recent History&#8221;  on Amazon). I like carousels for their flexibility and because they  allow you to fix at least one dimension of the container.</p><p><a
href="http://www.amazon.com"><img
class="image-border" src="http://netdna.webdesignerdepot.com/uploads/no_javascript/amazon_carousel2.jpg" alt="" width="615" height="284" /></a><em><br
/> Amazon&#8217;s carousel</em></p><p>Another client recently inquired about the &#8220;News and Highlights&#8221;  area of their home page. Like many other content blocks of this type,  this one featured the eight most recent additions to their news pages  (though that number could vary).</p><p>The teasers in this block contained a  summary of the article and an image. The images could be large and the  content long, so a carousel that rotated between teasers was the right  solution here.</p><p>Again using jQuery, I targeted the DIV wrapper for the carousel and,  after the page had loaded and the document was ready, applied the  carousel and set my transitions. With JavaScript enabled, the home page  rendered nicely: every 15 seconds, the carousel shuffled to the next  teaser. By default, all of the teasers were visible, but I hid all but  the first when I created the carousel.</p><p>For this client, we again <strong>chose to display all hidden content if  JavaScript was disabled</strong>. In that case, the home page would expand  vertically to accommodate the extra content.</p><p>We had alternatives, though. Considering the four categories of users  we identified at the beginning of this article, the priority for this  content was accessibility, with search engine ranking a close second. We  could have satisfied these two groups by leaving all of the teasers  visible but fixing the dimensions of the container DIV and setting <code><span
style="color: #008000;">overflow</span></code> to <code><span
style="color: #008000;">scroll</span></code>, <code><span
style="color: #008000;">auto</span></code> or <code><span
style="color: #008000;">hidden</span></code>.</p><p>Any  of these options would have preserved the layout&#8217;s dimensions. And  screen readers and search engines would have picked up on the content,  too, because the content would not be hidden with the <code><span
style="color: #008000;">display</span></code> or <code><span
style="color: #008000;">visibility</span></code> property.</p><p><br
class="spacer_" /></p><h1>The Content Swapper</h1><p>This technique is similar to the carousel in that content in a block  is rotated using some animation.</p><p>The main difference is that the tweening animation is not used; instead, one piece of content fades out  while another fades in (or you could have a hard transition with no  fade). The swapper is similar enough to the carousel that the  alternative no-JavaScript solutions mentioned above hold true.</p><p>Yet another client came to me with the task of showing an indefinite  number of testimonials on their website. We opted for a <strong>content swapper</strong> in this case because we had no need for the pagination typically found  in carousels (the user wouldn&#8217;t need to scroll back one testimonial or  skip to the end).</p><p>For visitors who had JavaScript disabled, we respected the  design. After careful consideration, the client rightly determined that  the testimonials would have such a small effect on visitors that setting  the <code><span
style="color: #008000;">display</span></code> to <code><span
style="color: #008000;">none</span></code> would not be  detrimental.</p><p>The decision afforded me a little more freedom in planning  the right-hand column of the website, where the testimonials were to  appear.</p><p><br
class="spacer_" /></p><h1>The Sorter</h1><p>Anyone who has adjusted their Hulu queue has seen the drag-and-drop  sorter. This bit of JavaScript allows users to drag and drop rows (table  rows, list items, independent DIVs, etc.) into a different order.</p><p><a
href="http://www.netflix.com/"><img
class="image-border" src="http://netdna.webdesignerdepot.com/uploads/no_javascript/netflix_sorter2.jpg" alt="" width="615" height="211" /></a><em><br
/> Netflix&#8217;s sorter</em></p><p>Take one last client of mine as an example, who had a set of standard  procedures that all employees had to follow.</p><p>Each procedure consisted  of any number of tasks. An administrator could add or remove tasks and  could change the order of tasks.</p><p>This was a textbook example of <strong>sorting</strong>,  an implementation of <strong>drag-and-drop reordering</strong>.</p><p>Thanks to Scriptaculous  and Prototype.js, creating the sortable list was easy. When the code was  written and the page was live, we had a perfectly operable rendering of  the design comp. Then we realized that without JavaScript, we had only  the HTML equivalent of a paper weight. There was no drag-and-drop or  on-the-fly reordering.</p><p>Some quick thinking and slight modification of the design gave us the  same set of rows we had before but with the addition of text input  boxes that could accommodate the inputting of row order (note, though,  that without JavaScript, we were forced to add some significant  server-side validation for these input boxes). We lost on-the-fly  reordering, but at least we regained the sorting functionality.</p><p>Then we turned back to JavaScript-enabled browsers and hid the text  boxes mentioned above; after all, we had drag-and-drop functionality for  this group. At this point, we had a perfectly operable rendering of the  design comp that was also serviceable for visitors who had JavaScript  disabled. Next time, I&#8217;ll know to plan for this condition.</p><p><br
class="spacer_" /></p><h1>Conclusion</h1><p>The evolution of the web will continue, and visitors to our websites  should be able to continue enjoying dynamic flair.</p><p>Carry on planning for  interactive responses with animated tweens: fade in, fade out,  collapse, expand, slide things around. Given all of this animation,  think of how your website will appear to visitors who cannot see the  animation because of JavaScript limitations. Your clients will be  happier, and you&#8217;ll be a better designer for it.</p><p><a
href="http://www.thecounter.com/stats/2008/January/javas.php">http://www.thecounter.com/stats/2008/January/javas.php</a><br
/> <a
href="http://www.w3schools.com/browsers/browsers_stats.asp">http://www.w3schools.com/browsers/browsers_stats.asp</a></p><p><br
class="spacer_" /></p><p><em>Jason Corns is a freelance web developer and full-time GUI developer  for Systems Alliance, Inc., specializing in usability for all audiences.</em></p><p><em><strong>How do YOU plan for the absence of JavaScript? Please share your tips with us&#8230;</strong></em></p><p><em><br
/> </em></p><p><br/>If you find an exclusive RSS freebie on this feed or on the live WDD website, please use the following code to download it: H0Oa9C</p><style type="text/css">p img {display:inline-block; margin-right:10px;}
.alignleft {float:left;}
p.showcase {clear:both;}
body#browserfriendly p, body#podcast p, div#emailbody p{margin:0;}</style>]]></content:encoded> <wfw:commentRss>http://www.webdesignerdepot.com/2010/02/how-to-plan-for-the-absence-of-javascript/feed/</wfw:commentRss> <slash:comments>34</slash:comments> </item> <item><title>CSS Transitions 101</title><link>http://www.webdesignerdepot.com/2010/01/css-transitions-101/</link> <comments>http://www.webdesignerdepot.com/2010/01/css-transitions-101/#comments</comments> <pubDate>Mon, 18 Jan 2010 19:00:11 +0000</pubDate> <dc:creator>Walter</dc:creator> <category><![CDATA[CSS]]></category> <category><![CDATA[Code]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[css 101]]></category> <category><![CDATA[transitions]]></category><guid
isPermaLink="false">http://www.webdesignerdepot.com/?p=14496</guid> <description><![CDATA[Despite people&#8217;s expectation of change and movement on the screen, CSS and HTML have few controls that allow you to design interactivity, and those that exist are binary.
A link is either one color or another. A text field is either one size or another. A photo is either transparent or opaque. No in-betweens from one [...]]]></description> <content:encoded><![CDATA[<p><a
href="http://www.webdesignerdepot.com/2010/01/css-transitions-101/"><img
class="alignleft" src="http://netdna.webdesignerdepot.com/uploads/css101/thumb2.jpg" alt="" width="200" height="160" /></a>Despite people&#8217;s expectation of change and movement on the screen, <strong>CSS</strong> and <strong>HTML</strong> have few controls that allow you to design interactivity, and those that exist are binary.</p><p>A link is either one color or another. A text field is either one size or another. A photo is either transparent or opaque. No in-betweens from one state to the next. <strong>No</strong> <strong>transitions</strong>.</p><p>This has led to most web pages feeling abrupt, with elements shifting and changing ungracefully.</p><p>Yes, we can use DHTML and leverage the jQuery library for transitions, but this requires a lot of code for something that should be very simple.</p><p>What we need is a quick and easy way to add simple transitions to the page and in this article you&#8217;ll find useful information about <strong>CSS transitions </strong>and how to use them.<span
id="more-14496"></span></p><p>A few months back, I stuck my foot in my mouth by <a
href="http://www.webdesignerdepot.com/2009/08/5-css3-design-enhancements-that-you-can-use-today/">suggesting that designers should start using the new CSS 3 techniques</a> that allow them to do some of the basic styling that they’ve been pleading for. The only issue: none of them worked in Internet Explorer. Nope, not even IE8.</p><p>Some readers felt that suggesting techniques that around 75% of audiences would not be able to see was imprudent.</p><p>To those readers I say, <em>&#8216;Hold onto your hats&#8217;</em>, because I’m going to introduce you to another new CSS property that allows you to add transitions to any element with only a couple of lines of code.</p><p>CSS transitions are being introduced right now in CSS Level 3 but have already been added as an extension to Webkit. Right now that means they work only in browsers based on Webkit, including Apple Safari and Google Chrome.</p><p><br
class="spacer_" /></p><h1>Where CSS Transitions Come From</h1><p>Transitions have been a part of Webkit for a while and are the basis of a lot of the cool things that the Safari UI can do that other browsers cannot.</p><p>But the W3C CSS Workgroup resisted adding transitions to its official specs, some members arguing that transitions are not style properties and would be better handled by a scripting language.</p><p>But many designers and developers, myself included, argued that these are in fact styles— only <strong><em>dynamic</em></strong> styles, rather than the traditional static styles that so many of us are used to.</p><p>Fortunately, the argument for dynamic styles held the day. Last March, representatives from Apple and Mozilla began adding the <a
href="http://www.w3.org/TR/css3-transitions/">CSS Transitions Module to the CSS Level 3 specification</a>, closely modeled on what Apple had already added to Webkit.</p><p><br
class="spacer_" /></p><h1>A Brief Note on Design Enhancements</h1><p>Before we continue, let me emphasize one point: never rely on styles for website functionality if the styles are not browser interoperable (i.e. available on all common browsers).</p><p>One more time for those who missed it: <strong>never rely on styles for website functionality if the styles are not browser interoperable</strong>.</p><p>That said, you can use styles, such as transitions, as <em>design enhancements</em> to improve the user experience, without sacrificing usability for those who cannot see them. This is okay as long as you could otherwise live without the transitions and users can still complete their tasks.</p><p><br
class="spacer_" /></p><h1>First, a Few Transition Ideas</h1><p>CSS transitions will not replace all uses of DHTML, but here are a few ways to enhance your design in browsers that support transitions, without ruining it for the rest of your audience.</p><p>You will need to view this page in <a
href="http://www.apple.com/safari/" target="_self">Apple Safari 3+</a> or <a
href="http://www.google.com/chrome" target="_self">Google Chrome</a> to see these transitions work. Both browsers are available in Mac and PC flavors.</p><h2>Roll-Overs</h2><p>The most obvious use for transitions is to highlight elements (whether links, tables, form fields, buttons or something else) when the user’s mouse hovers over them. Transitions are a great way to give the page a smoother look.</p><p><strong>Example #1</strong></p><div
id="example1" class="example"><p><a
href="#">Link</a></p><p><br
class="spacer_" /></p></div><h2>Drop-Down Menus</h2><p>Pure CSS menus are easy to accomplish, and transitions let you give menus slide-down and highlighting effects.</p><p><strong>Example #2</strong></p><div
id="example2" class="example"><ul
class="menu"><li>About Us</li><ul
class="drop"><li><a
href="#">Our Team</a></li><li><a
href="#">News</a></li><li><a
href="#">Reviews</a></li><li><a
href="#">Contact</a></li></ul></ul></div><p><br
class="spacer_" /></p><h2>Animation</h2><p>You can move an object between two points on the page and use transitions to animate its movement.</p><div
id="example3" class="example"><div
class="move"><p><strong>Example #3</strong></p><p
class="control" style="color:#FFFFFF;">Click &amp; Hold!</p><div
id="astro"><img
src="http://netdna.webdesignerdepot.com/uploads/css101/astro-127531.png" alt="" /></div><p><br
class="spacer_" /></p></div></div><p><br
class="spacer_" /></p><h1>Transitions, States and Actions</h1><p>But hold on a minute there, Tex. Before diving into transitions, we have to understand the various states to which an element can transition.</p><p>States define how a particular element currently interacts with the user or the page, and they are specified in CSS using the pseudo-classes. For example, when the user hovers over an element, that element would be styled with the <code>hover</code> pseudo-class.</p><table
border="0" cellpadding="3" width="100%"><tbody><tr><td><p><strong>Dynamic Pseudo Class</strong></p></td><td><p><strong>Elements Affected</strong></p></td><td><p><strong>Description</strong></p></td></tr><tr><td><p>:link</p></td><td><p>Links only</p></td><td><p>Unvisited links</p></td></tr><tr><td><p>:visited</p></td><td><p>Links only</p></td><td><p>Visited links</p></td></tr><tr><td><p>:hover</p></td><td><p>All elements</p></td><td><p>Mouse cursor over element</p></td></tr><tr><td><p>:active</p></td><td><p>All elements</p></td><td><p>Mouse clicks element</p></td></tr><tr><td><p>:focus</p></td><td><p>All elements that can be selected</p></td><td><p>Element is selected</p></td></tr><tr><td><p>None</p></td><td><p>All elements</p></td><td><p>Default state of all elements</p></td></tr></tbody></table><p>Transitions work by changing a style over a period of time between different element states. For example, the color value of the default state of an element will pass through intermediate colors in the spectrum before appearing as the color value for the hover state.</p><p><br
class="spacer_" /></p><h1>A Simple Transition</h1><p>Let’s consider a simple transition from one color to another when the user hovers over a link. Like any other CSS property, transitions are added directly to the selector that it is to be applied to. The property can then take one of following four values.</p><p><strong>CSS property</strong><br
/> The property that is to be altered (for example, color). See the table below for a list of all of the CSS properties that can be transitioned.</p><p><strong>Duration</strong><br
/> How long the transition will last, generally in seconds (for example, <code>.25s</code>).</p><p><strong>Timing function</strong><br
/> Allows you to control how the duration is timed. Rather than using a simple linear count, you can speed up or slow down the transition or even specify a beat or count (for example, <code>linear</code>). More on this later in the article.</p><p><strong>Delay</strong><br
/> How long to wait between the action and the beginning of the transition, usually expressed in seconds (for example, <code>.1s</code>). This value can be omitted if you don’t want a delay.</p><p>Because the transition property started out as a Webkit extension, we have to include both the <code>transition</code> and <code>-webkit-transition</code> properties for backwards compatibility.</p><p>Let&#8217;s first add both of these properties to the <code>:hover</code> pseudo-class:</p><p><pre class="brush: css;">&lt;br /&gt;
a:hover {&lt;br /&gt;
   color: red;&lt;br /&gt;
   -webkit-transition: color .25s linear;&lt;br /&gt;
   transition: color .25s linear;&lt;br /&gt;
}&lt;br /&gt;
</pre></p><p>Now, when a link is hovered over, rather than jumping from blue to red, it will transition for a quarter of a second through the intermediate colors.</p><p><img
class="image-border alignnone" src="http://netdna.webdesignerdepot.com/uploads/css101/CSStransition.jpg" alt="" width="615" height="381" /></p><p>Of course, we also want to transition back to the default link color, so we&#8217;ll add a transition to the <code>:link</code> (and probably <code>:visited</code>) pseudo-classes, with just a very brief delay (one-tenth of a second) before it fades:</p><p><pre class="brush: css;">&lt;br /&gt;
a:link, a:visited {&lt;br /&gt;
   color: blue;&lt;br /&gt;
   -webkit-transition: color .25s linear .1s;&lt;br /&gt;
   transition: color .25s linear .1s;&lt;br /&gt;
}&lt;br /&gt;
</pre></p><p><br
class="spacer_" /></p><h1><strong>Adding Multiple Transitions</strong></h1><p>Because a transition is a CSS property, if you add multiple instances of the transition property in the same rule, then the last one will override previous ones, rather than add to them. So in the following rule, the only transition would be the background color:</p><p><pre class="brush: css;">&lt;br /&gt;
a:hover {&lt;br /&gt;
  color: red;&lt;br /&gt;
  background-color: rgb(235,235,185);&lt;br /&gt;
  -webkit-transition: color .25s linear;&lt;br /&gt;
  transition: color .25s linear;&lt;br /&gt;
  transition: background-color .15s linear .1;&lt;br /&gt;
}&lt;br /&gt;
</pre></p><p>Multiple transitions are added as a comma-separated list in the same transition property definition:</p><p><pre class="brush: css;">&lt;br /&gt;
a:hover {&lt;br /&gt;
  color: red;&lt;br /&gt;
  background-color: rgb(235,235,185);&lt;br /&gt;
   -webkit-transition: color .25s linear, background-color .15s linear .1s;&lt;br /&gt;
  transition: color .25s linear, background-color .15s linear .1s;&lt;br /&gt;
 }&lt;br /&gt;
</pre></p><p>This will create both a color and background-color transition.</p><p><br
class="spacer_" /></p><h1>What Can Be Transitioned?</h1><p>Almost any CSS property that has a color, length or position component, including many of the new CSS 3 properties, can be given a transition. One notable exception seems to be box-shadow.</p><p>Straight from the W3C’s Transitions spec, here is a list of CSS properties that can be given a transition, along with the aspects that are transformed. I’ve highlighted a few of the more useful properties.</p><table
border="0" cellpadding="5" width="80%"><tbody><tr><td><p><strong>CSS Property</strong></p></td><td><p><strong>What Changes</strong></p></td></tr><tr><td><p><strong>background-color</strong></p></td><td><p><strong>Color</strong></p></td></tr><tr><td><p>background-image</p></td><td><p>Only gradients</p></td></tr><tr><td><p>background-position</p></td><td><p>Percentage, length</p></td></tr><tr><td><p>border-bottom-color</p></td><td><p>Color</p></td></tr><tr><td><p>border-bottom-width</p></td><td><p>Length</p></td></tr><tr><td><p><strong>border-color</strong></p></td><td><p><strong>Color</strong></p></td></tr><tr><td><p>border-left-color</p></td><td><p>Color</p></td></tr><tr><td><p>border-left-width</p></td><td><p>Length</p></td></tr><tr><td><p>border-right-color</p></td><td><p>Color</p></td></tr><tr><td><p>border-right-width</p></td><td><p>Length</p></td></tr><tr><td><p>border-spacing</p></td><td><p>Length</p></td></tr><tr><td><p>border-top-color</p></td><td><p>Color</p></td></tr><tr><td><p>border-top-width</p></td><td><p>Length</p></td></tr><tr><td><p>border-width</p></td><td><p>Length</p></td></tr><tr><td><p><strong>bottom</strong></p></td><td><p><strong>Length, percentage</strong></p></td></tr><tr><td><p><strong>color</strong></p></td><td><p><strong>Color</strong></p></td></tr><tr><td><p>crop</p></td><td><p>Rectangle</p></td></tr><tr><td><p><strong>font-size</strong></p></td><td><p><strong>Length, percentage</strong></p></td></tr><tr><td><p><strong>font-weight</strong></p></td><td><p><strong>Number</strong></p></td></tr><tr><td><p>grid-*</p></td><td><p>Various</p></td></tr><tr><td><p><strong>height</strong></p></td><td><p><strong>Length, percentage</strong></p></td></tr><tr><td><p><strong>left</strong></p></td><td><p><strong>Length, percentage</strong></p></td></tr><tr><td><p><strong>letter-spacing</strong></p></td><td><p><strong>Length</strong></p></td></tr><tr><td><p>line-height</p></td><td><p>Number, length, percentage</p></td></tr><tr><td><p>margin-bottom</p></td><td><p>Length</p></td></tr><tr><td><p>margin-left</p></td><td><p>Length</p></td></tr><tr><td><p>margin-right</p></td><td><p>Length</p></td></tr><tr><td><p>margin-top</p></td><td><p>Length</p></td></tr><tr><td><p>max-height</p></td><td><p>Length, percentage</p></td></tr><tr><td><p>max-width</p></td><td><p>Length, percentage</p></td></tr><tr><td><p>min-height</p></td><td><p>Length, percentage</p></td></tr><tr><td><p>min-width</p></td><td><p>Length, percentage</p></td></tr><tr><td><p><strong>opacity</strong></p></td><td><p><strong>Number</strong></p></td></tr><tr><td><p>outline-color</p></td><td><p>Color</p></td></tr><tr><td><p>outline-offset</p></td><td><p>Integer</p></td></tr><tr><td><p>outline-width</p></td><td><p>Length</p></td></tr><tr><td><p>padding-bottom</p></td><td><p>Length</p></td></tr><tr><td><p>padding-left</p></td><td><p>Length</p></td></tr><tr><td><p>padding-right</p></td><td><p>Length</p></td></tr><tr><td><p>padding-top</p></td><td><p>Length</p></td></tr><tr><td><p><strong>right</strong></p></td><td><p><strong>Length, percentage</strong></p></td></tr><tr><td><p>text-indent</p></td><td><p>Length, percentage</p></td></tr><tr><td><p><strong>text-shadow</strong></p></td><td><p><strong>Shadow</strong></p></td></tr><tr><td><p><strong>top</strong></p></td><td><p><strong>Length, percentage</strong></p></td></tr><tr><td><p>vertical-align</p></td><td><p>Keywords, length, percentage</p></td></tr><tr><td><p>visibility</p></td><td><p>Visibility</p></td></tr><tr><td><p><strong>width</strong></p></td><td><p><strong>Length, percentage</strong></p></td></tr><tr><td><p>word-spacing</p></td><td><p>Length, percentage</p></td></tr><tr><td><p>z-index</p></td><td><p>Integer</p></td></tr><tr><td><p>zoom</p></td><td><p>Number</p></td></tr></tbody></table><p><br
class="spacer_" /></p><h1>Transition Timing and Delay</h1><p>With transitions, you can vary the count rate, counting slower at the beginning and speeding up at the end, vice versa, or anything in between. CSS transitions come with five keywords for transition timing and allow you to specify values for your own timing curve.</p><table
border="0"><tbody><tr><td><p><strong>Name</strong></p></td><td><p><strong>How It Works</strong></p></td></tr><tr><td><p>cubic-bezier(x1, y1, x2, y2)</p></td><td><p>X and Y values are between 0 and 1 to define the shape of a bezier curve used for the timing function.</p></td></tr><tr><td><p>linear</p></td><td><p>Constant speed</p></td></tr><tr><td><p>ease</p></td><td><p>Gradual slowdown</p></td></tr><tr><td><p>ease-in</p></td><td><p>Speed up</p></td></tr><tr><td><p>ease-out</p></td><td><p>Slow down</p></td></tr><tr><td><p>ease-in-out</p></td><td><p>Speed up and then slow down</p></td></tr></tbody></table><p><br
class="spacer_" /></p><h1>A Universal Transition?</h1><p>Transitions will quickly become standard operating procedure for all websites, 	enhancing user interface feedback.</p><p>To add ubiquitious transitions across your entire website, one option is to add a transition to the universal selector, similar to a CSS reset. This applies a default transition to all elements on the page, allowing you to keep a consistent transition:</p><p><pre class="brush: css;">&lt;br /&gt;
*:link, *:visited, *:hover, *:active, *:focus {&lt;br /&gt;
   -webkit-transition:&lt;br /&gt;
     color .25s linear,&lt;br /&gt;
      background-color .25s linear,&lt;br /&gt;
     border-color .25s linear;&lt;br /&gt;
   transition:&lt;br /&gt;
     color .25s linear,&lt;br /&gt;
     background-color .25s linear,&lt;br /&gt;
     border-color .25s linear;&lt;br /&gt;
}&lt;br /&gt;
</pre></p><p>One argument against a universal transition, and indeed against using the universal selector for CSS resets in general, is that applying a style to <em>every</em> element on the page may slow down page rendering. However, I&#8217;ve never found any evidence that this is the case. Anyone know different?</p><p><br
class="spacer_" /></p><p><em><a
href="http://www.brighteyemedia.com">Jason Cranford Teague</a> is the author of more than 13 books on digital media, including <a
href="http://www.speaking-in-styles.com/index.php/the-book/">Speaking In Styles: The Fundamentals of CSS for Web Designers</a>. For more information on CSS and web typography, check out Jason’s new book, <a
href="http://www.fluidwebtype.com">Fluid Web Typography</a>. Follow Jason on Twitter: <a
rel="nofollow" href="http://twitter.com/jasonspeaking" target="_blank">@jasonspeaking</a>.</em></p><p><em><br
/> </em></p><p><br/>If you find an exclusive RSS freebie on this feed or on the live WDD website, please use the following code to download it: H0Oa9C</p><style type="text/css">p img {display:inline-block; margin-right:10px;}
.alignleft {float:left;}
p.showcase {clear:both;}
body#browserfriendly p, body#podcast p, div#emailbody p{margin:0;}</style>]]></content:encoded> <wfw:commentRss>http://www.webdesignerdepot.com/2010/01/css-transitions-101/feed/</wfw:commentRss> <slash:comments>72</slash:comments> </item> <item><title>Solutions to 5 Common Ajax Problems</title><link>http://www.webdesignerdepot.com/2009/12/solutions-to-5-common-ajax-problems/</link> <comments>http://www.webdesignerdepot.com/2009/12/solutions-to-5-common-ajax-problems/#comments</comments> <pubDate>Mon, 14 Dec 2009 17:37:51 +0000</pubDate> <dc:creator>Walter</dc:creator> <category><![CDATA[Ajax]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Web Development]]></category> <category><![CDATA[problems]]></category><guid
isPermaLink="false">http://www.webdesignerdepot.com/?p=13932</guid> <description><![CDATA[The modern web developer who does not consider Ajax when planning or building their websites is potentially missing out on a powerful tool to enhance usability.
There are however, challenges in implementing Ajax functionality on a web page.
In this article we&#8217;ll discuss solutions to five of the most common challenges that a developer faces when using [...]]]></description> <content:encoded><![CDATA[<p><a
href="http://www.webdesignerdepot.com/2009/12/solutions-to-5-common-ajax-problems/"><img
class="alignleft" src="http://netdna.webdesignerdepot.com/uploads/ajax/thumb.jpg" alt="" width="200" height="160" /></a>The modern web developer who does not consider <strong>Ajax</strong> when planning or building their websites is potentially missing out on a powerful tool to enhance usability.</p><p>There are however, challenges in implementing Ajax functionality on a web page.</p><p>In this article we&#8217;ll discuss <strong>solutions to five of the most common challenges</strong> that a developer faces when using Ajax to enhance the content on their website.</p><p>Although there is a lot more to discuss and research on all five topics, this post should give beginners and intermediate Ajax developers some solid tips on implementing Ajax functionality in a more <strong>user-friendly and accessible manner</strong>.</p><p><span
id="more-13932"></span></p><h1>Problem #1: Content Is Not Backwards-Compatible</h1><p>This problem occurs when a designer has incorporated JavaScript and Ajax enhancements into their website&#8217;s architecture without making provisions for browsers that have disabled JavaScript.</p><p>Nothing is wrong with planning a website with JavaScript and Ajax; in fact, in today&#8217;s market, JavaScript considerations should be integral to the planning process. But you should still ensure that the website is backwards-compatible (or that it degrades gracefully) upon launch.</p><h2>Solution: Implement Ajax as an Enhancement to an Already-Functioning Website</h2><p>While Ajax may be integral to your planning of the website&#8217;s architecture, ensure that all content is accessible through conventional server-side methods.</p><p>Let&#8217;s say you have an <em>&#8220;Employee Information&#8221;</em> page that has a separate link for each employee. Using server-side technology, you could display the content for a particular employee based on a value passed through the query string, like this:</p><pre>&lt;a href="employees?view=CEO"&gt;John Doe - CEO&lt;/a&gt;
&lt;a href="employees?view=VP"&gt;Frank Smith - Vice President&lt;/a&gt;
&lt;a href="employees?view=Accountant"&gt;Jim Williams - Accountant&lt;/a&gt;
</pre><p>All of the links above point to the same page, the<em> &#8220;Employees&#8221;</em> page, which changes according to the variable in the query string. Each employee&#8217;s information would be loaded from the server, which could be done in a number of ways: via server-side includes; through a database; or even using XML.</p><p>Whichever employee link is clicked, the full page would have to load in order for the requested information to be delivered.</p><p>So, the content is fully accessible before any Ajax enhancements are layered on top. Then, using JavaScript, the full page refresh could be interrupted and the content loaded instead via Ajax. The clicked link could be identified by an ID or by checking the value of the HREF attribute in the anchor.</p><p>Although the content is fully accessible with JavaScript disabled, most users will see the enhanced Ajax-driven version.</p><p>The principle of progressive enhancement for Ajax is well known, because it is commonly used for unobtrusive JavaScript techniques and is inherent in CSS, as illustrated by the graphic below:</p><p><img
title="Ajax as an Enanchement Layer" src="http://netdna.webdesignerdepot.com/uploads/ajax/layered.jpg" alt="Ajax as an Enanchement Layer" width="615" height="378" /></p><p>So, build your website to work without JavaScript, and then add JavaScript as an enhancement, just as you would mark up your content in HTML and then<em> &#8220;enhance&#8221;</em> it with CSS.</p><p><br
class="spacer_" /></p><h1>Problem #2: The Browser&#8217;s Loading Indicator Isn&#8217;t Triggered by Ajax Requests</h1><p>Almost every browser has a way of visually indicating to the user that content is loading. In current browsers, the indicator appears on the tab that&#8217;s loading the content.</p><p>The images below show this animated indicator from a few popular browsers.</p><p><img
title="IE Browser Loading" src="http://netdna.webdesignerdepot.com/uploads/ajax/ie-indicator.jpg" alt="IE Browser Loading" width="615" height="153" /><br
/> <em>Internet Explorer&#8217;s loading indicator is a solid circle with a gradient that spins while the content loads.</em></p><p><em><br
/> </em></p><p><img
title="Firefox Browser Loading" src="http://netdna.webdesignerdepot.com/uploads/ajax/ff-indicator.jpg" alt="Firefox Browser Loading" width="615" height="209" /><br
/> <em>Firefox displays a similar icon of small spinning circles in different shades of gray.</em></p><p><em><br
/> </em></p><p><img
title="Chrome Browser Loading" src="http://netdna.webdesignerdepot.com/uploads/ajax/chrome-indicator.jpg" alt="Chrome Browser Loading" width="615" height="108" /><br
/> <em>Google Chrome spins a half-circle.</em></p><p>The problem is that Ajax requests do not trigger this &#8220;loading&#8221; indicator that is built into browsers.</p><p><br
class="spacer_" /></p><h2>Solution: Insert a Similar Loading Indicator Near Content That&#8217;s Loading</h2><p>The common solution to this is to incorporate a custom progress indicator into the Ajax request. A number of websites offer free &#8220;Ajax loading&#8221; graphics.</p><p><a
href="http://preloaders.net/"><img
title="Preloader.net" src="http://netdna.webdesignerdepot.com/uploads/ajax/preloaders.jpg" alt="Preloader.net" width="615" height="500" /></a><br
/> <em><a
href="http://preloaders.net/">Preloaders.net</a> has a number of fancy, customizable animated graphics to choose from.</em></p><p>Implementing this custom loading graphic, or progress indicator, into your website&#8217;s Ajax functionality is simply a matter of showing and hiding it at the appropriate times via JavaScript.</p><p>Your Ajax code will include lines of code that tell you if the request is in progress or completed. Using JavaScript, you can show the animated graphic while the request is being processed and then hide it when the action has completed.</p><p><br
class="spacer_" /></p><h1>Problem #3: The User Doesn&#8217;t Know That an Ajax Request Has Completed</h1><p>This is related to the previous problem but is often overlooked, because the developer might assume that the disappearance of the <em>&#8220;loading&#8221;</em> indicator suffices to inform the user that the content has completely loaded. But in most cases, definitively indicating that content has been updated or refreshed is better.</p><h2>Solution: Use a Distinct &#8220;Request Completed&#8221; Message</h2><p>This can be done similar to how form submissions are confirmed. After a link has been submitted on <a
href="http://www.digg.com/">Digg</a>, the page lets you know very clearly that your submission has been received:</p><p><a
href="http://digg.com/"><img
title="Digg's Form Submitted Indicator" src="http://netdna.webdesignerdepot.com/uploads/ajax/digg.jpg" alt="Digg's Form Submitted Indicator" width="615" height="117" /></a></p><p>Although this particular indicator does not point out a completed Ajax request, the principle is the same: the<em> &#8220;Success&#8221;</em> box appears after the page that submits the form has finished loading, and the box is colorful and distinct.</p><p>A similar graphic or indicator could be used at the end of an Ajax request to tell users that content has been updated. This would be implemented in addition to, not instead of, the progress indicator proposed for the previous problem.</p><p>A similar but subtler way to indicate that an area of content has been updated is the <a
rel="nofollow" href="http://37signals.com/svn/archives/000558.php" target="_blank">yellow fade technique</a>. This method is familiar to users, unobtrusive and works well with Ajax-loaded content.</p><p><br
class="spacer_" /></p><h1>Problem #4: Ajax Requests Cannot Access Third-Party Web Services</h1><p>The <code>XMLHttpRequest</code> object, which is at the root of all Ajax requests, is restricted to making requests on the same domain as the page making the request. But there are instances when you would want to access third-party data via an Ajax request. Many web services make their data accessible via an API.</p><h2>Solution: Use Your Server as a Proxy</h2><p>The solution to this problem is to use your server as a proxy between the third-party service and browser. Although the details of this solution are far beyond the scope of this article, we&#8217;ll go over the basic principle at work.</p><p>Because an Ajax request originates in the client&#8217;s browser, it must reference a file at another location but on the same domain as the source of the request.</p><p>Your server, however, unlike the client&#8217;s browser, is not limited in this way. So, when the page on your server is called, it runs in the background as it normally would but with access to any domain.</p><p>This doesn&#8217;t present any security risk to the user because the requests to the third-party service are made on your server. So, once the information has been obtained at the server level, the next step in the Ajax call is to send a response back to the client, which in this case would include the data obtained from the third-party web service.</p><p><img
title="Using Your Server as a Proxy to Access Web Services" src="http://netdna.webdesignerdepot.com/uploads/ajax/proxy.jpg" alt="Using Your Server as a Proxy to Access Web Services" width="615" height="500" /></p><p>If you want more details on this powerful method of combining web-service access with custom Ajax, definitely check out other resources, some of which are listed below.</p><h2>Further Reading:</h2><ul
class="tight_list"><li><a
href="http://developer.yahoo.com/javascript/howto-proxy.html">Use a Web Proxy for Cross-Domain XMLHttpRequest Calls</a></li><li><a
href="http://snook.ca/archives/javascript/cross_domain_aj">Cross Domain Ajax: a Quick Summary</a></li><li><a
href="http://jquery-howto.blogspot.com/2009/04/cross-domain-ajax-querying-with-jquery.html">Cross domain AJAX querying with jQuery</a></li></ul><p><br
class="spacer_" /></p><h1>Problem #5: Deep Linking is Not Available</h1><p>This is a trickier issue but may not be required depending on your type of website or application. The problem occurs when content is loaded via Ajax and then the &#8220;state&#8221; of the website is changed without the URL that points to the page being affected.</p><p>If the user returns to the page via a bookmark or shares the link with a friend, the updated content will not be automatically displayed. The website would instead revert to its original state. Flash websites used to have the same problem: they did not allow users to link to anything but the initial screen.</p><h2>Solution: Use Internal Page Anchors</h2><p>To ensure that a particular &#8220;state&#8221; on an Ajax-driven web page is linkable and bookmarkable, you can use internal page links, which modify the URL but don&#8217;t refresh the page or affect its vertical position.</p><p>This simple code demonstrates how this is done:</p><pre>var currentAnchor = document.location;
currentAnchor = String(currentAnchor);
currentAnchor = currentAnchor.split("#");
if (currentAnchor.length &gt; 1) {
	currentAnchor = currentAnchor[1];
} else {
	currentAnchor = currentAnchor[0];
}
switch(currentAnchor) {
	case "section1":
	// load content for section 1
	break;
	case "section2":
	// load content for section 2
	break;
	case "section3":
	// load content for section 3
	break;
	default:
	// load content for section 1
	break;
}
</pre><p>The above is not a functioning piece of code but rather a theoretical example to demonstrate the main steps involved.</p><p>The first two lines of code put the current page location (URL) in a variable. Then the location is converted to a string so that we can manipulate it.</p><p>Next, we &#8220;split&#8221; the string into two parts via the anchor symbol (#) and subsequently check to see if the array that is created from the split is greater than one item. Greater than one item means that the URL has an anchor.</p><p>If the URL has only one part, that means no anchor is present. The subsequent &#8220;switch&#8221; statement loads content according to the value of the anchor. The switch statement has a &#8220;default&#8221; option in case no anchor is present, which would be the same as loading the page in its original state.</p><p>Furthermore, we would apply code to deal with links that point directly to specific content through internal anchors. A link that points to &#8220;content2&#8243; would load the content in &#8220;content2,&#8221; and the string &#8220;#content2&#8243; would be appended to the current URL.</p><p>This would change the URL by adding an internal anchor, without changing the view of the page but preserving an identifier that indicates the desired state of the page.</p><p>This explanation is only theory. The concept works, and it works very well. But I haven&#8217;t explained all of the possibilities, drawbacks and other subtleties of building a website or page in this manner.</p><p>Follow the links below for a more comprehensive discussion of the topic, or experiment with it yourself. Also, note that this can be tested using content that changes with JavaScript alone, and doesn&#8217;t need to utilize Ajax.</p><p><br
class="spacer_" /></p><h1>Further Reading:</h1><ul
class="tight_list"><li><a
href="http://blog.onthewings.net/2009/04/08/deep-linking-for-ajax/">Deep Linking for AJAX</a></li><li><a
href="http://onjava.com/lpt/a/6293">AJAX: How to Handle Bookmarks and Back Buttons</a></li><li><a
href="http://www.contentwithstyle.co.uk/content/fixing-the-back-button-and-enabling-bookmarking-for-ajax-apps">Fixing the Back Button and Enabling Bookmarking for AJAX Apps</a></li></ul><p><br
class="spacer_" /></p><p><em>This post was written exclusively for Webdesigner Depot by Louis Lazaris, a freelance writer and web developer. Louis runs <a
href="http://www.impressivewebs.com/">Impressive Webs</a>, where he posts articles and tutorials on web design. You can follow Louis <a
href="http://twitter.com/ImpressiveWebs">on Twitter</a> or get in touch with him <a
href="http://www.impressivewebs.com/contact">through his website</a>.</em></p><p><em><strong>Do you know of any solutions to these or other Ajax challenges? Please share your comments below&#8230;</strong></em></p><p><br
class="spacer_" /></p><p><br/>If you find an exclusive RSS freebie on this feed or on the live WDD website, please use the following code to download it: H0Oa9C</p><style type="text/css">p img {display:inline-block; margin-right:10px;}
.alignleft {float:left;}
p.showcase {clear:both;}
body#browserfriendly p, body#podcast p, div#emailbody p{margin:0;}</style>]]></content:encoded> <wfw:commentRss>http://www.webdesignerdepot.com/2009/12/solutions-to-5-common-ajax-problems/feed/</wfw:commentRss> <slash:comments>40</slash:comments> </item> <item><title>10 Best CSS Practices to Improve Your Code</title><link>http://www.webdesignerdepot.com/2009/05/10-best-css-practices-to-improve-your-code/</link> <comments>http://www.webdesignerdepot.com/2009/05/10-best-css-practices-to-improve-your-code/#comments</comments> <pubDate>Wed, 20 May 2009 04:30:47 +0000</pubDate> <dc:creator>Walter</dc:creator> <category><![CDATA[CSS]]></category> <category><![CDATA[Code]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[best css practices]]></category><guid
isPermaLink="false">http://www.webdesignerdepot.com/?p=9389</guid> <description><![CDATA[It&#8217;s really easy to find yourself wondering how your CSS got to be such a mess.
Sometimes it&#8217;s the result of sloppy coding from the start, sometimes it&#8217;s because of multiple hacks and changes over time.
Whatever the cause, it doesn&#8217;t have to be that way. Writing clean, super-manageable CSS  is simple when you start off [...]]]></description> <content:encoded><![CDATA[<p><a
href="http://www.webdesignerdepot.com/2009/05/10-best-css-practices-to-improve-your-code/"><img
class="alignleft" src="http://netdna.webdesignerdepot.com/uploads/best_css_practices/best_css_practices.jpg" alt="" width="200" height="160" /></a>It&#8217;s really easy to find yourself wondering how your CSS got to be such a mess.</p><p>Sometimes it&#8217;s the result of sloppy coding from the start, sometimes it&#8217;s because of multiple hacks and changes over time.</p><p>Whatever the cause, it doesn&#8217;t have to be that way. Writing clean, super-manageable CSS  is simple when you start off on the right foot and make your code easier to maintain and edit later on.</p><p>Here are 11 tips for speeding up the process, writing CSS that is slimmer, faster and less likely to give you a headache.<span
id="more-9389"></span></p><h1>1. Stay Organized</h1><p>Just like anything else, it pays to keep yourself organized. Rather than haphazardly dropping in id’s and classes in the order in which they come to mind, use a coherent structure.</p><p>It will help you keep the cascading part of CSS in mind and sets your style sheet up to take advantage of style inheritance.</p><p><strong>Declare your most generic items first, then the not-so-generic and so on.</strong> This lets your CSS properly inherit attributes and makes it much easier for you to override a specific style when you need to. You’ll be faster at editing your CSS later because it will follow an easy to read, logical structure.</p><p>Use a structure that works best for you while keeping future edits and other developers in mind.</p><ul
class="tight_list"><li><strong>Resets and overrides</strong></li><li><strong>Links and type</strong></li><li><strong>Main layout</strong></li><li><strong>Secondary layout structures</strong></li><li><strong>Form elements</strong></li><li><strong>Miscellaneous</strong></li></ul><ol></ol><p
class="showcase"><img
src="http://netdna.webdesignerdepot.com/uploads/best_css_practices/best-css-02.jpg" alt="Screenshot" /></p><p
class="showcase"> </p><h1>2. Title, Date and Sign</h1><p>Let others know who wrote your CSS, when it was written and who to contact if they have questions about it. This is especially useful when designing templates or themes.</p><p
class="showcase"><img
src="http://netdna.webdesignerdepot.com/uploads/best_css_practices/best-css-03.jpg" alt="Screenshot" /></p><p>Wait a minute&#8230; what&#8217;s that bit about <strong>swatch colors</strong>? Over the years, I&#8217;ve found that adding a simple list of common colors used in my style sheets is extremely helpful during initial development and when making edits later on.</p><p>This saves you from having to open up Photoshop to sample a color from the design, or look up colors in the site&#8217;s <a
href="http://en.wikipedia.org/wiki/Style_guide" target="_blank">style guide</a> (if it has one). When you need the HTML code for that specific blue, just scroll up and copy it.</p><p><br
class="spacer_" /></p><h1>3. Keep a Template Library</h1><p>Once you&#8217;ve settled on a structure to use, strip out everything that isn&#8217;t generic and save the file as a CSS template for later use.</p><p>You can save multiple versions for multiple uses: a two-column layout, a blog layout, print, mobile and so on. <a
href="http://www.panic.com/coda/" target="_blank">Coda</a> (the editor for OSX) has an awesome <strong>Clips</strong> feature that lets you do this easily. Many other editors have a similar feature, but even a simple batch of text files will work nicely.</p><p>It&#8217;s insane to re-write each and every one of your style sheets from scratch, especially when you&#8217;re using the same conventions and methodologies in each.</p><p
class="showcase"><a
href="http://www.flickr.com/photos/misterdna/49841409/"><img
src="http://netdna.webdesignerdepot.com/uploads/best_css_practices/best-css-04.jpg" alt="Screenshot" /></a></p><p
class="showcase"> </p><h1>4. Use Useful Naming Conventions</h1><p>You’ll notice above where I declared a couple of column id’s and I called them col-alpha and col-beta. Why not just call them col-left and col-right? Think of future edits, always.</p><p>Next year you may need to redesign your site and move that left column to the right. You shouldn’t have to rename the element in your HTML and rename the id in your style sheet just to change its position.</p><p>Sure, you could just reposition that left column to the right and keep the id as #col-left, but how confusing is that? If the id says left, one should expect that it will always be on the left. This doesn’t leave you much room to move things around later on.</p><p>One of the major advantages of CSS is the ability to separate styles from content. You can totally redesign your site by just modifying the CSS without ever touching the HTML. So <strong>don’t muck up your CSS by using limiting names</strong>. Use more versatile naming conventions and stay consistent.</p><p>Leave position or style specific words out of your styles and id’s. A class of .link-blue will either make more work for you, or make your style sheet really messy when your client later asks you to change those blue links to orange.</p><p><strong>Name your elements based on what they are, not what they look like.</strong> For example, .comment-blue is much less versatile than .comment-beta, and .post-largefont is more limiting than .post-title.</p><p><br
class="spacer_" /></p><h1>5. Hyphens Instead of Underscores</h1><p>Older browsers like to get glitchy with underscores in CSS, or don’t support them at all. For better backward compatibility, get into the habit of using hyphens instead. Use #col-alpha rather than #col_alpha.</p><p><br
class="spacer_" /></p><h1>6. Don’t Repeat Yourself</h1><p>Re-use attributes whenever possible by grouping elements instead of declaring the styles again. If your h1 and h2 elements both use the same font size, color and margins, group them using a comma.</p><p>This:</p><p
class="showcase"><img
src="http://netdna.webdesignerdepot.com/uploads/best_css_practices/best-css-05.jpg" alt="Screenshot" /></p><p>You should also make use of shortcuts whenever possible. Always be on the lookout for opportunities to group elements and use declaration shortcuts.</p><p>You can accomplish all of this:</p><p
class="showcase"><img
src="http://netdna.webdesignerdepot.com/uploads/best_css_practices/best-css-06.jpg" alt="Screenshot" /></p><p>with only this:</p><p
class="showcase"><img
src="http://netdna.webdesignerdepot.com/uploads/best_css_practices/best-css-07.jpg" alt="Screenshot" /></p><p>It’s very important that you understand the order in which CSS interprets these shortcuts: top, right, bottom, left. A big clockwise circle, starting at noon.</p><p>Also, if your top and bottom, or left and right attributes are the same, you only need to use two:</p><p
class="showcase"><img
src="http://netdna.webdesignerdepot.com/uploads/best_css_practices/best-css-08.jpg" alt="Screenshot" /></p><p>This sets the top and bottom margins to 1em, and the left and right margins to 0.</p><p><br
class="spacer_" /></p><h1>7. Optimize for Lightweight Style Sheets</h1><p>Using the above tips, you can really cut down the size of your style sheets. Smaller loads faster, and smaller is easier to maintain and update.</p><p>Cut out what you don’t need and consolidate wherever possible by grouping. Use caution when using canned CSS frameworks as well. You’re likely to inherit lots of bulk that won’t be used.</p><p>Another quick tip for slim CSS: you don’t need to specify a unit of measure when using zero. If a margin is set to 0, you don’t need to say 0px or 0em. Zero is zero regardless of the unit of measure, and CSS understands this.</p><p><br
class="spacer_" /></p><h1>8. Write Your Base for Gecko, Then Tweak for Webkit and IE</h1><p>Save yourself troubleshooting headaches and write CSS first for Gecko browsers (Firefox, Mozilla, Netscape, Flock, Camino). If your CSS works properly with Gecko, it’s much more likely to be problem free in Webkit (Safari, Chrome) and Internet Explorer.</p><p><br
class="spacer_" /></p><h1>9. Validate</h1><p>Make use of <a
href="http://jigsaw.w3.org/css-validator/" target="_blank">W3C&#8217;s free CSS validator</a>. If you&#8217;re stuck and your layout isn&#8217;t doing what you want it to do, the CSS validator will be a big help in pointing out errors.</p><p><br
class="spacer_" /></p><h1>10. Keep a tidy house</h1><p>Separate browser-specific CSS to its own individual style sheet, and include as needed with Javascript, server-side code or <a
href="http://en.wikipedia.org/wiki/Conditional_comments" target="_blank">conditional comments</a>. Use this method to avoid dirty CSS hacks in your main style sheets. This will keep your base CSS clean and manageable.</p><p><br
class="spacer_" /></p><p
class="showcase"> </p><p
class="showcase"><em>Written exclusively for WDD by Jeff Couturier<strong><br
/> </strong></em></p><p
class="showcase"><em><strong>Do you follow these methods when coding your websites? What other techniques do you use to create better code?</strong></em></p><p
class="showcase"> </p><p><br/>If you find an exclusive RSS freebie on this feed or on the live WDD website, please use the following code to download it: H0Oa9C</p><style type="text/css">p img {display:inline-block; margin-right:10px;}
.alignleft {float:left;}
p.showcase {clear:both;}
body#browserfriendly p, body#podcast p, div#emailbody p{margin:0;}</style>]]></content:encoded> <wfw:commentRss>http://www.webdesignerdepot.com/2009/05/10-best-css-practices-to-improve-your-code/feed/</wfw:commentRss> <slash:comments>157</slash:comments> </item> <item><title>Is Google Chrome The New IE 6 For Web Designers?</title><link>http://www.webdesignerdepot.com/2009/02/is-google-chrome-the-new-ie-6-for-web-designers/</link> <comments>http://www.webdesignerdepot.com/2009/02/is-google-chrome-the-new-ie-6-for-web-designers/#comments</comments> <pubDate>Thu, 05 Feb 2009 18:44:04 +0000</pubDate> <dc:creator>Derek Underwood</dc:creator> <category><![CDATA[CSS]]></category> <category><![CDATA[Code]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Validation]]></category> <category><![CDATA[Chrome]]></category> <category><![CDATA[Chrome bugs]]></category> <category><![CDATA[Google]]></category> <category><![CDATA[Google Chrome]]></category> <category><![CDATA[HTML]]></category> <category><![CDATA[XHTML]]></category><guid
isPermaLink="false">http://www.webdesignerdepot.com/?p=3581</guid> <description><![CDATA[Just when you thought you were done with IE 6 and its hacks and exceptions, now you&#8217;ve got a new browser to consider: Google&#8217;s Chrome.
The good news is that Chrome is a lot more compatible with web standards than IE 5 and 6. However, Chrome has its own idiosyncrasies and bugs.
No one knows if Chrome [...]]]></description> <content:encoded><![CDATA[<p><a
href="http://www.webdesignerdepot.com/2009/02/is-google-chrome-the-new-ie-6-for-web-designers/"><img
class="alignleft size-full wp-image-3724" title="chrome" src="http://netdna.webdesignerdepot.com/uploads/2009/02/chrome.jpg" alt="" width="200" height="160" /></a>Just when you thought you were done with IE 6 and its hacks and exceptions, now you&#8217;ve got a new browser to consider:<strong> <a
title="Google Chrome" rel="nofollow" href="http://www.google.com/chrome">Google&#8217;s Chrome</a></strong>.</p><p>The good news is that <strong>Chrome is a lot more compatible with web standards than IE 5 and 6</strong>. However, Chrome has its own idiosyncrasies and bugs.</p><p>No one knows if Chrome is here to stay, but it has already captured a surprisingly decent share of the web browser market in a short period of time. <strong></strong></p><p>Here are some <strong>tips to get your web pages working in Chrome</strong> and hopefully looking the way they were designed to look.</p><table
border="0"></table><p><span
id="more-3581"></span></p><h1>Mac Users</h1><p>As of February 2009, Chrome is still a browser for Microsoft Windows PCs. If you use a Mac, you will need to run Microsoft Windows through <a
title="Apple OS X Bootcamp" rel="nofollow" href="http://www.apple.com/macosx/features/bootcamp.html">Bootcamp</a>, or one of the virtualization products for the Mac (<a
title="Sun Microsystems VirtualBox" rel="nofollow" href="http://www.virtualbox.org/">Sun’s VirtualBox</a>, <a
title="Parallels" rel="nofollow" href="http://www.parallels.com/">Parallels</a>, <a
title="VMWare Fusion" rel="nofollow" href="http://www.vmware.com/products/fusion/">VMWare Fusion</a>). If you are really daring, you can try and get Chrome to run using <a
rel="nofollow" href="http://www.kronenberg.org/darwine/">Darwine</a>. Google promises to have a native Mac version of Chrome available in the coming months.</p><h1>Vanishing Pop-Ups</h1><p>Pop-Up blocking is great unless your website really needs pop-up functionality. If you have a web page that must use pop-ups, you won’t see them in Chrome. By design, Chrome only displays the title of a pop-up and minimizes it to the bottom right corner of the browser window. Users will need to click and drag the pop-up’s title in order to view its content.</p><p><img
class="alignnone size-full wp-image-3583" src="http://netdna.webdesignerdepot.com/uploads/2009/01/chrome-popups.jpg" alt="" width="615" height="227" /></p><h1>SSL is Broken?</h1><p>By design, Chrome will only certify a valid SSL (secure sockets layer) page with the padlock icon if all the elements on the page are served via SSL. In other words, if your page is served via SSL but it calls elements via non-secured HTTP, Chrome will give your page an exclamation point icon indicating that it considers your page to be an inconsistent SSL transmission. To get around this, make sure that all the resources loaded by your web page, <em>including all images</em>, are prefaced with <strong>HTTPS</strong>.</p><p><img
class="alignnone size-full wp-image-3584" src="http://netdna.webdesignerdepot.com/uploads/2009/01/chrome-ssl.jpg" alt="" width="615" height="475" /></p><h1>Declare Encoding First</h1><p>If your web page text is garbled or otherwise just plain wrong in Chrome, you may need to insert <em>encoding</em> information into the <span
style="#008000;">&lt;head&gt;</span> section of each web page. If you already have encoding information, it must come <strong>first</strong>, before any CSS or Javascript. Otherwise, Chrome will just ignore it. A working example:</p><p><span
style="#008000;"> &lt;html&gt;<br
/> &lt;head&gt;<br
/> <span
style="#ff0000;"> &lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text/html; charset=windows-1251&#8243;&gt;</span><br
/> &lt;script type=&#8221;text/javascript&#8221;&gt;<br
/> &#8230; your JavaScript code &#8230;<br
/> &lt;/script&gt;<br
/> &#8230; your CSS code &#8230;<br
/> </span><br
/> Also, Chrome will ignore encoding specified by Javascript. Period. For example, the following would be ignored:</p><p><span
style="#ff0000;">document.write(&#8221;&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text/html; charset=windows-1251&#8243;&gt;&#8221;);</span><br
/> Instead of using JavaScript, you must insert your encoding into the beginning of the <span
style="#008000;">&lt;head&gt;</span> section of each web page as shown above.</p><h1>Bookmark Favorites</h1><p>When users choose to bookmark your web site, you can control the default bookmark name, description, link, and bookmark icon. Just make sure to place your code in the <span
style="#008000;">&lt;head&gt;</span> section of your web pages. Here is a working example:</p><p><span
style="#008000;">&lt;head&gt;<br
/> <span
style="#ff0000;"> &lt;meta name=&#8221;application-name&#8221; content=&#8221;Greatest Website&#8221;/&gt;<br
/> &lt;meta name=&#8221;description&#8221; content=&#8221;The very best on the web&#8221;/&gt;<br
/> &lt;meta name=&#8221;application-url&#8221; content=&#8221;http://www.superfantasticgreatestweb.com&#8221;/&gt;<br
/> &lt;link rel=&#8221;icon&#8221; href=”great-icon_32&#215;32.png” sizes=&#8221;32&#215;32&#8243;/&gt;<br
/> &lt;link rel=&#8221;icon&#8221; href=”great-icon_48&#215;48.png” sizes=&#8221;48&#215;48&#8243;/&gt;</span><br
/> &lt;/head&gt;</span></p><p><img
class="alignnone size-full wp-image-3585" src="http://netdna.webdesignerdepot.com/uploads/2009/01/chrome-bookmarks.jpg" alt="" width="615" height="474" /></p><h1>Fixing JavaScript</h1><p>If your JavaScript is not working properly in Chrome, check Chrome’s JavaScript console, accessible from the <strong>Page menu icon -&gt; Developer -&gt; JavaScript console</strong>. That should give you some direction as to what you can change.</p><p>For the more advanced JavaScript developers, you can also use the JavaScript Debugger, accessible from the <strong>Page menu icon -&gt; Developer -&gt; Debug JavaScript</strong>. That will allow you to watch variables and set breakpoints.</p><p><img
class="alignnone size-full wp-image-3586" src="http://netdna.webdesignerdepot.com/uploads/2009/01/chrome-developer.jpg" alt="" width="615" height="312" /></p><h1>CSS Image Problems</h1><p>If you are using images or backgrounds implemented through CSS and they are not rendering properly in Chrome, you might want to <strong>convert images between GIF, JPG, and PNG</strong> to see if a different image format solves your problems. Although this makes no sense, it sometimes works, especially with random spacing and image formatting problems.</p><h1>CSS “First” Selector Hack</h1><p>Chrome can be finicky and unforgiving about CSS and may ignore styles applied to certain page elements. You might try using the “<strong>first-of-type</strong>” keyword which will be ignored by all other browsers (except for Apple’s Safari). For example, if you cannot get a particular style applied to the <span
style="#008000;">&lt;body&gt;</span> section of your web page to work in Chrome, add in something like the following:</p><p><span
style="#ff0000;">body:first-of-type p {color:#ff0000;}</span></p><p>“First-of-type” will simply be ignored by the browsers that are already displaying your page the way you intended.</p><h1>GiantIsland CSS Hack</h1><p>Chrome interprets cascading style sheets (CSS) differently than other browsers. Then again, IE 5, 6, and 7 do not even interpret CSS the same! The GiantIsland CSS Hack is a relatively simple CSS markup hack that makes use of square brackets <span
style="#ff0000;">[ ]</span> to target CSS on specific browsers like Chrome. As a bonus, it can also help you conform your CSS to IE 5, 6, 7, Safari, and Firefox, all at the same time. For more details, check it out at <a
title="GiantIsland CSS Hack" rel="nofollow" href="http://www.giantisland.com/Resources/LitePacificHackforSafariAndIE7.aspx">http://www.giantisland.com/Resources/LitePacificHackforSafariAndIE7.aspx</a>.</p><h1>Stay Away from HTML5</h1><p>Chrome does not try to conform to HTML5 API standards yet, even though Webkit, its rendering engine, does support HTML5. If you use HTML5 features or syntax, you will likely run into problems. Stick with HTML4 standards and you should have an easier time. Chrome will likely support HTML5 in the near future.</p><h1>Validate Your Pages</h1><p>Before swearing at Chrome and throwing in the towel, validate your pages to make sure you have not inadvertently used a non-standard HTML call. You can validate any web page at <a
title="HTML Validator" rel="nofollow" href="http://validator.w3.org/">http://validator.w3.org/</a>. Some web browsers allow you to take some shortcuts with web standards, but Chrome is not very lenient.</p><p><img
class="alignnone size-full wp-image-3587" src="http://netdna.webdesignerdepot.com/uploads/2009/01/chrome-validate.jpg" alt="" width="615" height="385" /></p><h1>Try it with Safari</h1><p>If you can&#8217;t get your web pages to look right under Chrome no matter what you try, try your web pages in Safari before giving up. Safari is Apple&#8217;s web browser and is available for both Mac and Windows PCs. If you use Windows, you can freely download Safari from Apple at <a
title="Safari" rel="nofollow" href="http://www.apple.com/safari/download/">http://www.apple.com/safari/download/</a>. Both Chrome and Safari are built using the open source &#8220;<strong>Webkit</strong>&#8221; browser rendering engine. If you can see a rendering error in both Chrome and Safari, there is a good chance that Webkit is the culprit. You can post a bug for the Webkit developers at <a
title="WebKit Bugs" rel="nofollow" href="http://webkit.org/quality/reporting.html">http://webkit.org/quality/reporting.html</a>.</p><h1>Aw Snap!</h1><p>The Chrome developers have provided some funny error messages (if an error can be considered funny). If Chrome gives you the dark grey “<strong>Aw Snap!</strong>” page which also says “<strong>Something went wrong while displaying this webpage</strong>,” it might not be your web page at all. Chrome has a tendency to crash on some PCs depending on system settings and other installed applications. Try a few other well-known web pages, and see if they crash. Also try closing Chrome, re-launching it, and then test your web pages again. Some people have found Chrome to be unstable on some PCs. Google intends for Chrome to become more sturdy with each new version.</p><h1>Bug Reporting</h1><p>If you find a bug with Chrome&#8217;s rendering, report it!  You will be making the world a better place. Google maintains a public bug list for Chrome at <a
title="Chrome Buglist" rel="nofollow" href="http://code.google.com/p/chromium/issues/list">http://code.google.com/p/chromium/issues/list</a>.</p><p><img
class="alignnone size-full wp-image-3588" src="http://netdna.webdesignerdepot.com/uploads/2009/01/chrome-buglist.jpg" alt="" width="615" height="359" /></p><p><em>Written exclusively for WDD by Derek Underwood, a professional web designer and software developer. You can read more about Derek and contact him at his website:</em><strong><em><br
/> <a
title="Derek Underwood" rel="nofollow" href="http://www.derekunderwood.com"> http://www.derekunderwood.com</a></em></strong></p><p><strong><em>Have you been testing your web pages in Chrome? Do you think Chrome is here to stay? Share your opinions and experiences.</em></strong></p><p><br/>If you find an exclusive RSS freebie on this feed or on the live WDD website, please use the following code to download it: H0Oa9C</p><style type="text/css">p img {display:inline-block; margin-right:10px;}
.alignleft {float:left;}
p.showcase {clear:both;}
body#browserfriendly p, body#podcast p, div#emailbody p{margin:0;}</style>]]></content:encoded> <wfw:commentRss>http://www.webdesignerdepot.com/2009/02/is-google-chrome-the-new-ie-6-for-web-designers/feed/</wfw:commentRss> <slash:comments>123</slash:comments> </item> <item><title>6 Reasons Why Designers Should Code</title><link>http://www.webdesignerdepot.com/2009/01/6-reasons-why-designers-should-code/</link> <comments>http://www.webdesignerdepot.com/2009/01/6-reasons-why-designers-should-code/#comments</comments> <pubDate>Wed, 14 Jan 2009 06:43:06 +0000</pubDate> <dc:creator>Walter</dc:creator> <category><![CDATA[Accessibility]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[SEO]]></category> <category><![CDATA[Coding]]></category> <category><![CDATA[HTML]]></category><guid
isPermaLink="false">http://www.webdesignerdepot.com/?p=2871</guid> <description><![CDATA[I know, I know&#8230;none of us creative types want anything to do with coding past the very basic HTML/CSS we need to know to get our designs to the developers.
Doing development is something for those programming grunts, those code jockeys, those geeks.
Why should we enter the trenches of development when it&#8217;s so nice up here [...]]]></description> <content:encoded><![CDATA[<p><a
href="http://www.webdesignerdepot.com/2009/01/6-reasons-why-designers-should-code/"><img
class="alignleft size-full wp-image-2926" title="code" src="http://netdna.webdesignerdepot.com/uploads/2009/01/code.jpg" alt="" width="200" height="160" /></a>I know, I know&#8230;none of us creative types want anything to do with coding past the very basic HTML/CSS we need to know to get our designs to the developers.</p><p>Doing development is something for those programming grunts, those code jockeys, those geeks.</p><p>Why should we enter the trenches of development when it&#8217;s so nice up here with the Photoshop brushes, afternoon tea, and MacPros?   Because you&#8217;ll be a better designer for it.</p><p>Skeptical? Read on and discover 6 reasons why designers should code&#8230;<span
id="more-2871"></span></p><h1>1. Better XHTML</h1><p>I&#8217;ve worked with and known many designers who knew only the bare minimum needed to get their designs out of Photoshop and into a web format. Oftentimes they would make use of a software program or plugin like <a
rel="nofollow" href="http://www.medialab.com/sitegrinder/">SiteGrinder</a>. While these programs keep getting better and better at making compliant code, they still don&#8217;t match the human-produced variety.</p><p><strong>Knowing how to write your own standards-compliant XHTML will make you a valuable addition to any web team </strong>(emphasis on the standards-compliant part). With all the fuss about PHP, ASP.NET, Ruby, and many other languages, people tend to forget that everything ends up being HTML in the end, because that&#8217;s what your browser has to have in order to render a page.<strong> The more you know about the medium you work in, the better you work in that medium.</strong></p><h1>2. Better SEO</h1><p>And while we&#8217;re talking about standards-compliant code, we should mention <strong>SEO</strong>. This is a big buzzword, though not quite as much as it has been in the past. However, what this means is that SEO is becoming a much more commonplace idea of what a website should strive for, instead of just an added special feature for big business sites.</p><p>If you can learn to write your own code, you&#8217;re much closer to being able to list <strong>“SEO Compliant Designs”</strong> on your sheet of available services. That means you can charge more, and it&#8217;s another badge on your hat.</p><h1>3. Better Accessibility</h1><p><strong>Better code and better SEO = better accessibility</strong>. Part of of the job of any designer is to present information in a clear and coherent manner, and on the web that means not solely in a visual manner. A shoddily-coded website can be a nightmare to navigate if you&#8217;re blind, or even if you&#8217;re using a mobile device.</p><p>Learning the ins and outs of developing code for accessibility not only allows you have that knowledge as part of your production skillset, but it will also help you to better understand the considerations you should take when designing for accessibility.</p><p>Accessibility is a mandate for all government websites, nearly all education sites, and businesses are starting to see the value in it as well. <strong>The more people you can reach via your site, the more chance you have of accomplishing your goal, whatever it may be.</strong> And that has to be reflected in any successful design.</p><h1>4. Better Left Side</h1><p>Being a right-brained creative is great, but giving your left side a workout can spur on creativity of a different nature. The motto at the bottom of the <a
rel="nofollow" href="http://wordpress.org/">WordPress</a> website is <em><strong>“Code Is Poetry”</strong></em>, and this is because translating a written language to something that can be visually seen is truly an art form.</p><p><strong>Learning to write your own code opens up whole new avenues of expression</strong>. Developing your technical and analytical abilities can improve your information design, developing wireframes, and create a pathway to work with interaction design. And who knows, it may even improve your math skills!</p><h1>5. Better Communication</h1><p>It&#8217;s easy to get lost in the techno-jargon used by developers, simply because you may not have been exposed to the type of things they are discussing. Digging in and working with code yourself will allow you to become familiar with the terminology that is used when conversing about the construction of a site.</p><p>Being able to speak the lingo will help when you need to communicate with a developer or project manager about how a design should be implemented.</p><h1>6. Better Design</h1><p>You can only do so much knowing the fundamentals of design. Typography, color theory, composition, etc. are all fantastic and extremely important skills to know (and know well)&#8230;but eventually if you want to excel in your creativity, you must learn the tools of the trade. Painters learn about canvas types, paint compositions, and bristle qualities. Web design is no exception. <strong>Learn to code: you&#8217;ll be better for it.</strong></p><p><em>Written exclusively for WDD by <a
rel="nofollow" href="http://ryanburrell.com/">Ryan Burrell</a>.</em></p><p><strong><em>Are you a designer that codes? Should all designers learn how to code?</em> <em>Please share your comments below.</em></strong></p><p><br/>If you find an exclusive RSS freebie on this feed or on the live WDD website, please use the following code to download it: H0Oa9C</p><style type="text/css">p img {display:inline-block; margin-right:10px;}
.alignleft {float:left;}
p.showcase {clear:both;}
body#browserfriendly p, body#podcast p, div#emailbody p{margin:0;}</style>]]></content:encoded> <wfw:commentRss>http://www.webdesignerdepot.com/2009/01/6-reasons-why-designers-should-code/feed/</wfw:commentRss> <slash:comments>140</slash:comments> </item> <item><title>Quick and Easy WordPress Development on a Mac with MAMP</title><link>http://www.webdesignerdepot.com/2008/12/quick-and-easy-wordpress-development-on-a-mac-with-mamp/</link> <comments>http://www.webdesignerdepot.com/2008/12/quick-and-easy-wordpress-development-on-a-mac-with-mamp/#comments</comments> <pubDate>Sat, 20 Dec 2008 07:30:33 +0000</pubDate> <dc:creator>Derek Underwood</dc:creator> <category><![CDATA[Code]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[Mac]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[PHP]]></category><guid
isPermaLink="false">http://www.webdesignerdepot.com/?p=1637</guid> <description><![CDATA[Ready for some WordPress development on your Mac? First, you need to be running Apache, MySQL, and PHP.
Although Mac OS X comes with Apache and PHP, you don’t want Apple’s automatic software update to break your development environment by changing your working versions of PHP and Apache. Plus, do you really want to spend time [...]]]></description> <content:encoded><![CDATA[<p><a
href="http://netdna.webdesignerdepot.com/uploads/2008/12/mamp1.jpg"><img
class="size-full wp-image-2320 alignleft" title="mamp1" src="http://netdna.webdesignerdepot.com/uploads/2008/12/mamp1.jpg" alt="" width="200" height="160" /></a>Ready for some WordPress development on your Mac? First, <strong>you need to be running Apache, MySQL, and PHP</strong>.</p><p>Although Mac OS X comes with Apache and PHP, you don’t want Apple’s automatic software update to break your development environment by changing your working versions of PHP and Apache. Plus, do you really want to spend time tweaking MySQL?</p><p>In this guide, I will show you how to <strong>quickly install and configure a working WordPress environment including Apache, PHP, and MySql</strong>.<span
id="more-1637"></span></p><h1>1. Turn off Web Sharing</h1><p>First, you need to make sure the Mac OS X installation of Apache is not running. Navigate into your System Settings and check the <em>“Sharing” </em>settings. You want to turn off <em>“Web Sharing”</em> if it is currently enabled.</p><p><a
href="http://netdna.webdesignerdepot.com/uploads/2008/12/system-settings-sharing.jpg"><img
class="alignnone size-full wp-image-1639" src="http://netdna.webdesignerdepot.com/uploads/2008/12/system-settings-sharing.jpg" alt="" width="615" height="516" /></a></p><h1>2. Use MAMP</h1><p>MAMP is a free and ready-to-go install of Apache, MySQL, and PHP for Mac OS X. It is developed by Living-e. They also have a “Pro” version at additional expense. One of the great things about MAMP is that it includes almost every PHP option pre-installed and enabled. As a bonus, it comes with <em>phpMyAdmin</em> to help you work with databases quickly. To get MAMP, open up your web browser and go to <a
title="MAMP" rel="nofollow" href="http://www.mamp.info/en/download.html" target="_blank">http://www.mamp.info/en/download.html</a>. Download MAMP, mount it, and then drag the MAMP folder into your Applications folder. You can safely ignore the “MAMP Pro” folder.</p><p><a
href="http://netdna.webdesignerdepot.com/uploads/2008/12/mamp-website.jpg"><img
class="alignnone size-full wp-image-1640" src="http://netdna.webdesignerdepot.com/uploads/2008/12/mamp-website.jpg" alt="" width="615" height="545" /></a></p><h1>3. Configure MAMP</h1><p>Go into the MAMP folder and then open the MAMP icon.</p><p><a
href="http://netdna.webdesignerdepot.com/uploads/2008/12/applications-mamp.jpg"><img
class="alignnone size-full wp-image-1641" src="http://netdna.webdesignerdepot.com/uploads/2008/12/applications-mamp.jpg" alt="" width="615" height="517" /></a><br
/> The status lights will tell you if Apache and MySQL are running. If the lights are red, click<em> “Start Servers”</em>. Next, modify the ports for Apache and MySQL by selecting <em>“Preferences”</em> and select “Set to default Apache and MySQL ports.” You should end up with port 80 for Apache and port 3306 for MySQL. Next, click on the Apache section and change the Document Root to a location that you can quickly access. All your websites will reside in this location, so you want to pick something that you can navigate into easily. I like to use a root folder called “webspace” that I created in the Finder.</p><p><a
href="http://netdna.webdesignerdepot.com/uploads/2008/12/mamp-settings.jpg"><img
class="alignnone size-full wp-image-1642" src="http://netdna.webdesignerdepot.com/uploads/2008/12/mamp-settings.jpg" alt="" width="200" height="169" /></a><a
href="http://netdna.webdesignerdepot.com/uploads/2008/12/mamp-ports.jpg"><img
class="alignnone size-full wp-image-1643" src="http://netdna.webdesignerdepot.com/uploads/2008/12/mamp-ports.jpg" alt="" width="200" height="136" /></a><a
href="http://netdna.webdesignerdepot.com/uploads/2008/12/mamp-apache.jpg"><img
class="alignnone size-full wp-image-1644" src="http://netdna.webdesignerdepot.com/uploads/2008/12/mamp-apache.jpg" alt="" width="200" height="136" /></a></p><h1>4. Make a Database for WordPress</h1><p>WordPress requires a MySQL database to store posts and settings. You already have MySQL running, but you need to create a separate database for each WordPress website that you develop on your Mac. From the main MAMP menu, click on “Open start page.” Your web browser should pop open up to a “Welcome to MAMP” page.</p><p><a
href="http://netdna.webdesignerdepot.com/uploads/2008/12/mamp-start.jpg"><img
class="alignnone size-full wp-image-1645" src="http://netdna.webdesignerdepot.com/uploads/2008/12/mamp-start.jpg" alt="" width="615" height="351" /></a></p><p>Next, click on <em>“phpMyAdmin” </em>to launch the phpMyAdmin web application. Look for the section entitled <em>“Create new database”</em> and name your database. As an example, enter<em> “wp-superblog”</em> and click “Create” to make a database.</p><p><a
href="http://netdna.webdesignerdepot.com/uploads/2008/12/picture-4.jpg"><img
class="alignnone size-full wp-image-1647" src="http://netdna.webdesignerdepot.com/uploads/2008/12/picture-4.jpg" alt="" width="615" height="351" /></a></p><h1>5. Make a folder for your website</h1><p>Within your <em>“webspace” </em>folder, make a new folder with the name of the website that you will be developing. As an example, make a folder called <em>“super-blog”</em> to correspond to the database you made.</p><p><a
href="http://netdna.webdesignerdepot.com/uploads/2008/12/webspace.jpg"><img
class="alignnone size-full wp-image-1648" src="http://netdna.webdesignerdepot.com/uploads/2008/12/webspace.jpg" alt="" width="615" height="373" /></a></p><h1>6. Install WordPress</h1><p>The easiest way to download WordPress is to point your web browser to <a
rel="nofollow" href="http://www.wordpress.org/latest.zip" target="_blank">http://www.wordpress.org/latest.zip</a> Unzip the WordPress package and copy everything in the WordPress folder into your “super-blog” folder.</p><h1>7. Configure WordPress</h1><p>Navigate into your <em>“super-blog”</em> folder and locate a file called<em> “wp-config-sample.php”</em>. Open that file and change both the database username and password to “root” on lines 4 and 5. Next, make sure the name of your database (<em>“wp-superblog” </em>in our example) is shown on line 3. Save the changes you made to this file and then rename the file <em>“wp-config.php”</em>.</p><p><a
href="http://netdna.webdesignerdepot.com/uploads/2008/12/picture-3.jpg"><img
class="alignnone size-full wp-image-1649" src="http://netdna.webdesignerdepot.com/uploads/2008/12/picture-3.jpg" alt="" width="615" height="421" /></a></p><h1>8. Take a Test Drive</h1><p>Open up a web browser and navigate to <em>“localhost”</em>. You should see a folder for each website you are developing. In our example, you should see a folder named <em>“super-blog”</em>. If you click on it, you should instantly get to your new WordPress website.</p><p><a
href="http://netdna.webdesignerdepot.com/uploads/2008/12/picture-2.jpg"><img
class="alignnone size-full wp-image-1650" src="http://netdna.webdesignerdepot.com/uploads/2008/12/picture-2.jpg" alt="" width="615" height="545" /></a></p><h1>9. Turning MAMP on and off</h1><p>When you are not developing and testing a website, you may want to turn off Apache, PHP and MySQL. MAMP comes with a dashboard widget that will turn your environment on and off instantly. You can find the widget in the MAMP folder.</p><p><a
href="http://netdna.webdesignerdepot.com/uploads/2008/12/mamp-dashboard-1.jpg"><img
class="alignnone size-full wp-image-1651" src="http://netdna.webdesignerdepot.com/uploads/2008/12/mamp-dashboard-1.jpg" alt="" width="160" height="160" /></a><a
href="http://netdna.webdesignerdepot.com/uploads/2008/12/mamp-dashboard-2.jpg"><img
class="alignnone size-full wp-image-1652" src="http://netdna.webdesignerdepot.com/uploads/2008/12/mamp-dashboard-2.jpg" alt="" width="160" height="160" /></a></p><p><em><strong>Written exclusively for WDD by Derek Underwood,</strong></em><em><strong> a professional web designer and software developer. You can read more about Derek and contact him at his website:</strong> <a
title="www.derekunderwood.com" rel="nofollow" href="http://www.derekunderwood.com" target="_blank">http://www.derekunderwood.com</a></em></p><p><br/>If you find an exclusive RSS freebie on this feed or on the live WDD website, please use the following code to download it: H0Oa9C</p><style type="text/css">p img {display:inline-block; margin-right:10px;}
.alignleft {float:left;}
p.showcase {clear:both;}
body#browserfriendly p, body#podcast p, div#emailbody p{margin:0;}</style>]]></content:encoded> <wfw:commentRss>http://www.webdesignerdepot.com/2008/12/quick-and-easy-wordpress-development-on-a-mac-with-mamp/feed/</wfw:commentRss> <slash:comments>47</slash:comments> </item> <item><title>20 Excellent Free Rich-Text Editors</title><link>http://www.webdesignerdepot.com/2008/12/20-excellent-free-rich-text-editors/</link> <comments>http://www.webdesignerdepot.com/2008/12/20-excellent-free-rich-text-editors/#comments</comments> <pubDate>Tue, 02 Dec 2008 17:52:25 +0000</pubDate> <dc:creator>Jacob</dc:creator> <category><![CDATA[Programming]]></category> <category><![CDATA[Rich Text Editors]]></category> <category><![CDATA[Html Text Editors]]></category> <category><![CDATA[WYSIWYG]]></category><guid
isPermaLink="false">http://www.webdesignerdepot.com/?p=1076</guid> <description><![CDATA[Rich-text editors, also known as online rich-text  editors, are web components that allow users to edit and enter text within  a web browser. Rich-text editors are used in numerous ways such as in enhancing  your comment input form or as part of a web application that allows entry of  user-generated and [...]]]></description> <content:encoded><![CDATA[<p><a
href="http://netdna.webdesignerdepot.com/uploads/2008/12/rte.jpg"><img
class="alignleft size-full wp-image-1363" title="rte" src="http://netdna.webdesignerdepot.com/uploads/2008/12/rte.jpg" alt="" width="200" height="160" /></a><em>Rich-text editors</em>, also known as <a
href="http://en.wikipedia.org/wiki/Online_rich-text_editor"><em>online rich-text  editors</em></a>, are web components that allow users to edit and enter text within  a web browser. Rich-text editors are used in numerous ways such as in enhancing  your comment input form or as part of a web application that allows entry of  user-generated and formatted content. <strong>Rich-text editors are essentially  web-based WYSIWYG</strong> (&#8221;what you see is what you get&#8221;) editors.</p><p>There are many rich-text editors out there. What&#8217;s <em>even better</em> than a lot of choices? Many  of the best rich-text editors currently in the market are <em>free</em>.</p><p>In this article, we present <em>20 exceptional (and free) rich-text editors</em>.<span
id="more-1076"></span></p><h1>1. TinyMCE</h1><p><em>TinyMCE</em> is an open  source (under the <a
title="Information on the GNU Lesser General Public License - GNU Project" href="http://www.gnu.org/licenses/lgpl.html">GNU  Lesser General Public License</a>) rich-text editor released and maintained by <a
title="Moxiecode home page." href="http://www.moxiecode.com/">Moxiecode</a>. As indicated by the name, TinyMCE is lightweight but highly customizable through an intuitive API. TinyMCE&#8217;s plugin system allows you to download themes and plugins to extend the core installation.</p><p><a
href="http://netdna.webdesignerdepot.com/uploads/2008/11/01_tinymce.jpg"><img
class="alignnone size-full wp-image-1078" src="http://netdna.webdesignerdepot.com/uploads/2008/11/01_tinymce.jpg" alt="" width="615" height="315" /></a></p><p><a
href="http://tinymce.moxiecode.com/">TinyMCE</a> |<a
href="http://tinymce.moxiecode.com/"> </a><a
href="http://tinymce.moxiecode.com/examples/full.php">Demo</a> | <a
href="http://tinymce.moxiecode.com/download.php">Download </a></p><h1>2. FCK Editor</h1><p><em>FCKeditor</em> is  another wildly popular open source online rich-text editor (check out <a
title="FCKeditor - Who's using FCKeditor?" href="http://www.fckeditor.net/whosusing">some of the websites that use it</a>). It has a &#8220;Word clean-up&#8221; feature that automatically detects and cleans up text that&#8217;s copied from Microsoft Word documents. It has one of the best HTML table editing and creation features, making it very easy for users to create and edit tables for displaying data.</p><p><a
href="http://netdna.webdesignerdepot.com/uploads/2008/11/02_fckeditor.jpg"><img
class="alignnone size-full wp-image-1080" src="http://netdna.webdesignerdepot.com/uploads/2008/11/02_fckeditor.jpg" alt="" width="613" height="227" /></a></p><p><a
href="http://www.fckeditor.net/">FCKeditor</a> | <a
href="http://www.fckeditor.net/demo">Demo</a> | <a
href="http://www.fckeditor.net/download">Download</a></p><h1>3. NicEdit</h1><p><em>NicEdit</em> is lightweight, no-fuss cross-platform rich-text editor that emphasizes user-friendliness and simplicity over barraging users with too many features. You can serve NicEdit remotely from the NicEdit website; all you have to do is copy a JavaScript code snipplet and voila – it just works (as well as saving your server some system resources).<a
href="http://www.nicedit.com/"><br
/> </a><a
href="http://netdna.webdesignerdepot.com/uploads/2008/11/03_nicedit.jpg"><img
class="alignnone size-full wp-image-1081" src="http://netdna.webdesignerdepot.com/uploads/2008/11/03_nicedit.jpg" alt="" width="615" height="315" /></a><a
href="http://www.nicedit.com/"><br
/> NicEdit</a> | <a
href="http://www.nicedit.com/demos.php">Demo</a> | <a
href="http://www.nicedit.com/download.php">Download</a></p><h1>4. BXE</h1><p><em>BXE</em> is an XML-based WYSIWYG editor that allows you to change an entire web page. It has been an open source application since 2002 &#8211; and with a devout following &#8211; you might be able to quickly find some help if you run into any issues in the <a
title="BXE IRC information." href="http://www.bitfluxeditor.org/development/irc/">BXE IRC channel</a>.<a
href="http://www.bitfluxeditor.org/"><br
/> </a><a
href="http://netdna.webdesignerdepot.com/uploads/2008/11/04_bitflux_editor.jpg"><img
class="alignnone size-full wp-image-1082" src="http://netdna.webdesignerdepot.com/uploads/2008/11/04_bitflux_editor.jpg" alt="" width="615" height="315" /></a></p><p><a
href="http://www.bitfluxeditor.org/">BXE</a> | <a
href="http://cvsdemo.bitfluxeditor.org/">Demo</a> | <a
href="http://www.bitfluxeditor.org/download/">Download</a></p><h1>5. MarkItUp!</h1><p><em>markItUp!</em> is a  JavaScript-based markup editor built on top of the <a
title="The Write Less, Do More, JavaScript Library" href="http://jquery.com/">jQuery library</a>. With markItUp!, you can easily turn any HTML textarea into a fully-featured WYSIWYG editor. It&#8217;s lightweight (the script weighs in at only 6.5kb), supports keyboard shortcuts, has a built-in Ajax live preview and many more features that make markItUp! an excellent choice.</p><p><a
href="http://markitup.jaysalvat.com/home/"> </a><a
href="http://netdna.webdesignerdepot.com/uploads/2008/11/05_markitup.jpg"><img
class="alignnone size-full wp-image-1083" src="http://netdna.webdesignerdepot.com/uploads/2008/11/05_markitup.jpg" alt="" width="615" height="315" /></a></p><p><a
href="http://markitup.jaysalvat.com/home/">markItUp!</a> | <a
href="http://markitup.jaysalvat.com/examples/">Demo</a> | <a
href="http://markitup.jaysalvat.com/downloads/">Download</a></p><h1>6. WidgEditor</h1><p>The <em>widgEditor</em> is  an open source project of <a
href="http://www.themaninblue.com/">Cameron  Adams</a> released under the <a
title="Information on The GNU General Public License - GNU Project" href="http://www.gnu.org/licenses/gpl.html">GNU General  Public License</a>. It&#8217;s a simple and no-fuss HTML rich-text editing solution that converts regular HTML textareas into a WYSIWYG. Because it&#8217;s JavaScript-based and designed to degrade gracefully, users with JavaScript turned off will still be able to use the HTML textarea.<a
href="http://www.themaninblue.com/experiment/widgEditor/"> </a><a
href="http://netdna.webdesignerdepot.com/uploads/2008/11/06_widgeditor.jpg"><img
class="alignnone size-full wp-image-1084" src="http://netdna.webdesignerdepot.com/uploads/2008/11/06_widgeditor.jpg" alt="" width="615" height="315" /></a></p><p><a
href="http://www.themaninblue.com/experiment/widgEditor/">widgEditor</a> | <a
href="http://www.themaninblue.com/experiment/widgEditor/">Demo</a> | <a
href="http://code.google.com/p/widgeditor/downloads/list">Download</a></p><h1>7. EditArea</h1><p><em>EditArea</em> is a free JavaScript source code editor. It&#8217;s an excellent solution for weblogs and websites that allow developers to contribute and format their own code.</p><p><a
href="http://www.cdolivet.net/editarea/%20-%20606"> </a><a
href="http://netdna.webdesignerdepot.com/uploads/2008/11/07_editarea.jpg"><img
class="alignnone size-full wp-image-1085" src="http://netdna.webdesignerdepot.com/uploads/2008/11/07_editarea.jpg" alt="" width="615" height="315" /></a><br
/> <a
href="http://www.cdolivet.net/editarea/%20-%20606">EditArea</a> | <a
href="http://cdolivet.net/editarea/editarea/exemples/exemple_full.html">Demo</a> | <a
href="http://sourceforge.net/project/showfiles.php?group_id=164008">Download</a></p><h1>8. Cross Browser Rich Text Editor (RTE)</h1><p><em>Cross-Browser Rich  Text Editor</em> (&#8221;RTE&#8221; for short) is a free rich-text editor released  under the <a
href="http://creativecommons.org/licenses/by/2.5/">Creative  Commons Attribution 2.5 license</a>. It&#8217;s a work based on the <a
title="Web Browser designMode Functionality (1390) - IDS" href="https://ids.breuer.com/ds/1390">designMode </a> functionality introduced in Internet Explorer  5 and implemented in the Mozilla <a
href="http://www.mozilla.org/editor/midas-spec.html">Rich Text Editing API</a>.  It just has basic features, so it&#8217;s perfect for individuals looking to add  simple rich-text editing support.<a
href="http://www.kevinroth.com/rte/"><br
/> </a><a
href="http://netdna.webdesignerdepot.com/uploads/2008/11/08_rte.jpg"><img
class="alignnone size-full wp-image-1086" src="http://netdna.webdesignerdepot.com/uploads/2008/11/08_rte.jpg" alt="" width="615" height="315" /></a></p><p><a
href="http://www.kevinroth.com/rte/">Cross-Browser Rich  Text Editor (RTE)</a> | <a
href="http://www.kevinroth.com/rte/demo.htm">Demo</a></p><h1>9. YUI Library Rich  Text Editor</h1><p>The <em>YUI Library Rich  Text Editor</em> is a UI control that&#8217;s part of the <a
title="The Yahoo! User Interface Library (YUI) home page." href="http://developer.yahoo.com/yui/">YUI Library</a>. It&#8217;s a great solution for those already using YUI and individuals that want to save some server resources (since you can serve it <a
title="Serving YUI Files from Yahoo! Servers" href="http://developer.yahoo.com/yui/articles/hosting/">directly from the Yahoo! servers</a>).  The YUI Library Rich Text Editor also has excellent <a
title="Rich Text Editor - mobile device support section." href="http://developer.yahoo.com/yui/editor/#mobile">mobile  device support</a>, making it a great web-accessible rich-text editing  solution.<a
href="http://developer.yahoo.com/yui/editor/"><br
/> </a><a
href="http://netdna.webdesignerdepot.com/uploads/2008/11/09_yui_library_rich_text_editor.jpg"><img
class="alignnone size-full wp-image-1087" src="http://netdna.webdesignerdepot.com/uploads/2008/11/09_yui_library_rich_text_editor.jpg" alt="" width="615" height="315" /></a><a
href="http://developer.yahoo.com/yui/editor/"></a></p><p><a
href="http://developer.yahoo.com/yui/editor/">Yahoo! UI  Library: Rich Text Editor</a> | <a
href="http://developer.yahoo.com/yui/examples/editor/index.html">Demo</a> | <a
href="http://sourceforge.net/project/downloading.php?group_id=165715&#038;filename=yui_2.6.0.zip">Download</a></p><h1>10. FreeTextBox</h1><p>Web professionals using the .NET framework that want to add editing capabilities to their web pages and web applications should check out <em>FreeTextBox</em>: a robust, fully-featured, and extremely popular rich-text editor for ASP.NET. It has a built-in image gallery, a helpful JavaScript API for customization, and a full list of editing controls for constructing tables, ordered/unordered lists, and even spellchecking (using the IE spellchecking engine).</p><p><a
href="http://freetextbox.com/"> </a><a
href="http://netdna.webdesignerdepot.com/uploads/2008/11/10_freetextbox.jpg"><img
class="alignnone size-full wp-image-1088" src="http://netdna.webdesignerdepot.com/uploads/2008/11/10_freetextbox.jpg" alt="" width="615" height="315" /></a></p><p><a
href="http://freetextbox.com/">FreeTextBox</a> | <a
href="http://freetextbox.com/demos/">Demo</a> | <a
href="http://freetextbox.com/download/">Download</a></p><h1>11. Damn Small Rich Text  Editor</h1><p><em>Damn Small Rich Text  Editor</em> (DSRTE) is a lightweight, free rich-text editor built on top of the jQuery library and a PHP backend. It&#8217;s plugin-enabled (meaning it&#8217;s highly-extensible), has image-uploading capabilities (using Ajax for responsive user interaction), and an HTML cleanup feature to tidy up messy markup.</p><p><a
href="http://avidansoft.com/dsrte/"> </a><a
href="http://netdna.webdesignerdepot.com/uploads/2008/11/11_damn_small_rich_text_editor.jpg"><img
class="alignnone size-full wp-image-1089" src="http://netdna.webdesignerdepot.com/uploads/2008/11/11_damn_small_rich_text_editor.jpg" alt="" width="615" height="315" /></a></p><p><a
href="http://avidansoft.com/dsrte/">Damn Small Rich Text  Editor</a> | <a
href="http://avidansoft.com/scripts">Download</a></p><h1>12. Silverlight  Rich Text Editor</h1><p><em>Silverlight rich text  editor</em> is the first rich-text editor for <a
title="The Official Microsoft Silverlight Site" href="http://silverlight.net/">Silverlight</a>. It has many useful features such as &#8220;find and replace&#8221; to quickly find specific text or to batch-replace them with something else, keyboard shortcuts support, serialization of text input for security, and much more. Note that the original creator has stopped further development (so cross your fingers someone picks up his project).</p><p><a
href="http://www.codeplex.com/richtextedit"> </a><a
href="http://netdna.webdesignerdepot.com/uploads/2008/11/12_silverlight_wysyg.jpg"><img
class="alignnone size-full wp-image-1090" src="http://netdna.webdesignerdepot.com/uploads/2008/11/12_silverlight_wysyg.jpg" alt="" width="615" height="315" /></a></p><p><a
href="http://www.codeplex.com/richtextedit">Silverlight  rich text editor</a> | <a
href="http://michaelsync.net/2008/05/04/silverlight-rich-text-editor-demo">Demo</a> | <a
href="http://www.codeplex.com/richtextedit/SourceControl/ListDownloadableCommits.aspx">Download</a></p><h1>13. Free Rich  Text Editor</h1><p><em>Free Rich Text Editor</em> is a free, JavaScript-based HTML rich-text editing solution released under the <a
href="http://creativecommons.org/licenses/by/2.5/">Creative Commons Attribution  2.5 Generic</a> license. The interface is reminiscent of Microsoft Word 2003&#8217;s interface, so users of this desktop application will find it quite familiar. It has everything you&#8217;d expect from a robust rich-text editor, as well as a code view to preview and edit the HTML source code directly.</p><p><a
href="http://www.freerichtexteditor.com/about/"> </a><a
href="http://netdna.webdesignerdepot.com/uploads/2008/11/13_freerichtexteditor.jpg"><img
class="alignnone size-full wp-image-1091" src="http://netdna.webdesignerdepot.com/uploads/2008/11/13_freerichtexteditor.jpg" alt="" width="615" height="315" /></a></p><p><a
href="http://www.freerichtexteditor.com/about/">Free Rich  Text Editor</a> | <a
href="http://www.freerichtexteditor.com/index.php?inc=demo/index">Demo</a> | <a
href="http://www.freerichtexteditor.com/download/">Download</a></p><h1>14. Dijit.Editor</h1><p>The <em>Dijit.Editor</em> is <a
title="Information on Dijit, The Dojo Widget Library." href="http://dojotoolkit.org/book/dojo-book-0-9/part-2-dijit-0">Dijit</a>&#8217;s (<a
title="Home page of The Dojo Toolkit." href="http://dojotoolkit.org/">Dojo</a>&#8217;s widget library) fully-featured rich-text editor. Built on top of The Dojo Toolkit (a popular JavaScript library/framework); it&#8217;s an excellent solution for those already using the Dojo Toolkit.</p><p><a
href="http://dojotoolkit.org/book/dojo-book-0-9/part-2-dijit/advanced-editing-and-display/editor-rich-text"> </a><a
href="http://netdna.webdesignerdepot.com/uploads/2008/11/14_dijit_editor.jpg"><img
class="alignnone size-full wp-image-1092" src="http://netdna.webdesignerdepot.com/uploads/2008/11/14_dijit_editor.jpg" alt="" width="615" height="315" /></a></p><p><a
href="http://dojotoolkit.org/book/dojo-book-0-9/part-2-dijit/advanced-editing-and-display/editor-rich-text">Dijit.Editor</a></p><h1>15. WYMeditor</h1><p><em>WYMeditor</em> is a  web-based HTML editor that emphasizes the use of standards-compliant markup. It  was developed to output compliant <a
title="HTML 4 Document Type Definition" href="http://www.w3.org/TR/REC-html40/sgml/dtd.html">HTML 4.01 Strict Doctype</a> HTML, so  it&#8217;s the perfect solution for the standards-aware developer.</p><p><a
href="http://www.wymeditor.org/"> </a><a
href="http://netdna.webdesignerdepot.com/uploads/2008/11/15_wymleditor.jpg"><img
class="alignnone size-full wp-image-1093" src="http://netdna.webdesignerdepot.com/uploads/2008/11/15_wymleditor.jpg" alt="" width="615" height="315" /></a></p><p><a
href="http://www.wymeditor.org/">WYMeditor</a> | <a
href="http://files.wymeditor.org/wymeditor/trunk/src/examples/">Demo</a> | <a
href="http://www.wymeditor.org/download/">Download</a></p><h1>16. Whizzywig</h1><p><em>Whizzywig</em> is a free JavaScript web-based rich-text editor. Aside from features you&#8217;d expect from a rich-text editor, Whizzywig also has a Spanish and German version, a web-safe color picker to change your text&#8217;s colors, and custom-designed UI controls.</p><p><a
href="http://www.unverse.net/whizzywig-cross-browser-html-editor.html"> </a><a
href="http://netdna.webdesignerdepot.com/uploads/2008/11/16_whizzywig.jpg"><img
class="alignnone size-full wp-image-1094" src="http://netdna.webdesignerdepot.com/uploads/2008/11/16_whizzywig.jpg" alt="" width="615" height="315" /></a></p><p><a
href="http://www.unverse.net/whizzywig-cross-browser-html-editor.html">Whizzywig</a> | <a
href="http://www.unverse.net/wysiwyg.html">Demo</a></p><h1>17. openWYSIWYG</h1><p><em>openWYSIWYG</em> is a free and feature-packed web-based content editor that&#8217;s perfect for a host of content management systems. It has a very intuitive &#8220;table creation&#8221; feature to help users construct HTML tables. It also has a wide range of browser support including IE 5.5+ (Windows), Firefox 1.0+, Mozilla 1.3+ and Netscape 7+.</p><p><a
href="http://www.openwebware.com/"> </a><a
href="http://netdna.webdesignerdepot.com/uploads/2008/11/17_openwysiwg.jpg"><img
class="alignnone size-full wp-image-1095" src="http://netdna.webdesignerdepot.com/uploads/2008/11/17_openwysiwg.jpg" alt="" width="615" height="315" /></a></p><p><a
href="http://www.openwebware.com/">openWYSIWYG</a> | <a
href="http://www.openwebware.com/wysiwyg/demo.shtml">Demo</a> | <a
href="http://www.openwebware.com/download.shtml">Download</a></p><h1>18. XStandard</h1><p><em>XStandard</em> is a  highly-standards-compliant rich-text editor. It comes in two versions: <a
href="http://www.xstandard.com/en/products/#lite">XStandard Lite</a> – which is  completely <em>free</em>, and <a
href="http://www.xstandard.com/en/products/#pro">XStandard Pro</a>. XStandard  Lite has Microsoft Word text cleanup, spellchecking, and the ability to  interact with third-party applications.</p><p><a
href="http://www.xstandard.com/"> </a><a
href="http://netdna.webdesignerdepot.com/uploads/2008/11/18_xstandard.jpg"><img
class="alignnone size-full wp-image-1096" src="http://netdna.webdesignerdepot.com/uploads/2008/11/18_xstandard.jpg" alt="" width="615" height="315" /></a></p><p><a
href="http://www.xstandard.com/">XStandard</a> | <a
href="http://www.xstandard.com/en/downloads/?product=lite">Download</a></p><h1>19. Xinha</h1><p><em>Xinha</em> is an open  source, community-built rich-text editor released under a <a
href="http://xinha.webfactional.com/wiki/Licence">BSD style license</a>. It&#8217;s highly-configurable, extensible, and feature-packed. Xinha emphasizes on community development, and as such, you&#8217;ll find many helpful contributors in the <a
href="http://www.xinha.org/punbb/">Xinha forums</a>.</p><p><a
href="http://xinha.webfactional.com/"> </a><a
href="http://netdna.webdesignerdepot.com/uploads/2008/11/19_xinha.jpg"><img
class="alignnone size-full wp-image-1097" src="http://netdna.webdesignerdepot.com/uploads/2008/11/19_xinha.jpg" alt="" width="615" height="315" /></a></p><p><a
href="http://xinha.webfactional.com/">Xinha</a> | <a
href="http://xinha.webfactional.com/wiki/Examples">Demo</a> | <a
href="http://xinha.webfactional.com/wiki/DownloadsPage">Download</a></p><h1>20. Kupu</h1><p>Kupu is an open source &#8220;document-centered&#8221; client-side rich-text editor released by the international association for Open Source Content Management (OSCOM). It features easy integration into a variety of content management systems including <a
href="http://www.infrae.com/products/silva">Silva</a> and <a
href="http://plone.org/">Plone</a>, easy customization and extension, and Ajax saving for an  uninterrupted user experience.</p><p><a
href="http://kupu.oscom.org/"> </a><a
href="http://netdna.webdesignerdepot.com/uploads/2008/11/20_kupu_editor.jpg"><img
class="alignnone size-full wp-image-1098" src="http://netdna.webdesignerdepot.com/uploads/2008/11/20_kupu_editor.jpg" alt="" width="615" height="315" /></a></p><p><a
href="http://kupu.oscom.org/">Kupu</a> | <a
href="http://kupu.oscom.org/demo/">Demo</a> | <a
href="http://kupu.oscom.org/download/">Download</a></p><h3><em>What&#8217;s your favorite? Do you currently use any of these rich-text editors? Do you  use one that isn&#8217;t on the list? Share your experiences and thoughts in the  comments.</em></h3><p><em>Written exclusively for WDD by Jacob Gube. He is a Web developer/designer and author of <a
href="http://sixrevisions.com/">Six Revisions</a>, a blog on Web development  and design. If you want to connect with the author, you can <a
href="http://twitter.com/jggube">follow him on Twitter</a>.</em><br
/><p><br/>If you find an exclusive RSS freebie on this feed or on the live WDD website, please use the following code to download it: H0Oa9C</p><style type="text/css">p img {display:inline-block; margin-right:10px;}
.alignleft {float:left;}
p.showcase {clear:both;}
body#browserfriendly p, body#podcast p, div#emailbody p{margin:0;}</style>]]></content:encoded> <wfw:commentRss>http://www.webdesignerdepot.com/2008/12/20-excellent-free-rich-text-editors/feed/</wfw:commentRss> <slash:comments>100</slash:comments> </item> </channel> </rss><!--
This site's performance optimized by W3 Total Cache:

W3 Total Cache improves the user experience of your blog by caching
frequent operations, reducing the weight of various files and providing
transparent content delivery network integration.

Learn more about our WordPress Plugins: http://www.w3-edge.com/wordpress-plugins/

Minified using memcached
Page Caching using memcached
Database Caching 31/98 queries in 0.024 seconds using memcached
Content Delivery Network via 

Served from: csw00.ord02.hostingservicesinc.net @ 2010-09-02 11:44:51 -->