Feed aggregator
"In the same way that a movie isn’t good because it’s in color, a movie isn’t good because it’s in..."
- James Cameron
CSS Design: Andrey Fedorenko
This site uses a completely unique 3D design concept.
The design is based heavily on hard edges and cube-like shapes. The overall effect is quite attractive.
This design was featured on the 27th August 2010 . It falls under the category of Portfolio, and has a layout style of Other.
If you'd like, you can visit this site, or view all our other featured designs.
CSS Design: Electric Bike World
I am almost always surprised to find a physical product website that I actually like.
This great looking e-commerce site uses great looking design elements, a bright and attractive color scheme and nice typography to sell electric bicycles.
This design was featured on the 27th August 2010 . It falls under the category of Sport, and has a layout style of Other.
If you'd like, you can visit this site, or view all our other featured designs.
In Defense Of A/B Testing
Recently, A/B testing has come under (unjust) criticism from different circles on the Internet. Even though this criticism contains some relevant points, the basic argument against A/B testing is flawed. It seems to confuse the A/B testing methodology with a specific implementation of it (e.g. testing red vs. green buttons and other trivial tests). Let’s look at different criticisms that have surfaced on the Web recently and see why they are unfounded.
Jason Cohen, in his post titled Out of the Cesspool and Into the Sewer: A/B Testing Trap, argues that A/B testing produces the local minimum, while the goal should be to get to the global minimum. For those who don’t understand the difference between the local and global minimum (or maxima), think of the conversion rate as a function of different elements on your page. It’s like a region in space where every point represents a variation of your page; the lower a point is in space, the better it is.
Minimise file size with the YUI Compressor TextMate Bundle
It’s quite obvious that the smaller the files that make up your website are, the less time your visitors will wait for them to download. One way of reducing file sizes is minimising JavaScript and CSS files by removing comments and whitespace, among other things.
To do that, you can either let the server do it for you or minimise the files yourself before uploading them to the server. Letting the server do it automatically is probably the most convenient way since you don't have to remember to do it. But it isn't practical or possible for everyone to use something like minify, so sometimes you'll need to do it manually.
That may sound like more trouble than it's worth. Luckily for us TextMate users there's a handy YUI Compressor TextMate bundle that makes it almost as transparent as the server-side solution.
Posted in CSS, Coding, JavaScript.
HTML5 Pour Les Web Designers
Sacrebleu! The French edition of the ebook of Monsieur Jeremy Keith’s HTML5 For Web Designers is in the top five sellers in the iTunes Store Français.
To answer your other questions: an eBook version in English is coming to books.alistapart.com next week, will soon thereafter also be sold via the iTunes Store, and will be followed by a PDF version. Get those downloading fingers in shape now!
Avoiding the Uncanny Valley of Interface Design
From Francisco Inchauste, on the topic of UI that imitates realism:
It is so easy to love a certain effect and want to use that everywhere. Not all projects need to have the selections sitting on a perfectly lit wooden bookshelf. On one hand we want to be creative and make something that is appealing and can sell the product. On the other side we have to question the cost of that approach on the experience itself and balance style and function with purpose.
Producteev: The Ultimate Free Productivity Solution
“Today we’re going to take a look at Producteev, an awesome todo app that might just be enough to have you saying adios to Backpack and Remember the Milk.”
Getting to Grips With Content
“With a changing attitude amongst key media players, content must no longer be ignored as a truly marketable asset.”
jQuery Plugin Checklist: Should You Use That jQuery Plug-In?
“jQuery plug-ins provide an excellent way to save time and streamline development, allowing programmers to avoid having to build every component from scratch. But plug-ins are also a wild card that introduce an element of uncertainty into any code base. ”
Create a Fun Animated Navigation Menu With Pure CSS
In recent years jQuery has become the easiest and best supported way to implement simple animations online. JavaScript is exceptionally good at what it does and this article is in no way an argument against it.
However, CSS3 offers a glimpse into a possible future where basic animations are performed with straight CSS completely independent of scripting. Today we’ll take a look at how to use CSS3 to create a fun and unique navigation menu that uses @font-face, transforms and transitions.
Like the article? Be sure to subscribe to our RSS feed and follow us on Twitter to stay up on recent content.
Your website’s navigation can communicate a lot about your business or service. Clean, usable navigation is a staple in good web design and is always your safest bet.
However, if you’re ever creating a site that doesn’t necessarily have to be so professional, the navigation provides a great place to have a little fun and insert some personality.
To get a glimpse of what we’ll be building, take a look at the live demo. I’ve added some placeholder content but the main idea here is the navigation menu.
The HTMLTo start off our project, paste in the following blank HTML5 template. Notice that I’ve tossed in HTML5 Shiv to make IE and HTML5 play nice together.
<!DOCTYPE html> <html> <head> <meta charset=utf-8 /> <meta name="description" content="description"> <title>Animated Navigation: Design Shack</title> <link rel="stylesheet" media="screen" href="style.css" /> <!--[if IE]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> </head> <body> </body> </html>Next, throw a simple unordered list into the body portion. Include some links and any text that you want for the individual menu items.
<ul id="nav"> <li><a href="#">Home</a></li> <li><a href="#">About</a></li> <li><a href="#">Work</a></li> <li><a href="#">Contact</a></li> </ul>Believe it or not, that’s really all we need here. We might come back and tweak this a bit later but overall our navigation menu will remain pretty basic and easy to throw together in only a few minutes.
Basic StylesNext create a CSS file, perform a basic reset and add some basic body settings. Since this project is so simple, we don’t need a big fancy CSS reset but it often helps to make sure all browsers are on the same page with margins and padding.
* { padding: 0; margin: 0; } body { background: #f4f1e5; color: #544738; font-family: helvetica, sans-serif; }The next thing we want to do is take our vertical list, make it flow horizontally, and add a hover effect. Do that with the following code.
ul li { float: left; list-style: none; margin-right: 1em; } li a { color: #544738; text-decoration: none; float: left; font-size: 25px; padding: 12px; } li a:hover { color: #7eb9be; }There’s nothing here you haven’t seen a thousand other places. By floating an unordered list left, we put all of the list items on the same line (remember to clear your floats if you add more content!). Other than this we’ve simply spaced the elements out and applied a hover color.
We’ll be adding fancier hover effects later but it’s important that we don’t depend entirely upon them. If we want graceful degradation across browsers then the menu should be fully functional without any CSS3. As you can see in the image below, we’ve obtained that goal and should now have a simple text-based menu that changes color on hover.
Customizing the FontSince we’re just having fun I want to use a crazy font. My favorite option for implementing custom fonts online is pure @font-face using Paul Irish’s Bulletproof @font-face syntax .
This way we don’t have to worry about third party systems, domain, registering etc. We can simply find a font that we like and toss it straight in via CSS.
Font SquirrelSetting up fonts with @font-face isn’t the easiest task if you’re a beginner. First you have to find a font that’s legal to use (which can be a major headache), then you have to track down multiple versions of the font and plug those versions into the Bulletproof Syntax; it’s a real pain.
Fortunately, Font Squirrel has taken just about all the work out of the process with their pre-built @font-face kits.
An @font-face kit contains everything you need: the fonts, the code, an example, etc. Simply browse the site until you find a kit that you like and click the download button. I decided to go with Kulminoituva under the “Novelty” section. It’s a crazy 3D block letter font that I would normally never use so it’s perfect for this project.
After you’ve downloaded the kit, copy the fonts to your page’s root directory and past the included text into your CSS file.
@font-face { font-family: 'KulminoituvaRegular'; src: url('kulminoituva-webfont.eot'); src: local('‚ò∫'), url('kulminoituva-webfont.woff') format('woff'), url('kulminoituva-webfont.ttf') format('truetype'), url('kulminoituva-webfont.svg#webfontHNAi9IoX') format('svg'); font-weight: normal; font-style: normal; }If you followed the bulletproof syntax link above, you should know what all this code does. If not, the only thing you really need to know is that the first line tells us how to refer to the font elsewhere in our code: ‘KulminoituvaRegular’
So now we apply a font family to the list items using the same method we normally would while using our new font as the default.
ul li { float: left; list-style: none; margin-right: 1em; font-family: 'KulminoituvaRegular', helvetica, sans-serif; font-size: 25px; padding: 12px; } li a { color: #544738; text-decoration: none; float: left; } li a:hover { color: #7eb9be; }And now our navigation menu should look a lot more fun.
We now have a pretty decent little navigation menu. Notice that we applied some backup fonts as well so that anywhere @font-face doesn’t work, Helvetica will load instead.
To finish it off, let’s throw in some CSS3 animations.
Animating the MenuCurrently the best way to do CSS animations is a two step process involving both transforms and transitions. So the first thing we want to do is decide how to manipulate the objects in our menu using a transform, then we’ll apply a transition to animate the transformation.
If you take a look at the font we’ve chosen you’ll see that the letters are all rotated back and forth to give it a sloppy hand-drawn sort of feel. We’ll use this as inspiration for our transform and introduce some more rotation when the user hovers over a link. To give even more emphasis, we’ll also introduce a scaling effect.
Transforming the Text on HoverWith CSS transforms we have four basic options: rotate, scale, skew and translate (move left and right). Since we don’t want our text to get all skewed or move around too much, we’ll stick to rotate and scale.
The syntax for implementing these is super basic and conveniently identical across the Mozilla, Webkit and Opera versions.
li a:hover { -webkit-transform: rotate(-10deg) scale(1.2); -moz-transform: rotate(-10deg) scale(1.2); -o-transform: rotate(-10deg) scale(1.2); }As you can see, we simply applied a rotation of -10 degrees and a slight scaling of 1.2. Now when you hover over a link in the navigation, it should appear rotated and larger.
After playing with this a bit, I decided that I didn’t like the fact that all the links rotated the same way. The text feels a bit more random than that so I wanted to introduce some variation here.
The solution is to apply classes to the list items in our HTML so we can style some independently of others.
<ul id="nav"> <li class="left"><a href="#">Home</a></li> <li class="right"><a href="#">About</a></li> <li class="left"><a href="#">Work</a></li> <li class="right"><a href="#">Contact</a></li> </ul>Now that we have two different classes, we can apply a separate rotation to every other link so that the first and third links will rotate counter-clockwise and the second and fourth links will rotate clockwise.
.left a:hover { -webkit-transform: rotate(-10deg) scale(1.2); -moz-transform: rotate(-10deg) scale(1.2); -o-transform: rotate(-10deg) scale(1.2); } .right a:hover { -webkit-transform: rotate(10deg) scale(1.2); -moz-transform: rotate(10deg) scale(1.2); -o-transform: rotate(10deg) scale(1.2); }Voila! Now we have an awesome hover rotation effect. The last thing that we want to fix is the transition. Currently, hovering over the text causes an immediate rotation. We want this to be gradual like you’d find in a cool jQuery effect.
Animating the RotationOur final step is to add in a CSS3 transition to animate the hover effect. As with transforms, transitions are very easy to implement and contain the same basic syntax for Webkit, Mozilla and Opera.
All you have to do is set the property that you want to animate (in this case “all”), the duration and the easing. You can choose between ease, linear, ease-in, ease-out, and ease-in-out. These effect the way the animation ramps up and slows down.
.left a:hover { /*Transition*/ -webkit-transition:All .5s ease; -moz-transition:All .5s ease; -o-transition:All .5s ease; /*Transform*/ -webkit-transform: rotate(-10deg) scale(1.2); -moz-transform: rotate(-10deg) scale(1.2); -o-transform: rotate(-10deg) scale(1.2); } .right a:hover { /*Transition*/ -webkit-transition:All .5s ease; -moz-transition:All .5s ease; -o-transition:All .5s ease; /*Transform*/ -webkit-transform: rotate(10deg) scale(1.2); -moz-transform: rotate(10deg) scale(1.2); -o-transform: rotate(10deg) scale(1.2); }As you can see, we applied the same transition to both classes. Feel free to vary this if you wish and change the transition of the first or second class.
All Finished!That completes our navigation menu. Click here to see the live demo. Remember that you can use these animation techniques on anything you like, not just text. Try creating a thumbnail gallery or something else image-driven that uses the same effect.
Closing ThoughtsObviously, IE users will only experience a plain menu (though it will be fully functional). You’re definitely better off with JavaScript if you want animations like this to work across all browsers. Further, the text tends to get a little choppy in Webkit during the transition. I found this to be quite annoying but couldn’t figure out a fix (let me know if you do!).
Despite any arguments against its use, CSS animations are definitely fun to play with and extremely easy to implement. Leave a comment below with a link to any cool CSS3 animations you’ve created along with a brief description of the properties you used.
30+ Examples of Corporate Logo Redesigns
jQuery Plugin Checklist: Should You Use That jQuery Plug-In?
jQuery plug-ins provide an excellent way to save time and streamline development, allowing programmers to avoid having to build every component from scratch. But plug-ins are also a wild card that introduce an element of uncertainty into any code base. A good plug-in saves countless development hours; a bad plug-in leads to bug fixes that take longer than actually building the component from scratch.
Fortunately, one usually has a number of different plug-ins to choose from. But even if you have only one, figure out whether it's worth using at all. The last thing you want to do is introduce bad code into your code base. The first step is to figure out whether you even need a plug-in. If you don’t, you’ll save yourself both file size and time.
CSS Design: EMPP Graphics
This site features a very thin layout with an extremely linear progression. Each portfolio piece is displayed one right after the other with a quick button to return to the top.
The page is simple but effective and the work on display is quite beautiful.
This design was featured on the 26th August 2010 . It falls under the category of Portfolio, and has a layout style of Other.
If you'd like, you can visit this site, or view all our other featured designs.
CSS Design: Foundation Six
A beautiful site that uses a typical but stylish 3D web page layout, subtle background textures and rich colors.
They typography throughout the page is particularly well done. Notice the mixture of thick almost western serifs with thin condensed sans-serif type.
This design was featured on the 26th August 2010 . It falls under the category of Portfolio, and has a layout style of Other.
If you'd like, you can visit this site, or view all our other featured designs.
WebKit HTML5 Search Inputs
One of the new types of inputs in HTML5 is search.
<input type=search name=s>It does absolutely nothing in most browsers. It just behaves like a text input. This isn’t a problem. The spec doesn’t require it to do anything special. WebKit browsers do treat it a bit differently though, primarily with styling.
A search input in WebKit by default has an inset border, rounded corners, and strict typographic control.
The Styling LimitationsWebKit has big time restrictions on what you can change on a search input. I would guess the idea is consistency. In Safari particularly, search fields look just like the search box in the upper right of the browser. The following CSS will be ignored in WebKit “no matter what”, as in, you can’t even fight against it with !important rules.
input[type=search] { padding: 30px; /* Overridden by padding: 1px; */ font-family: Georgia; /* Overridden by font: -webkit-small-control; */ border: 5px solid black; /* Overridden by border: 2px inset; */ background: red; /* Overridden by background-color: white; */ line-height: 3; /* Irrelevant, I guess */ }In other words, be extremely cautious about using any of those CSS properties on a search input unless you are OK with the search input looking very different in other browsers.
Allowed stylingThe following CSS works as expected. The last three, in my opinion, should probably locked in like the properties above as styling those properties almost always looks worse than if you didn’t.
input[type=search] { color: red; text-align: right; cursor: pointer; display: block; width: 100%; letter-spacing: 4px; text-shadow: 0 0 2px black; word-spacing: 20px; }Busted stylingBe careful not to use text-indent on search inputs. The results are quite weird an inconsistent. Here is one example:
Sometimes the text is below like this. Sometimes it’s not visible at all. It appears to be related to elements around it as well as how much indent it has (low values sometimes work fine).
Show Previous SearchesThis isn’t documented anywhere that I know of nor is it in the spec, but you if you add a results parameter on the input, WebKit will apply a little magnifying glass with a dropdown arrow showing previous results. (Thanks to Mike Taylor)
<input type=search results=5 name=s>The integer value you give the results attribute is how many recent searches will appear in this dropdown, if there are that many.
I really like the little magnifying glass. It drive home the searchyness of the field, but I’m calling the functionality itself rather janky. On a page reload recent searches clears, so that dropdown will almost always say “No recent searches”, unless you have implemented some kind of Ajax search (and even that I haven’t really tested).
Size RestrictionsThere are only three different “sizes” that WebKit search inputs can be, and it is determined by the font-size you declare on them.
Resulting SizeCSS font-sizeSmall<= 10pxMedium11px – 15pxLarge>= 16pxSmall, Medium, and Large. That’s all you get!
This small, medium, and large business can be extremely frustrating, as even setting identical font values, at the minimum for a “bump”, you’ll see font size difference across browsers.
Identical font sizings not idential.
Notice the (x) on the right hand side of the search inputs on the WebKit side. That is an additional feature of these search inputs in WebKit. If the input has any value (not a placeholder, a real value) the (x) will be present which is a functional UI control for clearing the input.
Speaking of placeholder text, search inputs are a great candiate for that.
<input type=search results=5 placeholder=Search... name=s>And in case light gray isn’t your cup of tea, you can style the placeholder text:
::-webkit-input-placeholder { color: orangered; }Stylebot
Chrome users and CSS wranglers, check this out. It’s an extension which adds a “css” link on the right in your URL bar. Click it to open a CSS Edit-like pane on any website where you can click elements and adjust their CSS on the fly. The CSS that you edit will automatically be applied any time you visit that domain, allowing you to make persisting changes to the sites you visit.
With Beautiful Type Comes Great Responsibility
“Although, many free fonts can also be extremely beautiful. The trick is knowing how / when to use them, their history, your message and how it’s being stated with the type personality you select.”

