CSS - Page 8

Learn the latest tips, techniques, and approaches for laying out your websites with CSS and stylesheets.

CSS Hat: A Magic Button That Turns Photoshop Styles Into CSS

CSS / 13 Jun 2012

CSS Hat: A Magic Button That Turns Photoshop Styles Into CSS

Taking a design from Photoshop to the web in a click is not even a remotely new idea. For as long as there have been “web designers” there has been the dream of such a workflow. Today we’re going to look at yet another tool that makes this promise: CSS Hat.

CSS Hat is different than other apps that you’ve seen though. It’s not a full blown WYSIWYG aimed at allowing you to build an entire site without writing code, rather it’s a way to bust out a few quick CSS3 styles on a single element using the process that you’ve used for the past decade or more, right in Photoshop. Spoiler alert: it’s good. Really good. Read on to see why.

Build an Animated Photo Wall With CSS

CSS / 7 Jun 2012

Build an Animated Photo Wall With CSS

Today we’re going to embark on the adventure of building yet another awesome and fun CSS demo. This time we’ll create a big, seamless wall of photos. When the user hovers over an image, a transparent black overlay will fade it out as a text label fades in and the image zooms.

The result is pretty slick and I’ve also thrown in a bonus second version for those that make it all the way through the tutorial. Read on to get started!

Code a Simple Folded Corner Effect With CSS

CSS / 30 May 2012

Code a Simple Folded Corner Effect With CSS

This week we have yet another fun and simple CSS project for you to hone your coding chops on. This time around we’ll be creating the illusion of a page with one corner that has been folded over.

With the power of pseudo elements, we’ll create some CSS triangles that we can then push into place to create our page fold. Once we’re all finished, you’ll be able to simply apply a class to any div to add in the effect.

Framework Fight: Zurb Foundation vs. Twitter Bootstrap

CSS / 24 May 2012

Framework Fight: Zurb Foundation vs. Twitter Bootstrap

In the vast world of rapid prototyping CSS frameworks and toolkits, there are a ton of different options to choose from, but ever since Twitter’s Bootstrap hit the scene it seems like it has largely gobbled up this market. Is there room or reason for anything else?

The folks at Zurb think so and aren’t about to abandon their widely successful Foundation project. Having written about Bootstrap several times in the past, I’m going to jump into Foundation today and see what I think.

Can’t Get Into Preprocessors? Try Zen Coding

CSS / 22 May 2012

Can’t Get Into Preprocessors? Try Zen Coding

A ton of discussion lately has been given to preprocessors. These incredibly useful tools make coding easier, faster and more maintainable, but they’re certainly not for everyone. Whether or not you’ve jumped on the preprocessor bandwagon, you should give a fresh look to an old favorite that helps you dramatically cut your coding time without reinventing your workflow with compilers and other complications: Zen Coding.

With Zen Coding, you can type a little and output a lot, just like with a preprocessor like Jade or Haml, only it expands instantly into the vanilla HTML that you love. For those that are new to the concept, I’ll walk you through how Zen Coding works and show you some of my favorite tricks, then end with a brief tutorial on getting Zen Coding up and running in Sublime Text 2.

Cycle Through Client Quotes With CSS Keyframes

CSS / 17 May 2012

Cycle Through Client Quotes With CSS Keyframes

Client testimonials are a popular website feature. They bring credibility to a company and instill a sense of trust. If your other clients love you so much, I might too!

As a fun experiment, today we’re going to set out to build a cool little quote section that will rotate between multiple different quotes using only CSS. Along the way, we’ll learn all about how to plan and create multi-step keyframe sequences. Let’s get started.

Build a Library of CSS Image Label Options

CSS / 14 May 2012

Build a Library of CSS Image Label Options

Today I’m working on another awesome free download for PixelsDaily. Here you’ll be able to see my thought processes, goals and code, and later you’ll be able to download the whole project to use in your own work.

Basically, our goal here is to create a simple effect so that when the user hovers over an image, a hidden text label pops up into view. This is of course extremely easy to do so we’re going to go a step further by building a whole bunch of options for the developer to choose from. This will provide you with some good practice for how to create flexible effects that can be applied in different ways without too much code repetition.

Create Stunning Effects With CSS Transition Delays

CSS / 8 May 2012

Create Stunning Effects With CSS Transition Delays

I’m a huge fan of CSS transitions. Sure, they can be abused but on the whole they’re a really great and easy way to add a little life to your web pages. And let’s face it, they’re flat out fun to play with.

I’ve covered transitions a million different ways, but there’s one feature that I hardly ever touch: transition delays. Why would you want to delay your transition? It turns out that the effects that you can achieve become much more complex and impressive when you incorporate this one extra parameter. Let’s jump in and build some cool demos to show off how it works.

Code a Set of Animated App Store Buttons With CSS

CSS / 3 May 2012

Code a Set of Animated App Store Buttons With CSS

I’ve gotten bored lately with all of the run of the mill, plain jane iTunes/Mac App Store buttons that I’ve been seeing around the web, so I coded up some fun little animated alternatives that I thought I would share.

This project is super simple, so even if you’re a complete beginner, you should be able to follow along. We’ll learn how to use some fancy techniques like how to incorporate icon fonts into a design and how to insert objects using pseudo elements.

Are Hover Events Extinct?

CSS / 26 Apr 2012

Are Hover Events Extinct?

Odds are, :hover was the very first pseudo class selector that you ever learned. Heck, it might be the only one you ever learned. We all love this lovely little feature and use it constantly as a way to create enriched user experiences.

My question today could change the way you think about hover forever: “Does the ubiquity of touchscreens render hover events obsolete?” Put another way, did the iPhone kill :hover? Read on to see how iOS handles a CSS hover event, what that means for you as a developer, and how you should or shouldn’t be using hover events in your designs.

Everything You Never Knew About CSS Floats

CSS / 18 Apr 2012

Everything You Never Knew About CSS Floats

What do floats really do anyway? How do they affect the box model of the elements involved? How do floated elements differ from inline elements? What are the specific rules governing the position of floated elements? How does the clear property work and what is it for?

Floats can trip up even experienced developers and understanding their behavior can really set you free from many of the woes that you face with CSS. Even if you think you already know all about floats, we’ll dive deep enough that you just might learn something new!

Sass vs. Stylus: Who Wins the Minimal Syntax Battle?

CSS / 16 Apr 2012

Sass vs. Stylus: Who Wins the Minimal Syntax Battle?

Today we’re going to pit two CSS preprocessors head to head. You’ve no doubt seen lots of discussion about how SCSS compares to LESS, but where does Stylus, the new kid on the block, factor in? Can it possibly match the power and versatility of SASS?

We’ll jump head first into both syntaxes and compare them side by side to see which is more logical and versatile. We’ll also talk about features and give you a clear argument for why one preprocessor is more powerful. You can rest assured, we’re not going to wuss out and give you some crap about a tie, there will be a winner!