<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" version="2.0"><channel><title>CSS-Tricks</title> <link>http://css-tricks.com</link> <description>Tips, Tricks, and Techniques on using Cascading Style Sheets.</description> <lastBuildDate>Tue, 09 Feb 2010 12:58:21 +0000</lastBuildDate> <generator>http://wordpress.org/?v=2.9.1</generator> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/CssTricks" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="csstricks" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><creativeCommons:license>http://creativecommons.org/licenses/by/2.0/</creativeCommons:license><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">CssTricks</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><item><title>jQuery MagicLine Navigation</title><link>http://css-tricks.com/jquery-magicline-navigation/</link> <comments>http://css-tricks.com/jquery-magicline-navigation/#comments</comments> <pubDate>Tue, 09 Feb 2010 12:58:21 +0000</pubDate> <dc:creator>Chris Coyier</dc:creator> <category><![CDATA[Article]]></category><guid isPermaLink="false">http://css-tricks.com/?p=5582</guid> <description>These &amp;#8220;sliding&amp;#8221; style navigation bars have been around a while, I just thought I&amp;#8217;d take a crack at doing it myself as the opportunity came up recently. Turns out it&amp;#8217;s really pretty darn easy. I put two examples together for it.The Idea The idea is to have a highlight of some kind (a background or an [...]</description> <content:encoded><![CDATA[<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/magiclineexample.png" width="570" height="107" alt="" title="" /></p><p>These &#8220;sliding&#8221; style navigation bars have been around a while, I just thought I&#8217;d take a crack at doing it myself as the opportunity came up recently. Turns out it&#8217;s really pretty darn easy. I put two examples together for it.</p><p><span id="more-5582"></span></p><h3>The Idea</h3><p>The idea is to have a highlight of some kind (a background or an underline) follow you around as you mouse over the different links in the navigation. This will happen with jQuery and it&#8217;s animation abilities. As such, the &#8220;magic line&#8221; will only be appended via JavaScript. Once added to the list and styled, as you mouse over the different links, it figures out the left positioning and the width and animates to match.</p><h3>HTML</h3><p>Typical list here&#8230;. It has the &#8220;group&#8221; class because it&#8217;s going to be a horizontal row and will need the <a href="http://css-tricks.com/snippets/css/clear-fix/">clearfix</a> so it has height. The ID is for the JavaScript to target it.</p><pre><code class="html">&lt;div class="nav-wrap"&gt;
 &lt;ul class="group" id="example-one"&gt;
    &lt;li class="current_page_item"&gt;&lt;a href="#"&gt;Home&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#"&gt;Buy Tickets&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#"&gt;Group Sales&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#"&gt;Reviews&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#"&gt;The Show&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#"&gt;Videos&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#"&gt;Photos&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#"&gt;Magic Shop&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
&lt;/div&gt;</code></pre><p>Notice the .nav-wrap div around it. That is used because of the styling, the bars go full width of the screen the but the navigation is centered within. This centering brings up an issue when we start the JavaScript.</p><h3>CSS</h3><p>Do the ol&#8217; inline list elements with floated left anchors to get the list horizontal and avoid <a href="http://css-tricks.com/prevent-menu-stepdown/">stairstepping</a>. The magic line is absolutely positioned under the bar, so that it doesn&#8217;t cause jitter (mouse over a link, animates over, mouse is now on magic line not the link, animates back, etc.) Everything else is purely stylistic.</p><pre><code class="css">.nav-wrap { margin: 50px auto;  background-color: rgba(0,0,0,0.6); border-top: 2px solid white; border-bottom: 2px solid white; }
#example-one { margin: 0 auto; list-style: none; position: relative; width: 960px; }
#example-one li { display: inline; }
#example-one li a { color: #bbb; font-size: 14px; display: block; float: left; padding: 6px 10px 4px 10px; text-decoration: none; text-transform: uppercase; }
#example-one li a:hover { color: white; }
#magic-line { position: absolute; bottom: -2px; left: 0; width: 100px; height: 2px; background: #fe4902; }</code></pre><h3>jQuery JavaScript</h3><ol><li>When DOM is ready&#8230;</li><li>Set up variables including current left offset of the navigation</li><li>Set up resize function on the window to reset that offset should it change (because of the centering)</li><li>Append the magic line to the nav</li><li>Set up position and width of the magic line for the current page item</li><li>Also set the original width and position as data, so it can be used to animate back to</li><li>On hover, calculate the new width and new left position and animate to it</li><li>On the hover callback (mouse out), animate back to original</li></ol><pre><code class="javascript">$(function(){
    var $el, leftPos, newWidth,
        $mainNav = $("#example-one"),
        pageOffset = $mainNav.offset().left;

    // Fixing the offset if the window changes size
    $(window).resize(function() {
        pageOffset = $mainNav.offset().left;
    });

    $mainNav.append("&lt;li id='magic-line'&gt;&lt;/li&gt;");
    var $magicLine = $("#magic-line");

    $magicLine
        .width($(".current_page_item").width())
        .css("left", $(".current_page_item a").offset().left - pageOffset)
        .data("origLeft", $magicLine.offset().left - pageOffset)
        .data("origWidth", $magicLine.width());

    $("#example-one li").find("a").hover(function() {
        $el = $(this);
        leftPos = $el.offset().left - pageOffset;
        newWidth = $el.parent().width();
        $magicLine.stop().animate({
            left: leftPos,
            width: newWidth
        });
    }, function() {
        $magicLine.stop().animate({
            left: $magicLine.data("origLeft"),
            width: $magicLine.data("origWidth")
        });
    });
});</code></pre><h3>Issues</h3><p>Opera is weird about it. It makes the original width of the magic line the full width of the nav bar and shortens it from the right on hovers. I haven&#8217;t been able to figure it out. If you do, awesome, let me know I&#8217;ll update this article and demos.</p><h3>Alternate Version</h3><p>Check out the demo link below for an alternate version that uses a background instead of a line, and animates color as well as position and width. Basically the same, except the CSS is slightly different and the JavaScript pulls the color of the new list item from a rel attribute in the HTML.</p><p>Color animations in jQuery require the <a href="http://plugins.jquery.com/files/jquery.color.js.txt">color plugin</a>. I was just moaning about how it doesn&#8217;t work with RGBa color, and someone sent me a patch that does, which is included in the download. I&#8217;m really sorry, but I can&#8217;t remember their name! Speak up if it was you and I&#8217;ll update this and credit the patch to you.</p><h3>All Yours</h3><p>As always, feel free to do whatever you want with it. Preferably, use it in corporate projects and earn wheelbarrows of cash.</p><p><a href="http://css-tricks.com/examples/MagicLine/" class="button">View Demo</a> &nbsp; <a href="http://css-tricks.com/examples/MagicLine.zip" class="button">Download Files</a></p> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CssTricks?a=tgo8VO0ASwk:ZZWVHELnGDE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CssTricks?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=tgo8VO0ASwk:ZZWVHELnGDE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=tgo8VO0ASwk:ZZWVHELnGDE:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=tgo8VO0ASwk:ZZWVHELnGDE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=tgo8VO0ASwk:ZZWVHELnGDE:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=tgo8VO0ASwk:ZZWVHELnGDE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=tgo8VO0ASwk:ZZWVHELnGDE:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded> <wfw:commentRss>http://css-tricks.com/jquery-magicline-navigation/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>How nth-child Works</title><link>http://css-tricks.com/how-nth-child-works/</link> <comments>http://css-tricks.com/how-nth-child-works/#comments</comments> <pubDate>Mon, 08 Feb 2010 13:24:35 +0000</pubDate> <dc:creator>Chris Coyier</dc:creator> <category><![CDATA[Article]]></category><guid isPermaLink="false">http://css-tricks.com/?p=5452</guid> <description>There is a CSS selector, really a pseudo-selector, called nth-child. Here is an example of using it: ul li:nth-child(3n+3) { color: #ccc; } What the above CSS does, is select every third list item inside unordered lists. That is, the 3rd, 6th, 9th, 12th, etc. But how does that work? And what other kinds of things can [...]</description> <content:encoded><![CDATA[<p>There is a CSS selector, really a pseudo-selector, called nth-child. Here is an example of using it:</p><pre><code class="css">ul li:nth-child(3n+3) {
  color: #ccc;
}</code></pre><p>What the above CSS does, is select every third list item inside unordered lists. That is, the 3rd, 6th, 9th, 12th, etc. But how does that work? And what other kinds of things can you do with nth-child? Let&#8217;s take a look.</p><p><span id="more-5452"></span></p><p>It boils down to what is in between those parentheses. nth-child accepts two keywords in that spot: <strong>even</strong> and <strong>odd</strong>. Those should be pretty obvious. &#8220;Even&#8221; selects even numbered elements, like the 2nd, 4th, 6th, etc. &#8220;Odd&#8221; selects odd numbered elements, like 1st, 3rd, 5th, etc.</p><p>As seen in the first example, nth-child also accepts <em>equations</em> in between those parentheses. The simplest possible equation? Just a number. If you put simply a number in the parentheses, it will match only that number element. For example, here is how to select only the 5th element:</p><pre><code class="css">ul li:nth-child(5) {
  color: #ccc;
}</code></pre><p>Let&#8217;s get back to the &#8220;3n+3&#8243; from the original example though. How does that work? Why does it select every third element? The trick is understanding the &#8220;n&#8221; and algebraic equation that represents. Think of &#8220;n&#8221; as starting at zero and then a set of all positive integers. Then complete the equation. So the 3n is &#8220;3xn&#8221;, and the whole equation together is &#8220;(3xn)+3&#8243;. Now substituting in the zero and positive integers, we get:</p><p>(3 x 0) + 3 = 3 = 3rd Element<br /> (3 x 1) + 3 = 6 = 6th Element<br /> (3 x 2) + 3 = 9 = 9th Element<br /> etc.</p><p>How about the :nth-child(2n+1)?</p><p>(2 x 0) + 1 = 1 = 1st Element<br /> (2 x 1) + 1 = 3 = 3rd Element<br /> (2 x 2) + 1 = 5 = 5th Element<br /> etc.</p><p>Hey wait! That&#8217;s the same as &#8220;odd&#8221;, so probably don&#8217;t need to use that one very often. But wait now. Haven&#8217;t we exposed our original example as being overly complicated? What if instead of &#8220;3n+3&#8243;, we used &#8220;3n+0&#8243;, or even simpler &#8220;3n&#8221;.</p><p>(3 x 0) = 0 = no match<br /> (3 x 1) = 3 = 3rd Element<br /> (3 x 2) = 6 = 6th Element<br /> (3 x 3) = 9 = 9th Element<br /> etc.</p><p>So as you can see, the matches are exactly the same, no need for the &#8220;+3&#8243;. We can use negative n values, as well as use subtraction in the equations. For example, 4n-1:</p><p>(4 x 0) &#8211; 1 = -1 = no match<br /> (4 x 1) &#8211; 1 = 3 = 3rd Element<br /> (4 x 2) &#8211; 1 = 7 = 7th Element<br /> etc.</p><p>Using &#8220;-n&#8221; values seems a little weird, because if the end result is negative there is no match, so you&#8217;ll need to add to the equation to get it back positive again. As it turns out, this is a rather clever technique. You can use it to select the &#8220;first n elements&#8221; with &#8220;-n+3&#8243;:</p><p>-0 + 3 = 3 = 3rd Element<br /> -1 + 3 = 2 = 2nd Element<br /> -2 + 3 = 1 = 1st Element<br /> -3 + 3 = 0 = no match<br /> etc.</p><p>Sitepoint has a nice reference guide, which includes this <a href="http://reference.sitepoint.com/css/understandingnthchildexpressions">handy-dandy table</a> which I&#8217;ll shamelessly republish here:</p><table id="nthtable"><thead><tr><th class="firstcol " id="id13390055">n</th><th id="id13383373" class="">2n+1</th><th id="id13383378" class="">4n+1</th><th id="id13563626" class="">4n+4</th><th id="id13571386" class="">4n</th><th id="id13563576" class="">5n-2</th><th id="id13563582" class="">-n+3</th></tr></thead><tbody><tr><th headers="id13390055 " class="firstcol " id="id13563600">0</th><td headers="id13563600 id13383373 " class="">1</td><td headers="id13563600 id13383378 " class="">1</td><td headers="id13563600 id13563626 " class="">4</td><td headers="id13563600 id13571386 " class="">-</td><td headers="id13563600 id13563576 " class="">-</td><td headers="id13563600 id13563582 " class="">3</td></tr><tr><th headers="id13390055 " class="firstcol " id="id13567329">1</th><td headers="id13567329 id13383373 " class="">3</td><td headers="id13567329 id13383378 " class="">5</td><td headers="id13567329 id13563626 " class="">8</td><td headers="id13567329 id13571386 " class="">4</td><td headers="id13567329 id13563576 " class="">3</td><td headers="id13567329 id13563582 " class="">2</td></tr><tr><th headers="id13390055 " class="firstcol " id="id13567377">2</th><td headers="id13567377 id13383373 " class="">5</td><td headers="id13567377 id13383378 " class="">9</td><td headers="id13567377 id13563626 " class="">12</td><td headers="id13567377 id13571386 " class="">8</td><td headers="id13567377 id13563576 " class="">8</td><td headers="id13567377 id13563582 " class="">1</td></tr><tr><th headers="id13390055 " class="firstcol " id="id13567425">3</th><td headers="id13567425 id13383373 " class="">7</td><td headers="id13567425 id13383378 " class="">13</td><td headers="id13567425 id13563626 " class="">16</td><td headers="id13567425 id13571386 " class="">12</td><td headers="id13567425 id13563576 " class="">13</td><td headers="id13567425 id13563582 " class="">-</td></tr><tr><th headers="id13390055 " class="firstcol " id="id13405791">4</th><td headers="id13405791 id13383373 " class="">9</td><td headers="id13405791 id13383378 " class="">17</td><td headers="id13405791 id13563626 " class="">20</td><td headers="id13405791 id13571386 " class="">16</td><td headers="id13405791 id13563576 " class="">18</td><td headers="id13405791 id13563582 " class="">-</td></tr><tr><th headers="id13390055 " class="firstcol " id="id13405839">5</th><td headers="id13405839 id13383373 " class="">11</td><td headers="id13405839 id13383378 " class="">21</td><td headers="id13405839 id13563626 " class="">24</td><td headers="id13405839 id13571386 " class="">20</td><td headers="id13405839 id13563576 " class="">23</td><td headers="id13405839 id13563582 " class="">-</td></tr></tbody></table><h3>Browser Compatibility</h3><p>nth-child is one of those rather unfortunate CSS attributes that is caught between nearly full cross-browser compatibility, except for completely zero support in IE, even IE 8. So when it comes to it&#8217;s use, if the end result is &#8220;progressive enhancement&#8221; in some fashion (e.g. applying a cool color palette to table rows, for example), then by all means, go for it. But you probably shouldn&#8217;t use it if you are doing something more important, like relying on it for site structure. For example, removing the right margin from every third box in a three by three grid of boxes, so they will fit properly.</p><p>One saving grace here is that if you are using jQuery, which supports all CSS selector including :nth-child, the selector <strong>will</strong> work, even in Internet Explorer.</p><h3>Still not getting it?</h3><p>I&#8217;m not a big fan of the phrase &#8220;I&#8217;m a visual learner&#8221;. Of course you are, everybody is. Visual aids are enormously helpful in situations just like this. To help, I put together a little <a href="http://css-tricks.com/examples/nth-child-tester/">nth-child tester page</a>. There, you can type in equations and see the results of what it selects below.</p> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CssTricks?a=_3q-b4xA36I:_vWveEHvFrM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CssTricks?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=_3q-b4xA36I:_vWveEHvFrM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=_3q-b4xA36I:_vWveEHvFrM:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=_3q-b4xA36I:_vWveEHvFrM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=_3q-b4xA36I:_vWveEHvFrM:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=_3q-b4xA36I:_vWveEHvFrM:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=_3q-b4xA36I:_vWveEHvFrM:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded> <wfw:commentRss>http://css-tricks.com/how-nth-child-works/feed/</wfw:commentRss> <slash:comments>23</slash:comments> </item> <item><title>Threadsy Invites / Haiti Poster Project</title><link>http://css-tricks.com/thready-invites-haiti-poster-project/</link> <comments>http://css-tricks.com/thready-invites-haiti-poster-project/#comments</comments> <pubDate>Fri, 05 Feb 2010 13:33:34 +0000</pubDate> <dc:creator>Chris Coyier</dc:creator> <category><![CDATA[Article]]></category><guid isPermaLink="false">http://css-tricks.com/?p=5483</guid> <description>Two things today. First, have you guys heard of Threadsy? I hadn&amp;#8217;t, but apparently they got 2nd place at TechCrunch 50, which is pretty great. It&amp;#8217;s a web application that combines several of your online &amp;#8220;input streams&amp;#8221; (e.g. Email, Twitter, and Facebook). I think that&amp;#8217;s actually all they do right now, which I find kind [...]</description> <content:encoded><![CDATA[<p>Two things today.</p><p><strong>First,</strong> have you guys heard of <a href="http://www.threadsy.com/">Threadsy</a>? I hadn&#8217;t, but apparently they got 2nd place at TechCrunch 50, which is pretty great. It&#8217;s a web application that combines several of your online &#8220;input streams&#8221; (e.g. Email, Twitter, and Facebook). I think that&#8217;s actually all they do right now, which I find kind of awesome, because those are the only ones I use anyway.</p><p><img src="http://css-tricks.com/wp-content/csstricks-uploads/threadsy.png" width="570" height="165" alt="" title="" /></p><p><span id="more-5483"></span></p><p>I have 500 invites to give away for it. First come first serve as I understand it. Just <a href="http://bit.ly/d084Gj">click this</a> to sign up.</p><p>I really quite like it. The Threadsy team has done a killer job in creating an interface to combine these things that is totally usable and nice. No small chore when trying to pack so much functionality into basically one screen. I&#8217;ve been using it off and on. I haven&#8217;t been able to 100% switch just because old habits are hard to break and I love my Gmail/Tweetie combo so much already.</p><p><strong>Second,</strong> there are a ton of ways you can help out the bad situation in Haiti. I&#8217;m sure many of you have already. I&#8217;ve done a few different things and plan to do a few more. As designers, there is a really cool new one: <a href="http://thehaitiposterproject.com/">The Haiti Poster Project</a>.</p><p><img src="http://css-tricks.com/wp-content/csstricks-uploads/hpp.jpg" width="570" height="172" alt="" title="" /></p><p>You design and print 11&#8243;x17&#8243; posters (yes, you have to print your own, that is part of your contribution). The posters are collected and sold. The goal is to raise $1,000,000 for Doctors Without Borders. I think this is a great idea, especially how it&#8217;s not a &#8220;contest&#8221; where you could do all the work and then be rejected and not even be sure you did any good. Everyone wins here.</p> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CssTricks?a=bCetBTNO-bc:iYXKVPjSDcM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CssTricks?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=bCetBTNO-bc:iYXKVPjSDcM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=bCetBTNO-bc:iYXKVPjSDcM:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=bCetBTNO-bc:iYXKVPjSDcM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=bCetBTNO-bc:iYXKVPjSDcM:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=bCetBTNO-bc:iYXKVPjSDcM:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=bCetBTNO-bc:iYXKVPjSDcM:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded> <wfw:commentRss>http://css-tricks.com/thready-invites-haiti-poster-project/feed/</wfw:commentRss> <slash:comments>25</slash:comments> </item> <item><title>Link Underlines Grow to Backgrounds on Hover</title><link>http://css-tricks.com/link-underlines-grow-to-backgrounds-on-hover/</link> <comments>http://css-tricks.com/link-underlines-grow-to-backgrounds-on-hover/#comments</comments> <pubDate>Thu, 04 Feb 2010 15:10:55 +0000</pubDate> <dc:creator>Chris Coyier</dc:creator> <category><![CDATA[Article]]></category><guid isPermaLink="false">http://css-tricks.com/?p=5475</guid> <description>A reader recently emailed in asking if I knew a way to have links be underlined, and then have the underline grow upwards on hover and turn into a background/highlight effect. I ended up trying three different things, with varying levels of success.</description> <content:encoded><![CDATA[<p>Reader Jaime Morrison emailed in:</p><blockquote><p>I&#8217;ve been mulling the idea of going with a link style in which a link&#8217;s underline &#8220;slides-up&#8221; to become a background highlight on hover.</p></blockquote><p>I started mulling over a few ideas on how to do this myself. Ultimately, I tried two different things but neither one of them is absolutely perfect.</p><p><span id="more-5475"></span></p><h3>Take One</h3><p>We know we&#8217;re going to be using jQuery here (or some JavaScript library), because of the animation. My first though was to set relative positioning on the links, then use jQuery to append empty &lt;span>&#8217;s to each link. The span would be 1px tall (like an underline), be absolutely positioned 1 pixel down from the bottom, and have a width of 100% (as long as the link). Then on hover, you would animate the height of the span to the line-height.</p><p><img src="http://css-tricks.com/wp-content/csstricks-uploads/technique1linkcover.png" width="547" height="389" alt="" title="" /></p><pre><code class="javascript">$(function() {

    var $el = $(),
        linkHeight = parseInt($("p").css("line-height")),
        speed = 175;  //  1000 = 1 second

    $("#first a").each(function() {

        $el = $(this);

        // If the link spans two lines, put a line break before it.
        if ($el.height() &gt; linkHeight) {
            $el.before("&lt;br /&gt;");
        }

        $el.prepend("&lt;span&gt;&lt;/span&gt;");

    }).hover(function() {

        $el = $(this);

        $el.find("span").stop().animate({ height: linkHeight, opacity: 0.3 }, speed);

    }, function() {

        $el = $(this);

        $el.find("span").stop().animate({ height: "1px", opacity: 1 }, speed);

    });

});</code></pre><p>As it turns out, this kinda works, but it&#8217;s littered with little weird problems and cross browser inconsistencies. For example, what if a link breaks into two lines? The span certainly wouldn&#8217;t work in that case. So I tried to fix it by first measuring the height of the link and if that was higher than the line-height (like it would be if it&#8217;s two lines), then insert a break before it, so it&#8217;s all on one line. Works, but it can create some weirdly ragged paragraphs.</p><p>Other more major problems: no version of IE will animate the span up properly. The span will always sit on top of the text, so it needs to be have opacity for the text to be readable. I tried wrapping the text in an &lt;em> and fighting it with z-index, but no dice. And even in Firefox, a link that begins a new line, for whatever reason, doesn&#8217;t want to work.</p><p>So, Take One is a flop&#8230;</p><h3>Take Two</h3><p>The biggest problem it seemed to me with Take One was the multi-line links. In trying to think of a way to solve that, it seemed like using the actual <tt>background</tt> property of the link would be the best way to go.</p><p>In this take, I created a big block of red color as an image. I set that as the background to the link, but pushed it down using background positioning. I set the overflow on the links to hidden, and pushed down that background just far enough that only a sliver showed through. Then on hover, the background position is animated to pull it back up underneath the entire link.</p><p><img src="http://css-tricks.com/wp-content/csstricks-uploads/technique2linkcover.png" width="547" height="367" alt="" title="" /></p><pre><code class="javascript">$(function() {

    var $el = $(),
        speed = 175;  //  1000 = 1 second

    // SECOND TECHNIQUE
    $("#second a").hover(function() {

        $el = $(this);

        $el.stop().animate({ backgroundPosition: "(0px 0px)", color: "white" }, speed);

    }, function() {

        $el = $(this);

        $el.stop().animate({ backgroundPosition: "(0px 15px)", color: "#900" }, speed);

    });

});</code></pre><p>One of the concerns with this technique is how different browsers handle line-height. If I set up the underline to be 1px tall in Firefox, many browsers (e.g. WebKit) show no underline at all, as apparently the line-height is one less pixel tall and thus the entire background image is hidden. As such, I made it 2px tall in Firefox, and then WebKit showed it as 1px. Inconsistant, but it works.</p><p>This would be a &#8220;perfect&#8221; solution, except IE 7 cludges links that are multi-line or the begin a new line, covering the entire link in background from the start. IE 8 gets it right.</p><p><strong>So in the end, neither one of these is totally perfect. If you have an alternate solution to this &#8220;underline animates up to be a background on hover&#8221;, let me know.</strong></p><p>You can <a href="http://css-tricks.com/examples/UnderlineHighlighter/">see the demos here</a>.</p><h3>UPDATE</h3><p>As suggested by a few people, I added a Technique #3, which is an adaptation of #2. The links now have bottom borders of 1px (border color and background color match), and the background slides up from a greater distance away, which should solve the IE 7 issue.</p> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CssTricks?a=x13r9l2rX3s:MCGjHyNo4BU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CssTricks?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=x13r9l2rX3s:MCGjHyNo4BU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=x13r9l2rX3s:MCGjHyNo4BU:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=x13r9l2rX3s:MCGjHyNo4BU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=x13r9l2rX3s:MCGjHyNo4BU:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=x13r9l2rX3s:MCGjHyNo4BU:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=x13r9l2rX3s:MCGjHyNo4BU:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded> <wfw:commentRss>http://css-tricks.com/link-underlines-grow-to-backgrounds-on-hover/feed/</wfw:commentRss> <slash:comments>46</slash:comments> </item> <item><title>Free Template: DocTemplate</title><link>http://css-tricks.com/free-template-doctemplate/</link> <comments>http://css-tricks.com/free-template-doctemplate/#comments</comments> <pubDate>Tue, 02 Feb 2010 13:42:26 +0000</pubDate> <dc:creator>Chris Coyier</dc:creator> <category><![CDATA[Article]]></category><guid isPermaLink="false">http://css-tricks.com/?p=5400</guid> <description>Totally free template for ya'll today. It is fully of AJAX navigation goodness, so subpages load dynamically with no page reload. If you don't like that part (for example, you are trying to put JavaScript demos on the subpages and they won't load that way) just remove the JavaScript files from the header and it will revert to regular nav. Enjoy!</description> <content:encoded><![CDATA[<p>Little freebie template for ya&#8217;ll today. It was actually <a href="http://dougneiner.com/">Doug Neiner</a>&#8217;s idea, I ran with it, then he helped me out at the end tighten some stuff up.</p><p><img src="http://css-tricks.com/wp-content/csstricks-uploads/doctemplatescreenshot.jpg" width="570" height="387" alt="" title="" /></p><p><a href="http://css-tricks.com/examples/DocTemplate/" class="button">View Demo</a> &nbsp; <a href="http://css-tricks.com/examples/DocTemplate.zip" class="button">Download Files</a></p><p><span id="more-5400"></span></p><h3>Note</h3><p>It&#8217;s PHP. So if you download it to check it out, throw it up on your web server to test it out (or somewhere you run PHP locally).</p><h3>Navigation</h3><p>The navigation is all AJAX&#8217;d up using the jQuery .load() functionality. I just think it&#8217;s kinda fun. It supports &#8220;deep linking&#8221;, so if you were to link to this page with a hash-tag of a page (e.g. /DocTemplate/#parameters.php) , it will see that and load that page up.</p><p>If you were to use this template to document some kind of JavaScript thingy, it should be noted that when content is loaded in this way the JavaScript on that page won&#8217;t be &#8220;active&#8221;.</p><p>If you don&#8217;t like or can&#8217;t use the AJAX navigation, <strong>simply remove the two JavaScript <tt>&lt;script&gt;</tt> links</strong> in the file common/doctype-and-head.php. It will fall back to simply reloading the page to go to those pages, with current navigation highlighting fully intact.</p><h3>And&#8230;</h3><p>The index.php file has all the different text style stuff available. Not much, but just the typical hierarchy of header tags, code styling, emphasis/strong tags, links, callout class, etc.</p><p>There is a good bit of CSS3 stuff going on from rounded corners to drop shadows to :hover:after with generated content. It should degrade just fine though.</p><p>As with anything else on this site, feel free to use it for whatever you&#8217;d like, no attribution of any kind required.</p> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CssTricks?a=W9hLqgFS04E:4qmgVNmh8Zk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CssTricks?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=W9hLqgFS04E:4qmgVNmh8Zk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=W9hLqgFS04E:4qmgVNmh8Zk:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=W9hLqgFS04E:4qmgVNmh8Zk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=W9hLqgFS04E:4qmgVNmh8Zk:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=W9hLqgFS04E:4qmgVNmh8Zk:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=W9hLqgFS04E:4qmgVNmh8Zk:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded> <wfw:commentRss>http://css-tricks.com/free-template-doctemplate/feed/</wfw:commentRss> <slash:comments>62</slash:comments> </item> <item><title>Make All Links Feel Subtly More Button-Like</title><link>http://css-tricks.com/one-pixel-shift-buttons/</link> <comments>http://css-tricks.com/one-pixel-shift-buttons/#comments</comments> <pubDate>Mon, 01 Feb 2010 13:10:47 +0000</pubDate> <dc:creator>Chris Coyier</dc:creator> <category><![CDATA[Article]]></category><guid isPermaLink="false">http://css-tricks.com/?p=5420</guid> <description>On this current design of CSS-Tricks, you may have noticed how all links bump themselves down one pixel as you click them. I started noticing this effect on sites of luminaries like Tim Van Damme and Andy Clarke&amp;#8217;s sites, so credit where credit is due. As you might imagine, it&amp;#8217;s incredible simple. Let&amp;#8217;s take a [...]</description> <content:encoded><![CDATA[<p>On this current design of CSS-Tricks, you may have noticed how all links bump themselves down one pixel as you click them. I started noticing this effect on sites of luminaries like <a href="http://maxvoltar.com/">Tim Van Damme</a> and <a href="http://stuffandnonsense.co.uk/">Andy Clarke&#8217;s</a> sites, so credit where credit is due.</p><p>As you might imagine, it&#8217;s incredible simple. Let&#8217;s take a look.</p><p><span id="more-5420"></span></p><p>Because we are wishing to achieve this &#8220;bump down&#8221; affect on all links and links are inline elements, margin-top won&#8217;t work. We don&#8217;t want to use padding either, because that would change the size of the box itself which might leading to shifting other elements around it as well which is undesirable. The perfect fit is <tt>position: relative</tt>, which allows us to bump around elements from their original static positioning.</p><pre><code class="css">a:active {
  position: relative;
  top: 1px;
}</code></pre><p>On this site, this is a zoom-in look of the one-pixel down shift:</p><div class="image-wrap"> <img src="http://css-tricks.com/wp-content/csstricks-uploads/linkbumpdown.jpg" alt="" /><br /> Subtle, but it moves.</div><h3>Concerns</h3><p>On this site I use it just like the code above, meaning it affects every link on the site. Some people have said it feels like overkill. Personally I like it and like the consistency, but if you are in the overkill camp (but still like it), use more specific selectors on the anchor element to use in more specific areas of your site.</p><p>More importantly, setting a different positioning value for the active state of a link is something you need to be very careful about. If you have any links on your site that are <strong>absolutely</strong> positioned, having the active state change to relative position will (probably) make them go flying away and render them unclickable. You can fix this on a case-by-case basis by making the active state of those links retain absolute positioning, and even make their top value one higher (or bottom value one lower).</p> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CssTricks?a=9Kqf8T-0qao:g0952QSuUQI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CssTricks?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=9Kqf8T-0qao:g0952QSuUQI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=9Kqf8T-0qao:g0952QSuUQI:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=9Kqf8T-0qao:g0952QSuUQI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=9Kqf8T-0qao:g0952QSuUQI:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=9Kqf8T-0qao:g0952QSuUQI:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=9Kqf8T-0qao:g0952QSuUQI:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded> <wfw:commentRss>http://css-tricks.com/one-pixel-shift-buttons/feed/</wfw:commentRss> <slash:comments>54</slash:comments> </item> <item><title>Thank You (2009 Edition)</title><link>http://css-tricks.com/thank-you-2009-edition/</link> <comments>http://css-tricks.com/thank-you-2009-edition/#comments</comments> <pubDate>Sat, 30 Jan 2010 14:18:11 +0000</pubDate> <dc:creator>Chris Coyier</dc:creator> <category><![CDATA[Article]]></category><guid isPermaLink="false">http://css-tricks.com/?p=5426</guid> <description>Before January slips away from me, I want to get my annual Thank You post out! Thanks to TheDoc (our resident prolific forums guru) for reminding me.Milestones Snippets Launched The biggest addition to this site in 2009 was the snippets area. It has been a popular resource which makes me happy since that&amp;#8217;s the reason this site [...]</description> <content:encoded><![CDATA[<p>Before January slips away from me, I want to get my annual Thank You post out! Thanks to <a href="http://css-tricks.com/forums/memberlist.php?mode=viewprofile&#038;u=805">TheDoc</a> (our resident prolific forums guru) for reminding me.</p><p><img src="http://css-tricks.com/wp-content/csstricks-uploads/thank-you-2009.jpg" width="570" height="170" alt="" title="" /></p><p><span id="more-5426"></span></p><h3>Milestones</h3><h4>Snippets Launched</h4><p>The biggest addition to this site in 2009 was the <a href="http://css-tricks.com/snippets/">snippets</a> area. It has been a popular resource which makes me happy since that&#8217;s the reason this site is around. It&#8217;s been slowing down a little, but I&#8217;m not too worried about that. You are welcome to <a href="http://css-tricks.com/snippets/submit/">contribute snippets</a> of course, to help keep that area bigger and better.</p><h4>Born and Died</h4><p>2009 saw the death of &#8220;Status&#8221;, a project between me and Richard Felix Jr. But also saw the birth of <a href="http://aremysitesup.com">Are My Sites Up?</a> (kinda wild that&#8217;s only been one year since AMSU went up). Are My Sites Up was based on yearly pricing, so we are seeing the first round of people renewing their service right now, which is awesome.</p><h4>Digging Into WordPress</h4><p>I <a href="http://digwp.com/book/">wrote a book</a> this year with co-author Jeff Starr. As awesome as that was, I consider <a href="http://digwp.com">the blog</a> that goes with it an equal accomplishment. I think I just love blogging.</p><h4>Speaking</h4><p>2009 was the first year I spoke at any events. The first being the <a href="http://frontenddesignconference.com/">Front End Design Conference</a> in 2009. Between then and now, I&#8217;ve <a href="http://chriscoyier.net/speaking/">spoken</a> at a number of other cool events. I hope to do some more of that in 2010. I&#8217;ll be at the <a href="http://www.cmsassociation.com/52.html">CMS Expo</a> in May, but other than that nothing else lined up.</p><h4>Design</h4><p>There were two biggish redesigns in 2009. One in <a href="http://css-tricks.com/design-refresh-version-5/">September</a> and one in <a href="http://css-tricks.com/design-v6/">December</a>. Kind of strangely close together. At the time of this writing I&#8217;m calling it v6, and for the record, I rather like it. Probably won&#8217;t last long, but even when I do redesign, as you all know, it&#8217;s mostly just refinements and alignments rather than crazy huge overhauls. For example, the sidebar has been on the right since day one.</p><h4>Writing Style</h4><p>In the last few months I&#8217;ve been writing more editorial style posts. I plan to continue doing that as I enjoy it and I enjoy the conversion that is a result of it. I don&#8217;t plan to have it take over the site though. I plan to do tutorials and tips/tricks as well.</p><h4>Chicago</h4><p>Around the 4th of July I moved from Portland to Chicago. I like Portland the city (and the entire surrounding state) better, but I like Chicago as well and enjoy being closer to home and the Badgers.</p><h4>Work</h4><p>I was and still am a full time designer at Chatman Design. We&#8217;ve done some pretty fun and successful projects for local clients. We&#8217;ve also see some sites deteriorate and one thing we are working on right now is taking one of those and rehauling it. I&#8217;m excited to see that launch, if and when we can convince the client that they need it.</p><h3>Statistics</h3><ul><li>The highest-ever RSS feed subscriber count was <strong>39,690</strong>.</li><li>There have been <strong>549</strong> posts published, which makes <strong>280</strong> of them this year alone, and probably more than that since I&#8217;ve removed some old useless ones.</li><li><strong>3,105</strong> people have used the CSS-Tricks contact form, which makes <strong>1,885</strong> of them this year. Last year I said I responded to 90%, I&#8217;m thinking that&#8217;s closer to <strong>75%</strong> this year. I really try, but I can&#8217;t do individual troubleshooting for the most part anymore.</li><li>I&#8217;m up to screencast <strong>#79</strong>, with #80 and #81 already thought up in my head. That makes only 31 this year, less prolific than last year. I still love doing them but they are the least return on investment thing that I do with my time.</li><li>I spoke at <strong>7</strong> events.</li><li>There are <strong>4,786</strong> members of the forums who have posted <strong>22,183</strong> messages. This has about quadrupled since last year, although the forums see about 1/10 the traffic of the rest of the site. Huge shout out to all the forums guys who help keep that place so ridiculously helpful.</li><li>Search engines provide <strong>39%</strong> of traffic, <strong>38%</strong> from referring sites, and <strong>21%</strong> direct. I think that&#8217;s a solid mix.</li><li>The most popular single article of the year was the <a href="http://css-tricks.com/creating-a-slick-auto-playing-featured-content-slider/">Auto-Playing Featured Content Slider</a>, responsible for <strong>241,333</strong> pageviews and <strong>1.65%</strong> of total traffic.</li><li>The single highest traffic day was August 24th, with <strong>94,037</strong> pageviews from the <a href="http://css-tricks.com/moving-boxes/">Moving Boxes</a> post. Apparently, people like slidy JavaScript things.</li></ul><h3>To Come</h3><h4>Free Stuff, Soon</h4><p>As part of all this thank you business, I have a plan to give away a whole bunch of books I have amassed and could use a better home. I&#8217;m still reigning in all the details. But it&#8217;s going to be fun, trust me.</p><h4>Who Knows!</h4><p>Again this year, it&#8217;s really hard to say what the future holds for 2010. I have less definite plans this year than I did last year, partially on purpose since I always have so much stuff on my plate I don&#8217;t like making major plans on top of it all. I am genuinely excited to live through it though.</p><p>&nbsp;</p><p>Most of all, <strong>thank you</strong> to everyone who visits this site on a regular basis and participates in the community here. The year of 2009 was the first that this site solidified it&#8217;s place as not only something I do for fun but also as a part of my life and career. That&#8217;s only possible because of people like you.</p> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CssTricks?a=yklgIQgkIj0:weXqrBU-dyM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CssTricks?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=yklgIQgkIj0:weXqrBU-dyM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=yklgIQgkIj0:weXqrBU-dyM:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=yklgIQgkIj0:weXqrBU-dyM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=yklgIQgkIj0:weXqrBU-dyM:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=yklgIQgkIj0:weXqrBU-dyM:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=yklgIQgkIj0:weXqrBU-dyM:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded> <wfw:commentRss>http://css-tricks.com/thank-you-2009-edition/feed/</wfw:commentRss> <slash:comments>46</slash:comments> </item> <item><title>Designers These Days…</title><link>http://css-tricks.com/designers-these-days/</link> <comments>http://css-tricks.com/designers-these-days/#comments</comments> <pubDate>Fri, 29 Jan 2010 13:44:57 +0000</pubDate> <dc:creator>Chris Coyier</dc:creator> <category><![CDATA[Article]]></category><guid isPermaLink="false">http://css-tricks.com/?p=5409</guid> <description>&amp;#8230; have a good design sense and understand the fundamentals / design principals. &amp;#8230; know all the major design software including the entire Adobe Creative Suite. &amp;#8230; have some basic video editing skills. &amp;#8230; know HTML, CSS, and JavaScript. &amp;#8230; know enough about server-side languages (PHP, ASP, Ruby, Python, etc) to understand how they work, what they do, and [...]</description> <content:encoded><![CDATA[<p>&#8230; have a good design sense and understand the fundamentals / design principals.<br /> &#8230; know all the major design software including the entire Adobe Creative Suite.<br /> &#8230; have some basic video editing skills.<br /> &#8230; know HTML, CSS, and JavaScript.<br /> &#8230; know enough about server-side languages (PHP, ASP, Ruby, Python, etc) to understand how they work, what they do, and the possibilities of their use.<br /> &#8230; know about servers, hosting, domain registrants, DNS, etc. Setting it up, and fixing it when it breaks.<br /> &#8230; know OS X really well (and enough Windows to get by) or know Windows really well (and enough OS X to get by) and know a huge variety of utility software that goes with.<br /> &#8230; are good photographers.<br /> &#8230; can color correct photos and work in RAW.<br /> &#8230; can cut clipping paths or otherwise extract objects from photos.<br /> &#8230; have a killer online portfolio.<br /> &#8230; are a personable, nice people that are good with clients.<br /> &#8230; can help clients with anything even vaguely computer-related.<br /> &#8230; are quick to adapt to new software and new technologies.<br /> &#8230; can train fellow employees.<br /> &#8230; can train clients on the use of their websites.<br /> &#8230; are good communicators.<br /> &#8230; are team players.<br /> &#8230; have good taste in art, music and movies.<br /> &#8230; are up to date on social media.<br /> &#8230; are good at logic and deduction.<br /> &#8230; are good at user experience and user testing.<br /> &#8230; are SEO experts.<br /> &#8230; know about and how to handle web accessibility (and the laws surrounding it)<br /> &#8230; understand copyright laws.<br /> &#8230; do progressive enhancement and graceful degradation techniques.<br /> &#8230; can debug cross-browser problems and older browser bugs.<br /> &#8230; can bring your own client base.<br /> &#8230; are healthy, well groomed, and wear fancy t-shirts.<br /> &#8230; can be on-call at all times for emergencies.<br /> &#8230; have college degrees in design-related fields.<br /> &#8230; own very nice and expensive computers full of expensive software.<br /> &#8230; can design for mobile devices.<br /> &#8230; are good typographers.</p><p><span id="more-5409"></span></p><p>Partly tongue-in-cheek of course&#8230; but not entirely. The list of things a modern web designer should know is long, and each skill feels like it could be a lifetime in itself. Good luck learning that in a 2 or 4 year program (not that that isn&#8217;t a good start).</p> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CssTricks?a=82yHwI0a_GE:s2XsQTagX4w:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CssTricks?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=82yHwI0a_GE:s2XsQTagX4w:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=82yHwI0a_GE:s2XsQTagX4w:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=82yHwI0a_GE:s2XsQTagX4w:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=82yHwI0a_GE:s2XsQTagX4w:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=82yHwI0a_GE:s2XsQTagX4w:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=82yHwI0a_GE:s2XsQTagX4w:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded> <wfw:commentRss>http://css-tricks.com/designers-these-days/feed/</wfw:commentRss> <slash:comments>155</slash:comments> </item> <item><title>If it’s not one thing, it’s another.</title><link>http://css-tricks.com/font-hinting-is-just-the-start/</link> <comments>http://css-tricks.com/font-hinting-is-just-the-start/#comments</comments> <pubDate>Thu, 28 Jan 2010 14:07:08 +0000</pubDate> <dc:creator>Chris Coyier</dc:creator> <category><![CDATA[Article]]></category><guid isPermaLink="false">http://css-tricks.com/?p=5413</guid> <description>This year on 24 Ways, Jeffrey Zeldman wrote an article about the rending problems of &amp;#8220;real fonts&amp;#8221; on the web. The one line summary: different browsers and different platforms do &amp;#8220;hinting&amp;#8221; differently which can be bad news. Of course, like nearly everything Mr. Zeldman says, he has a good point. Then Jeffrey Veen chimed in:Now [...]</description> <content:encoded><![CDATA[<p>This year on <a href="http://24ways.org/">24 Ways</a>, <a href="http://www.zeldman.com/">Jeffrey Zeldman</a> <a href="http://24ways.org/2009/real-fonts-and-rendering">wrote an article</a> about the rending problems of &#8220;real fonts&#8221; on the web. The one line summary: different browsers and different platforms do &#8220;hinting&#8221; differently which can be bad news. Of course, like nearly everything Mr. Zeldman says, he has a good point.</p><p>Then <a href="http://www.veen.com/jeff/index.html">Jeffrey Veen</a> chimed in:</p><p><span id="more-5413"></span></p><blockquote><p>Now it’s screen rendering. Next, it will be the performance implications of downloading fonts with international character sets. After that? Maybe inconsistent browser support of kerning metrics, ligatures, or other Open Type Metrics.</p><p>It’s going to be a long road.</p></blockquote><p>Kinda puts thing in perspective doesn&#8217;t it?</p><p>In the long long ago, we used &lt;font&gt; tags. Then there was CSS, but we still only had the &#8220;core&#8221; web fonts. People were fed up and technologies like sIFR emerged. Now @font-face is really getting legs, but there are legal implications. So services like TypeKit emerge to help. But now font hinting creeps in and we get unhappy again. Then after that is solved, as Mr. Veen points out, there will be a long line of new things to be unhappy about. I can think of a few myself, for example, since fonts are vector, why can&#8217;t we apply strokes to them on the web?</p><p>I think we&#8217;re all going to need to be critical and help push things forward, but remain glass-half-full at the progress that has been made.</p> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CssTricks?a=XqjxPvORf-g:E-6Zychv7OA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CssTricks?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=XqjxPvORf-g:E-6Zychv7OA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=XqjxPvORf-g:E-6Zychv7OA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=XqjxPvORf-g:E-6Zychv7OA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=XqjxPvORf-g:E-6Zychv7OA:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=XqjxPvORf-g:E-6Zychv7OA:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=XqjxPvORf-g:E-6Zychv7OA:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded> <wfw:commentRss>http://css-tricks.com/font-hinting-is-just-the-start/feed/</wfw:commentRss> <slash:comments>14</slash:comments> </item> <item><title>Redesigning an “Edit Product” Page</title><link>http://css-tricks.com/redesigning-edit-product-page/</link> <comments>http://css-tricks.com/redesigning-edit-product-page/#comments</comments> <pubDate>Wed, 27 Jan 2010 13:27:01 +0000</pubDate> <dc:creator>Chris Coyier</dc:creator> <category><![CDATA[Article]]></category><guid isPermaLink="false">http://css-tricks.com/?p=5365</guid> <description>I decided that in 2010, I was going to design more things. I didn&amp;#8217;t do as much just straight up designing of things in 2009. So rather than wait around for opportunities to come to me, I am going to just pick random things to redesign. At the day job we just got done doing [...]</description> <content:encoded><![CDATA[<p><a href="http://twitter.com/chriscoyier/status/7753927318">I decided</a> that in 2010, I was going to design more things. I didn&#8217;t do as much just straight up designing of things in 2009. So rather than wait around for opportunities to come to me, I am going to just pick random things to redesign. At the day job we just got done doing a whole ton of data entry for a client, that we do every year when they revise their catalog. We use <a href="http://pinnaclecart.com">Pinnacle Cart</a> for this client&#8217;s store, which aside from having table-based templates, is a pretty decent eCommerce software. After spending so much time in there editing products, I decided that I would take a crack at resigning that particular screen see if I could address some issues.</p><p><span id="more-5365"></span></p><p>The area I redesigned is just a part of the overall page, so don&#8217;t be distracted by the fact that there isn&#8217;t overall admin navigation and what-have-you.</p><h3>Before</h3><p><a href="http://css-tricks.com/wp-content/csstricks-uploads/pc-before-full.png"><br /> <img src="http://css-tricks.com/wp-content/csstricks-uploads/pc-before.png" width="570" height="1701" alt="" title="" /><br /> Click to see full-size<br /> </a></p><h4>Problems:</h4><ul><li>White space used ineffectively</li><li>Tabs feel cramped</li><li>Ordering of fields doesn&#8217;t make sense (e.g. Why is &#8220;Meta Description&#8221; and 5 other fields in between the product title and the price, the two most important fields)</li><li>Page length is too long, why not break images into a separate tab</li><li>Promotions and discounts tabs could be combined</li><li>Next/Previous navigation at bottom of page is useless</li><li>Reset form button is useless</li><li>Shouldn&#8217;t have to scroll to save</li><li>Meta keywords are useless</li></ul><h3>After</h3><p><a href="http://css-tricks.com/wp-content/csstricks-uploads/Edit-Product-Redo.png"><br /> <img src="/wp-content/csstricks-uploads/Edit-Product-Redo-sm.png" width="570" height="964" alt="" title="" /><br /> Click to see full size<br /> </a></p><h4>Improvements</h4><ul><li>Tabs replaced by larger clickable links on top row</li><li>Next/Previous navigation at top right corner. This way you can click-click-click and the link will always be in the same place.</li><li>Fields grouped more logically</li><li>Page length shortened by removing some things, and moving things around. At the same time the entry fields are actually much larger.</li><li>Two save buttons present, so you never have to scroll to save, and is named &#8220;Save all changes&#8221; which should help with confusion over what the button actually saves (it saves everything not just the top or bottom half). The button also provides a break line to separate the basics from the deeper more specific stuff.</li><li>Buttons for HTML tags in description area</li></ul><p>This just feels better to me, but you don&#8217;t have to agree with me. If you have ideas for improvements or comments about where I went wrong, let me have it. I&#8217;ll also <a href="http://css-tricks.com/examples/EditProductRedo.psd">provide the PSD</a> in case you want to shuffle things around yourself.</p> <div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CssTricks?a=5UhrAyDfonQ:9sHQbcRr6Qk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CssTricks?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=5UhrAyDfonQ:9sHQbcRr6Qk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=5UhrAyDfonQ:9sHQbcRr6Qk:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=5UhrAyDfonQ:9sHQbcRr6Qk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=5UhrAyDfonQ:9sHQbcRr6Qk:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=5UhrAyDfonQ:9sHQbcRr6Qk:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=5UhrAyDfonQ:9sHQbcRr6Qk:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded> <wfw:commentRss>http://css-tricks.com/redesigning-edit-product-page/feed/</wfw:commentRss> <slash:comments>41</slash:comments> </item> </channel> </rss><!-- This site's performance optimized by W3 Total Cache. Dramatically improve the speed and reliability of your blog!

Learn more about our WordPress Plugins: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)
Database Caching 10/29 queries in 0.028 seconds using apc

Served from: css-tricks.com @ 2010-02-09 12:59:16 -->
