CSS - Page 9

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

What’s the Deal With :target in CSS?

CSS / 10 Apr 2012

What’s the Deal With :target in CSS?

I’ve been seeing a lot of tutorials lately that utilize :target in CSS to perform some fancy feat so I thought I’d take the time to really dig in and discuss how and why this syntax works. Instead of blindly following someone else’s code, you should be able to wield this tool with the knowledge of what’s happening how it affects browser support.

Read on to learn all about the basic functionality associated with the :target pseudo class and how you can stretch that ability to perform all kinds of crazy stuff with pure CSS. Along the way we’ll build some great navigation and slideshow examples for you to learn from.

Facebook Exclusive Article: How to Center Anything With CSS

CSS / 9 Apr 2012

Facebook Exclusive Article: How to Center Anything With CSS

We’ve decided to reward our faithful fans with an exclusive treat. Anyone that “likes” Design Shack on Facebook can download a free, in-depth CSS tutorial!

To follow up last week’s article on the difference between absolute and relative positioning, this week we’re taking a look at an extremely basic question with an incredibly broad reaching answer: How do I center something with CSS?

Read on to get a glimpse of the tutorial and see how you can claim your download today.

3 Free Apps for Testing Your Responsive Designs Online

CSS / 5 Apr 2012

3 Free Apps for Testing Your Responsive Designs Online

Responsive design has brought about a whole new list of challenges for web designers who have decided to take the plunge and leave static design behind. Creating a layout that works well at not one but several, or even all, possible widths requires patience, creativity and of course, lots of testing.

Nothing replaces checking out your design on the actual devices that you’re targeting, but as you’re building, it’s nice to be able to get a quick peek of the layout at various widths right on your computer. You could resize your browser window manually, but this gets ridiculously tedious if you’re shooting for precise pixel dimensions. Fortunately, several talented developers have already built some great tools to aid you in this process. Join us today as we take a look at three of them.

Build an Infinite Scrolling Photo Banner With HTML and CSS

CSS / 3 Apr 2012

Build an Infinite Scrolling Photo Banner With HTML and CSS

Today we’re going to embark on the challenge of creating an animated banner of photos that automatically scrolls horizontally through an infinite loop. The best part: we’re going to do it without a single line of JavaScript.

To make this banner truly useful, our goal will be to use individual photos dropped into our HTML, not simply one long CSS background that repeats. This is pretty tricky but we’ll walk you through exactly how it works. Let’s get started!

Animate.css: Kick-Ass CSS Animations in Seconds Flat

CSS / 26 Mar 2012

Animate.css: Kick-Ass CSS Animations in Seconds Flat

On my laundry list of todo items that I’ll do “someday” is the idea of creating a prebuilt library of useful CSS animations. The bad news is that I’ll likely never actually get around to doing this. The good news is that developer Dan Eden beat me to it.

Today we’re going to check out Animate.css, an awesome and free collection of CSS animations that you can apply to your projects with almost no effort. It’s a blast to play around with so follow along and join the fun.

Sass and Media Queries: What You Can and Can’t Do

CSS / 15 Mar 2012

Sass and Media Queries: What You Can and Can’t Do

Preprocessors like Sass are helping us flex our development muscles in nearly every area of our CSS. Variables, mixins, inheritance and many more great features make coding easier and more concise than ever.

So what about leveraging Sass for responsive design, or more specifically, for media queries? Are there any features of Sass that pair particularly well with media queries? Is there anything you should avoid? Join me as I experiment and discover the answers.

Code a Responsive Navigation Menu

CSS / 14 Mar 2012

Code a Responsive Navigation Menu

Navigation menus used to be a fairly simple thing. Code up an unordered list, float it left and you’re good to go. With responsive design being all the rage these days though you’re faced with some new challenges when creating a menu design.

Follow along as we start from scratch and code a simple but effective responsive navigation menu that you can easily modify and reuse in your own projects.

Use Pseudo Elements to Create an Image Stack Illusion

CSS / 12 Mar 2012

Use Pseudo Elements to Create an Image Stack Illusion

Today we’re going to see if we can take a single image inserted via HTML and make it look like a messy stack of images using only CSS. The key: pseudo elements.

Along the way we’ll see how embarking on a project like this can quickly lead to some messy code and how we can combat that with some awesome DRY coding practices.

Web Design Vocabulary Refresh Part 2: CSS Structure

CSS / 7 Mar 2012

Web Design Vocabulary Refresh Part 2: CSS Structure

What’s the difference between a property and a selector? How is a declaration different than a declaration block and what’s a CSS rule? How do I tell the difference between a pseudo class and a pseudo element?

This series will serve as a basic introduction to some terms that every new web designer should be sure to add to his or her vocabulary. It won’t be an exhaustive vocabulary list but rather a primer on a few terms that I found difficult to wrap my head around when I was a beginner. We started with HTML earlier this week and today we’ll move on to some structural components of CSS.

Use Gridpak to Roll Your Own Responsive Grid

CSS / 6 Mar 2012

Use Gridpak to Roll Your Own Responsive Grid

I love finding free tools that are capable of making my job (and yours) just a little bit easier. The web developer community is positively overflowing with talented people who are more than willing to share their creations with the world while asking nothing in return.

Today we’re going to look at one such tool from Erskine Design called Gridpak. With it we can quickly and easily generate our own responsive grid for building web pages that work well on lots of different screen sizes. It’s a little tricky to implement though so we’ll help you figure out how to set up your styles after you grab the download.

What’s the Deal With Display: Inline-Block?

CSS / 29 Feb 2012

What’s the Deal With Display: Inline-Block?

We’ve been using floats for layout pretty much since we left tables behind. It’s a quirky solution that can often cause troubles, but if you know what you’re doing, it works.

One interesting alternative to floats that people are turning to more and more lately is to set the display value of an element to inline-block. What does this do exactly? How is it like a float? How is it different? Let’s dive in and see what we can discover.

Super Sweet CSS 3D Text Effects With Sass and LESS

CSS / 27 Feb 2012

Super Sweet CSS 3D Text Effects With Sass and LESS

I was recently discussing the merits and various features of CSS preprocessors with a colleague. We covered all of the basics: how it’s great to have variables and how mixins can save you an incredible amount of coding time. When the conversation turned to some of the more obscure features though things got interesting. When I brought up the various color operations, my colleague boldly proclaimed that no “real designer” could ever find a legitimate excuse for using this feature and not picking his own colors manually.

In the words of Barney Stinson, “challenge accepted!” Today we’re going to create an awesome faux 3D text effect with pure CSS and then see why it’s a lot easier to do it with the color operations in Sass or LESS.