SEO Werkt!

Seo werkt!

Archive for the ‘navigation menus’ tag

Powerful New CSS- and JavaScript Techniques

without comments




  

Since our last round-up of useful CSS techniques, we’ve seen a lot of truly remarkable CSS geekery out there. With CSS3, some of the older techniques now have become obsolete, others have established themselves as standards, and many techniques are still in the “crazy experimentation” stage.

Since the release of the previous post, we’ve been collecting, sorting, filtering and preparing a compact overview of powerful new CSS techniques. Today we finally present some of these techniques. Use them right away or save them for future reference.

Please note that many techniques are not only CSS-based, but also use HTML5 and JavaScript. We are going to present useful CSS tools and responsive design techniques in separate posts. Please don’t hesitate to comment on this post and let us know how exactly you are using them in your workflow. However, please avoid link dropping; share your insight and experience instead, and feel free to link to techniques that really helped you recently. Thanks to all of the featured designers and developers for their fantastic work!

Table of Contents

  1. CSS Transitions and Animations
  2. Useful and Practical CSS Techniques
  3. CSS Typography and Text Techniques
  4. CSS Navigation Menus and Hover Effects
  5. Visual Techniques With CSS

CSS Transitions And Animations

CSS transitions and animations are often used to make the user experience a bit more smooth and interesting, especially when it comes to interactive effects on hover or on click. Designers are experimenting with technology and create sometimes crazy, sometimes practical—but often innovative techniques which you could use to make your websites just a tiny bit more engaging.

Interactive CSS3 lighting effects
An interesting effect to create interactive lighting effects with 3-D transforms, CSS gradients and masks; the cast shadow was created using box shadows and transforms.

Interactive CSS3 Lighting Effects

CSS3 dodecahedron
A fancy dodecahedron experiment, created using CSS Transforms and a tiny JavaScript snippet.

CSS3 Dodecahedron

CSS 3D Lighting Engine Photon
Our editor Tom Giannattasio has created a JavaScript library that adds simple lighting effects to DOM elements in 3D space using the WebKitCSSMatrix object. It would be great to have an implementation for other rendering engines as well.

CSS 3D Lighting Engine Photon

3D Thumbnail Hover Effects With CSS
This technique produces 3D thumbnail hover effects with CSS 3D transforms. The code is quite verbose and probably could be optimized, but the effect is quite neat.

3D Thumbnail Hover Effects With CSS

Slide In Image Boxes
A technique for creating a “slide in” effect for boxes on hover to make them a bit more interactive.

Slide In Image Boxes

CSS3 bitmap graphics
The bitmap graphics is rendered with CSS: no images, no canvas, no data URIs and no extra markup. The pixels are drawn with CSS gradients, sized precisely to the pixel’s boundaries.

Pure CSS3 Bitmap Graphics

Paperfold CSS
A visual folding effect for hidden comments by Felix Niklas. The plugin takes a DOM element, slices it into parts and arranges them like a folded paper in 3-D space.

Paperfold CSS

Beercamp: An Experiment With CSS 3D
A CSS 3D popup book á la Dr. Seuss. The website was a test to see how far SVG and CSS 3D transforms could be pushed. This is the article about it.

Beercamp: An Experiment With CSS 3D

Covers: A JS / CSS Experiment
Now, that’s quite an experiment: what if we combined a music song, stylesheet and beat detector to create animated… covers? Sure, we can do it with CSS3 and JavaScript! Covers does exactly that. The result is interesting, what can you do with this approach?

Covers: A JS / CSS Experiment

Animation on Apple’s page
John B. Hall explains the CSS animation on Apple’s Web page for the iPhone 4S.

An explanation of the CSS animation on Apple’s iPhone 4S webpage — John B. Hall

Experimental animations for image transitions
A post about experimental 3-D image transitions that use CSS3 animations and jQuery. Only CSS3 transforms are used.

Experimental CSS3 Animations for Image Transitions

Maintaining CSS style states using “infinite” transition delays
This demo allows you to move the character around with the D-pad, and notice how it always keeps its position after you stop moving. This demo doesn’t use any JavaScript. The effect is made possible by using a virtually infinite transition delay, so that the CSS rules never return to their default state. The figure will be stuck in a transition and will move only when you hold down a button.

Maintaining CSS Style States using “Infinite” Transition Delays

CSS 3-D clouds
An experiment in creating 3-D-like clouds with CSS3 transforms and a bit of JavaScript.

CSS3D Clouds

Animated popover of profile box
A technique for an animated profile popover menu, built using CSS transitions.

Animated Profile Popover With CSS

CSS3 scrolling effects
A library of various scrolling effects, such as curl, wave, flip, fly, skew and helix, created with CSS3 and sometimes with JavaScript to spice up the scrolling behavior.

CSS3 Scroll Effects

Spin those icons with CSS3
A simple technique for creating a neat effect that spins social icons with the help of a transform and transition when you hover over them. By Tom Kenny.

Scrolling the Z Axis with CSS 3D Transforms
This article explains how to create the z-scroll effect step by step.

Useful and Practical CSS Techniques

CSS3 Family Tree
Display organizational data or a family tree using just CSS, without Flash or JavaScript. The markup is very simple and uses just nested lists. Pseudo-elements are used to draw the connectors. It also has hover effects: hover over a parent element and the entire lineage will be stylized. Make sure to check Nicolas Gallagher’s Introduction to CSS Pseudo Element Hacks.

CSS3 Family Tree

iOS-style popover
A simple technique for iOS-style custom checkboxes and a subtle hover effect. The technique is a bit buggy but a good starting point in case you need it. Also, check an excerpt from Lea Verou’s talk on customized checkboxes and her article on rule filtering based on specific selector(s) support.

iOS-style Popover

Timeline-Style Comments
Nicolas Gallagher developed a simple and clean technique to present comments in a timeline-alike overview.

Timeline-Style Comments

CSS Table Grid
Here is a nice technique for aligning columns in a table, building a “table grid system” of sorts. The idea is to apply classes to col elements in a table’s colgroup; you always leave one col without a class so that it remains fluid and can “soak up” the effects of any breakages elsewhere in the table.

CSS Table Grid

Confirmation Feedback Buttons
This article explains how to create buttons that take on different states depending on the user’s interaction. This type of interaction is especially useful on links such as “Purchase” and “Delete” for which it’s wise to confirm that the user indeed wants to take the specific action. It looks too much like an iTunes button, though.

A calendar in CSS3 and jQuery
A step by step tutorial on how to create a CSS3 calendar with some jQuery animation. Also, check out David Bushell’s responsive calendar demo.

A clean calendar in CSS3 & jQuery : Finishing Touch

Outdenting properties for debug CSS
Let’s assume you are experimenting with CSS or debugging code. You add properties to figure out how things fit together. How often do you forget to remove all of them? A simple technique for this is to mark a CSS property as a temporary or debugging property by outdenting it and putting it at column 0 in the file. A small trick that can save a lot of time.

Outdenting properties for debug CSS

Show Markup in CSS Comments
Chris Coyier discusses the idea of including the basic markup that you will be styling as a comment at the top of your CSS file.

Show Markup in CSS Comments

Selectively displaying data
This technique shows how to selectively display content in a table and add responsive breakpoints to create an responsive, complex multi-column table.

Remove Margins for First/Last Elements
If you ever wanted to remove the top or left margin from the first element in a container, or the right or bottom margin from the last element in a container, you can do this by using pseudo-selectors :first-child and :last-child.

CSS Diagnostics Stylesheet
A very useful snippet to have nearby when you are debugging your CSS or want to find mistakes in HTML.

CSS Diagnostics Stylesheet

Radio Buttons With Two-Way Exclusivity
Learn about the :empty pseudo-class selector and jQuery to ensure that when a radio button is clicked, the area is determined and all other radio buttons in that column are turned off, and then is turned back on when clicked on.

Radio Buttons with 2-Way Exclusivity

Tabbed Navigation With CSS
An elegant tabbed navigation menu with drop-down menus — no JavaScript, of course. Nothing new, but it’s a quite clean solution.

Tabbed Navigation With CSS

Menu With Notification Badges With CSS
A ready-to-use snippet for a navigation menu with notification badges.

Menu with Notification Badges With CSS

Styling based on sibling count (slides)
A fantastic overview of the possibilities for styling based on sibling count. Also, make sure to click through the rest of the slide deck — valuable and useful techniques. Make sure to watch Lea Verou’s presentation as well.

Styling based on sibling count (Slides)

Stuff you can do with the “Checkbox Hack”
Wiht the “checkbox hack,” you use a connected label and checkbox input and usually some other element that you are trying to control. Learn what you can do with it.

CSS3 Facebook Buttons
Nicolas Gallagher presents a set of CSS buttons for Facebook with different colors and icons. You might want to check Nicolas’ CSS3 Social Sign-In buttons as well as Free Social CSS3 Buttons that we released earlier as well.

YouTube Popup Buttons
This article explores the default state of YouTube buttons, which have a very subtle bevel but pop up on :hover and :focus states, eager to be clicked.

YouTube Popup Buttons

Centering in the Unknown
When it comes to centering things in Web design, the more information you have about the element being centered and its parent element, the easier it is. Chris Coyier shows how to do it when you do not know anything.

Centering in the Unknown

Uncle Dave’s Ol’ Padded Box
What if you combined background-size: cover and Thierry Koblentz’ intrinsic ratios. The result is images and video than maintain their aspect ratio; but you can also use background-size: cover to change the aspect ratio and auto-cropping of images with just a little CSS. And the great news is that the property is supported in all modern browsers and matches media-query support exactly.

Micro Clearfix: Force Element To Self-Clear its Children
Chris Coyier presents various technique for forcing elements to self-clear its children, including Nicolas Gallagher’s short code snippet from 2011.

Micro Clearfix: Force Element To Self-Clear its Children

Conditional CSS
A clever technique by Jeremy Keith to load additional content conditionally. The idea is that once a media query fires, the content on the body element is generated and can be detected by a JavaScript, prompting extra content to be loaded.

* { box-sizing: border-box } FTW
Once you start mixing and matching various units in CSS — such as % for the container width, em for padding and px for border — then you run right into the box-model problem because the width of the container doesn’t include padding and border. We can easily solve this using box-sizing: border-box. And the best part: it is even supported in IE 8.

Multiple Attribute Values
How to treat multiple values in attributes rather than classes.

Multiple Attribute Values

Diagonal CSS Sprites
If you build a sprite on a diagonal, there will be no components below or to the right of the component you are showing. This allows you to make the element using the sprite as wide or as tall as it needs to be, without worrying about exposing the next component. Also, check out David Storey’s article on CSS sprites for the moder era.

Double Click in CSS
Is there a way to detect whether a link is tapped or double-clicked on mobile devices? In fact, we can. However, the code requires some hardcore CSS nerdery. Also, check Pure CSS Clickable Events Without :target by Ryan Collins.

Replacing the -9999px hack (new image replacement)
In the beginning was FIR (Fahrner image replacement). Scott Kellum, design director at Treesaver, has now developed this refactored code for hiding text.

Replacing the -9999px hack (new image replacement)

Fighting the Space Between Inline Block Elements
A series of inline-block elements formatted like you would normally format HTML will have spaces between them. But we often want the elements to butt up against each other, thus avoiding in the case of navigation) those awkward little unclickable gaps. How do you solve it? Chris Coyier has found a couple of solutions.

CSS pointer-events and a pure CSS3 animating tooltip
The pointer-events property allows you to specifiy how the mouse interacts with the element it is touching. See what you can do with it and what to consider when using them.

Anatomy of a mobile-first responsive Web design
An excellent article by Brad Frost about the different considerations for responsive designs. How do you start? What features would you implement and how? What about advanced optimization such as LocalStorage or AppCache? This article provide an excellent guide for getting started with future-friendly responsive designs.

SouthStreet Progressive Enhancement Workflow
A fantastic article by Scott Jehl and Filament Group in which they present a set of tools that form the core of an advanced responsive design workflow. Definitely useful to keep in mind for your next responsive design project.

Typography And Text With CSS

Advanced CSS techniques provide us with remarkable options to style text in very different ways. Not only can we make the typography look sharper and beautiful on the Web with tools such as Lettering.js, Kerning.js and FitText; we can also play with glyphs, line breaks, font sizing, truncating text and styling lists. The typography can be adjusted and improved with just a couple of practical approaches.

Interactive Typography effects with HTML5
This techniques uses canvas and JavaScript to create ab interactive typography effect. Users can interact with the glyphs and as designer you can define forms or shapes of the word you’d like to present and how you’d like them to change on hover. Fancy!

Interactive Typography Effects with HTML5

Rocking letters with CSS3 and jQuery
A simple animation of letters with CSS3 and jQuery.

With Rocking Letters into the New Year

CSS 3D Typography
What about integrating stripes into glyphs and adjust the shadow on hover? This technique uses just that, creating a nice, subtle yet engaging visual effect. You can find more interesting type experiments in CSS3type Showcase.

cssandtype.com, gallery of css text effects

cssandtype.com, gallery of css text effects

CSS3 animation and masking text
Chandler Van De Water had a challenge for Trent Walton after seeing the header animation in his “CSS3 in Transition” post. Noticing that he used a PNG image file with knockout transparency, he wanted to do the same CSS animation with selectable text. Trent was happy to oblige! At the moment, this works only in Safari and Chrome.

CSS3 Animations and Masking Text

CSS mask-image and text
Trent Walton uses background-clip: text and mask-image to implement a subtle gray-flecked texture effect over white text. Hover over the box to see how it degrades in unsupported browsers. Make sure to check out Lea Verou’s “Text Masking: The Standards Way” as well.

CSS Mask-Image & Text

Fake bolding of Web fonts
Most browsers simulate bold weights for fonts that do not actually have bold weights. For example, Helvetica Neue Light does not have a bold weight. If you used font-weight: bold with it, browsers would artificially create a bold weight. This article explains how to avoid fake bolding of Web fonts in your designs. By Divya Manian.

Fake Bolding of Web Fonts

Tomorrow’s Web type today: Say it With a Swash
The excellent series “Tomorrow’s Web type today” by Elliot Jay Stocks provides insights into what will be possible with Web typography soon, e.g. swashes. In fact, you can already use them today if you include a swash subset of a font to achieve the desired effect.

OpenType Swashes

Internationalization Language CSS
A very handy CSS nippet with language-specific quotes. Perfect for international, multilingual projects.

Internationalization Language CSS

Experiments with background-clip: text
With the CSS property background-clip: text, we can add a background image to a text element.

Experiments with background-clip: text

A Call for ::nth-everything
With CSS3, we have positional pseudo-class selectors to help us select a particular element when it has no distinguishing characteristics other than where it is in the DOM in relation to its siblings.

A Call for ::nth-everything

Smooth font using the text-shadow property
A common problem: is there a way smooth the appearance of glyphs on older machines, especially Windows XP (standard / ClearType rendering mode)? Yes, perhaps. You can give a try the text-shadow-property which adds text-shadow on the top-left and the bottom-right to smooth text.


Smooth font using CSS3 text-shadow property

Fluid Type
Trent Walton explains his approach to fluid typography in which he asks himself how we can make sure that browser width and typographic settings such as measure or font-size and how should we handle panoramic viewports? An interesting article, especially if you use a typography-out approach in your designs.

Fluid Type

Pragmatic, practical font sizing in CSS
Harry Roberts shares his thoughts on how to size fonts more efficiently, writing your CSS differently in the process.

Automatic line breaks with CSS3 hyphens and word-wrap
Roger Johansson shows how to solve a common problem: as columns of text become narrower, the risk of a single word being longer than the column’s width increases. When that happens, the text normally extends beyond the column. Luckily, CSS offers two properties to improve the situation: word-wrap and hyphens.

Molten leading (or fluid line height)
When a responsive composition meets a viewport, there are different ways to fill space. Adjusting any one element without also adjusting the others is a recipe for uncomfortable reading, which is one reason why designers have such a difficult time with fluid Web layouts. Tim Brown started a discussion about this issue and provides a couple of techniques for opimization.

Molten leading (or, fluid line-height)

Prevent Long URL’s From Breaking Out of Container
Another snippet by Chris Coyier for keeping long URLs within the container. word-wrap, word-break and hyphens properties in use. Also, learn how to Prevent Superscripts and Subscripts from Affecting Line-Height.

Viewport-sized typography
This technique uses new CSS values for sizing elements relative to the viewport’s current size: vw, vh and vmin. This allows you to couple the size of, say, a typographic heading to the available screen space. Browser support is quite poor for now, so if you are looking for an alternative, check out FitText.js.

Viewport Sized Typography

Minimum paragraph widths in fluid layouts
This article shows how to solve the problem of paragraphs that are too narrow, by implementing a minimum paragraph width. If the space left a the floating image is less than this width, then the whole paragraph moves below the image.

Styling ordered list numbers
Roger Johansson shows how we can style ordered list numbers with the :before pseudo element, which can take a counter as a value through the content property. Also check out Chris Coyier’s post and Louis Lazaris’ CSS Counters: counter-increment and friends.

Styling ordered list numbers

Reverse ordered lists in HTML5
The reverse attribute allows you to write a descending list of numbered items. Louis Lazaris summarizes what it does and offers a solution to get around a lack of browser support for this attribute.

Reverse Ordered Lists in HTML5

Preserving white space with CSS3 tab size
By default, HTML pages ignore anything more than a single space and collapses them. But there are occasions when you’ll want to preserve this space via one of several possible techniques.

Truncating text using only CSS
This code snippet can be used to shorten a line of text using nothing but CSS.

New CSS3 properties to handle text and word wrapping
Louis Lazaris explains the possibilities and problems of text-wrap, overflow-wrap, line-break and word-break, text-overflow and hyphens. Also worth reading: Kenneth Auchenberg discusses the options for word wrapping and hyphenation in combination with dynamic width elements.

End Articles with Ivy Leaf
A clever technique for adding an extra touch to the end of your articles. :last-child, :after and content in use.

We are used to classical navigation patterns such as tabbed navigation or drop-downs, but we can do a lot more to spice up our navigation menus with pleasant hover effects, often without extra images. Especially if you’d like to add a bit more polish to your portfolio, gallery or e-commerce website, these techniques can be quite useful. What about “over-the top” hover effect for your links,

Circle Navigation Effect With CSS3
A bubble-like thumbnail preview for your navigation with CSS3.

Circle Navigation Effect with CSS3

Create a CSS3 Image Gallery With a 3D Lightbox Animation
Tom Kenny has extended a CSS lightbox gallery by adding a few hover effects to the gallery grid itself and a 3D rotation to the lightbox content, all with CSS.

Create a CSS3 Image Gallery with a 3D Lightbox Animation – Inspect Element

3D Gallery With CSS3 and jQuery
This article shares an experimental gallery that uses CSS 3D transforms. The idea is to create a circular gallery with an image in the center and two on the sides. Because perspective is being used, the two lateral images will appear three dimensional when rotated.

3D Gallery with CSS3 and jQuery

Creative CSS3 animation menus
Mary Lou presents a couple of creative navigation menu hover effects. The idea is to have a simple composition of elements, an icon, a main title and a secondary title that will be animated on hover using only CSS transitions and animations.

Creative CSS3 Animation Menus

How to spice up your menu with CSS3
Yes, another technique by Tympanus: this tip shows how to spice up a menu by adding a neat hover effect to it. The idea is to slide an image out to the right when the menu item is hovered over.

How to spice up your menu with CSS3

Create a zoomable user interface
David DeSandro reveals how to use CSS transforms to create a zoomable user interface similar to that of Beercamp 2011. In this tutorial, you’ll also learn how to use JavaScript to hijack scrolling to manipulate the zoom.

Create a zoomable user interface with CSS3

Flipboard Navigation
An experimental page layout inspired by Flipboard’s interface.

Flipboard Page Layout

Multi-direction hover
This element shows different hover effects when hovering from different directions.

Multi-direction hover

Experimental Hover Effects
Original and innovative hover effects discovered via Twitter on what appears to be a Japanese code sharing website.

Share JavaScript, HTML5 and CSS

Over-the-top hover effect
A CSS and JavaScript technique for creating an “over-the-top” hover effect using the transform-origin transform-style properties as well as 3-D transforms.

Accordion With CSS3
Mary Lou experiments with the adjacent and general sibling combinator and the :checked pseudo-class. Using hidden inputs and labels, she creates an accordion that animates the content areas on opening and closing.

Accordion with CSS3

Expanding Text Areas Made Elegant
An expanding text area is a good choice when you don’t know how much text the user will write and you want to keep the layout compact. In this article, Neil Jenkins explains how to do this simply. Also, you might want to take a look at Textarea Auto Resize, another technique by Louis Lazaris, using a hidden clone element.

Filter Functionality With CSS3
Using the general sibling combinator and the :checked pseudo-class, we can toggle states of other elements by checking a box or radio button. This tutorial explores those CSS3 properties by creating a experimental portfolio filter that toggles the states of items of a specific type.

Filter Functionality with CSS3

An accessible, keyboard-friendly custom select menu
A new approach for more accessibility by Roger Johansson. He styles only the select element.

Visual Techniques with CSS

We used to heavily on images and visual elements to create basic visual effects on the Web. With CSS3, we can not only improved the loading speed of the content, but also make our visual elements more flexible and adaptive. Let’s take a look on a couple of examples of how we can achieve that.

Create the Illusion of Stacked Elements with CSS3 Pseudo-Elements
Tom Kenny shows how to create a simple “stacked” look to a group of images.

Create the Illusion of Stacked Elements with CSS3 Pseudo-Elements – Inspect Element

CSS3 Unfold Map with Pins
A handy snippet for placing pins on a map. The code looks a bit verbose, so you might want to remove a couple of visual “nice-to-have” elements.

CSS3 Unfold Map with Pins

Turn Images Into Postage Stamps With CSS3 border-image
Dudley Storey shows a simple way to create a postage stamp from a simple image with border-image.

Turn Images Into Postage Stamps With CSS3 border-image

Slopy elements with CSS3
Angled shapes and diagonal lines can create an interesting visual flow and add some unexpected excitement. This tutorial shows some simple examples and ways how to create slopy, skewed elements with only CSS.

Slopy Elements with CSS3

CSS Flip Clock
A code snippet for displaying a flip clock-alike time display using CSS.

CSS Flip Clock

CSS3 Image Styles
When applying a CSS3 inset box-shadow or border-radius directly to an image element, the browser won’t render the CSS style perfectly. Here’s a quick tutorial on how to use jQuery to make perfect rounded corner images dynamically. And check out the second part.

CSS3 Image Styles – Part 2

Creating Reusable and Versatile Background Patterns
A simple tutorial on how to create reusable background patterns with Photoshop and CSS.

Creating Reusable & Versatile Background Patterns

Diagonal Graph Paper Gradient
A very nice CSS technique for creating diagonal graph paper gradients using repeating-linear-gradient property in CSS.

Diagonal Graph Paper Gradient

Tucked Corner Effect
A clean CSS technique for producing tucked corners using the pseudo-elements :after and :before as well as data URI-coded images. Also, check out Corner Ribbon Effect with CSS.

CSS Tucked Corner Effect

Scrolling… shadows!
An original technique by Roman Komarov to create CSS-only shadow-scrolling effect using background-attachment: local. Developed by Lea Verou, inspired by Roman Komarov.

Scrolling shadows

Multi-colored CSS progress bars
A quite verbose yet CSS-only solution for displaying multi-colored progress bars. It’s linear-gradient in action! Also, check out CSS3 progress bars that display data inside localized leaderboards for the new analytics platform at G5. They are lightweight and require no JavaScript or images.

Multi-colored CSS Progress Bars

CSS3 breadcrumbs
Learn how to create your own cool CSS3 breadcrumbs. Also, check the CSS Breadcrumbs Example which uses only CSS linear gradients.

CSS3 breadcrumbs

Adobe-like Arrow Headers
A detailed article about the technique Adobe uses to create header bars for modules on its website.

Adobe-like Arrow Headers

Adding a Top Shadow to a website
If you ever wanted to add a shadow along the top edge of the website, you can easily do it by styling body:before.

Adding a Top Shadow to a website

A flexible shadow with background-size
It’s amazing what you can achieve when you combine different techniques—even when facing a challenge such as a flexible shadow. If you had to create an adaptive shadow effect, how would you create it?

Star Ratings With Very Little CSS
Chris Coyier shows how to code star ratings done with very little CSS code and lots of a bit of Unicode madness.

Convert Images to Black And White With CSS
Filters allow us to visually process an image in the browser without needing to go through PhotoShop or use cycle-intensive, script-heavy methods in JavaScript or PHP. CSS3 filters are broadly supported in the most recent versions of Firefox and Chrome, and we can gain support in older versions and alternative browsers — even IE — by using a combination of techniques.

Punching Holes With CSS
A clever and simple technique to make a block in a container appear transparent and display a background image. Also, take a look at Lea Verou’s accessible star rating widget with CSS.

Simple Styles for Horizontal Rules
With the help of a few contributors, Chris Coyier put together this page of simple styles for horizontal rules.

Simple Styles for Horizontal Rules

Optimizing Graphics With CSS Masks
In this video, Aaron Bushnell shows how CSS masks can help make the process easier on you and how to make sure you have fallbacks in place for non-Webkit browsers.

Browser-Specific CSS Hacks
A useful, comprehensive list of browser-specific CSS hacks for targeting legacy browsers. Unfortunately, most of us will need them quite often.

Last Click

CSS3 Lasers!
Shows a laser shot effect when hovering over an element.

CSS3 Lasers!

The DOM Tree
This DOM tree is generated via JavaScript every time you visit the page, so you’ll never see the same one twice. All of the forms are filled with holiday greetings in a variety of languages. CSS3 3D transforms are used to position and rotate, via translate3d() and rotate3d() respectively, the elements when the page loads. The infinitely looping rotation on the tree is controlled by an infinitely looping CSS3 animation. Just one word: crazy!

DOM Tree

What’s Your Favourite Technique?

We’d love to know your experience with some of the featured techniques, or perhaps you’ve stumbled upon another interesting CSS technique recently? Let us know in the comments to this post!

(jvg) (al) (vf) (ml)


© Smashing Editorial for Smashing Magazine, 2012.

B2B – 4 Important SEO Tips

without comments

If your business provides services to other businesses–perhaps you offer rapid prototyping or human resources services–then the way you market your company will be different from business to consumer (B2C) companies.

These differences even extend to your search engine optimization (SEO) strategy, taking basic SEO strategies and refining them to better suit your needs. To get to that point, though, you have to have a firm grasp of the basics. Following that, you must clearly define your goals. If you don’t know where you’re trying to go, you’ll never get there.

Most SEO campaigns are aimed at increasing visibility to individual consumers and are created accordingly, but if your clients are businesses you’ll have to adjust those tactics to suit them.

Learn the Basics

There are a few practices that make up the foundation for any SEO campaign, namely your website’s structure and navigation, keyword choice, context, content and the number of outbound links on each page.

  • The URL for each web page should be simple and human-readable – not a computer-generated text string. This makes it easier for people to read it and gives search engines more information to help categorize each page and its contents. 
  • Having clear, simple navigation menus that offer easy access to the most important pages tells search engines that your website is well-built and that you’ve taken the time to provide a good user experience.
  • Choosing keywords that match your goals and your audience is the most important aspect of any SEO campaign. Being able to attain spot 1 for “apple pie” is a marvelous achievement, but if your business has nothing to do with pastries that time was wasted. 
  • Keep outbound links to a minimum. If you have too many links your site will hemorrhage link juice or–worse–will be viewed as spammy by Google, earning you a sizeable downrank.

Define Your Goals

Your SEO path will be largely defined by the results you want to see.

  1. Evaluate who your audience is, 
  2. what service you’re trying to sell and 
  3. what you want searchers to do when they find your site. 
  4. Do you want them to sign up for email updates on your products or would you rather they fill out a form so you can contact them about your services? 
  5. Are you trying to provide as much information to them as possible or are you directing them down a conversion funnel as quickly as possible? Before you can figure out what you want to do, you need to figure out where you want to be.

Target Businesses

B2B SEO has some marked differences from B2C SEO.

  • Keyword choice has to cover a broad range for businesses, because most business buying choices aren’t decided by individuals and are based on extensive research. By selecting keywords to bring searchers in at each point in the purchasing process, from early research to in-depth research, all the way through to the final purchase, you increase your chances of profitable conversions.
  • Content production for B2B has to be tied very closely to your industry, increasing your perception as a thought leader in your field and increasing the relevance in the eyes of search engines. 

Your content should answer questions that businesses have before they even ask, giving you the ability to create a relationship with potential clients by giving them reason to respect you and your work.

By targeting your SEO campaign specifically towards your desired clients, you can increase not only your rankings but also the likelihood that you’ll see more profitable conversions down the line.

Today in a guest post from the wonderful Joseph Baker, Joe works at Professional Intern

 

B2B – 4 Important SEO Tips

without comments

If your business provides services to other businesses–perhaps you offer rapid prototyping or human resources services–then the way you market your company will be different from business to consumer (B2C) companies.

These differences even extend to your search engine optimization (SEO) strategy, taking basic SEO strategies and refining them to better suit your needs. To get to that point, though, you have to have a firm grasp of the basics. Following that, you must clearly define your goals. If you don’t know where you’re trying to go, you’ll never get there.

Most SEO campaigns are aimed at increasing visibility to individual consumers and are created accordingly, but if your clients are businesses you’ll have to adjust those tactics to suit them.

Learn the Basics

There are a few practices that make up the foundation for any SEO campaign, namely your website’s structure and navigation, keyword choice, context, content and the number of outbound links on each page.

  • The URL for each web page should be simple and human-readable – not a computer-generated text string. This makes it easier for people to read it and gives search engines more information to help categorize each page and its contents. 
  • Having clear, simple navigation menus that offer easy access to the most important pages tells search engines that your website is well-built and that you’ve taken the time to provide a good user experience.
  • Choosing keywords that match your goals and your audience is the most important aspect of any SEO campaign. Being able to attain spot 1 for “apple pie” is a marvelous achievement, but if your business has nothing to do with pastries that time was wasted. 
  • Keep outbound links to a minimum. If you have too many links your site will hemorrhage link juice or–worse–will be viewed as spammy by Google, earning you a sizeable downrank.

Define Your Goals

Your SEO path will be largely defined by the results you want to see.

  1. Evaluate who your audience is, 
  2. what service you’re trying to sell and 
  3. what you want searchers to do when they find your site. 
  4. Do you want them to sign up for email updates on your products or would you rather they fill out a form so you can contact them about your services? 
  5. Are you trying to provide as much information to them as possible or are you directing them down a conversion funnel as quickly as possible? Before you can figure out what you want to do, you need to figure out where you want to be.

Target Businesses

B2B SEO has some marked differences from B2C SEO.

  • Keyword choice has to cover a broad range for businesses, because most business buying choices aren’t decided by individuals and are based on extensive research. By selecting keywords to bring searchers in at each point in the purchasing process, from early research to in-depth research, all the way through to the final purchase, you increase your chances of profitable conversions.
  • Content production for B2B has to be tied very closely to your industry, increasing your perception as a thought leader in your field and increasing the relevance in the eyes of search engines. 

Your content should answer questions that businesses have before they even ask, giving you the ability to create a relationship with potential clients by giving them reason to respect you and your work.

By targeting your SEO campaign specifically towards your desired clients, you can increase not only your rankings but also the likelihood that you’ll see more profitable conversions down the line.

Today in a guest post from the wonderful Joseph Baker, Joe works at Professional Intern

 

Making Your Digital Marketing More Accessible

without comments

There are two million people in the U.S. who are blind or visually impaired. That number is sure to grow in coming years as Baby Boomers, and their eyes, age. That’s a lot of people. Ever wondered how they “see” your website? What about how they navigate and use social media channels? Unless you are visually impaired, you’ve probably not thought about it.

Last week I spent a half day with several staff members at the American Printing House for the Blind talking about how the visually impaired use social media, websites and technology in general. The sad truth is that as cool as our blogs and websites look to us, many people can not only not see them, they often can’t decipher what’s there because we forget, or don’t know how, to build our sites with accessibility in mind.

In general, good SEO practices are also good accessibility practices. Strong header tags actually serve as sub-navigation menus for screen readers (Audio devices used by many visually impaired. See video below.) This allows users to skip past lots of top level site navigation and get down the page to meat of the content.

ALT tags on images and TITLE tags on links help screen readers tell the user what the image or link is. Without them, the audio reader just tells the person that an image is a “graphic” or it reads the file name. If the file is named as most images (e.g. – IMG4576890.jpg) that’s a whole lot of useless for the user. For links, a missing title tag means the reader will announce the entire URL which is often not helpful at all, either.

But think about that for a minute. If you’re stuffing keywords into your TITLE and ALT tags and either awkwardly or not accurately describing the image or link at hand, you’re doing the visually impaired reader a disservice. If you’re also top heavy with navigation on your site — lots of sub-menus and the like — you’re forcing blind users to sit through audio announcements of each menu item before they get to the meat of the page.

And then just think about the process of having to take each element on a given web page — division, table, image, link, menu item, sub-menu item and more — and listen to a reader enumerate what each is, in order from top left to bottom right, so you can imagine what’s on a page. You can likely glance at this page on Social Media Explorer and jump right to the headline or the first line of copy in the blog post. A visually impaired person has to wait until their reader tells them about all the header and navigation information first. This user experience adds exponentially more time to consume each page for the user.

Mike McCarty, social media manager at APH, told me the tendency to pile lots of navigation at the top or even upper left side of a given web page is not just an accessibility issue, but also a usability one. Sites with lots of top level navigation, as pretty as it may appear, are sites that frustrate the visually impaired.

And keep in mind that we’re not just talking about the blind consumer. We’re also talking about individuals with aging eyes that need fonts enlarged and the like. Using fixed variable fonts in your styling of a page makes it often impossible for many to read your content. And some users need to enlarge a font 4-6 times its normal size in order to see it. Designing a site with this in mind will help you make one beautiful for those who can and perhaps cannot see.

To give you an example of what it’s like to “see” the web the way someone visually impaired does, I looked over McCarty’s shoulder as he gave us a little tour of how to navigate the web without sight.

By the way, YouTube videos, SlideShare embeds and the like … there are buttons within their players that could be accessible if they appropriately labeled the buttons. Visually impaired folks wishing to watch that video had to navigate around “Label Zero” “Label One” “Label Two” instead of “Play/Stop” “Fast Forward” or “Rewind.” How about you video and player sites get with the program, too?

McCarty and his colleagues reported that Twitter and Google sites are generally okay to navigate. As he indicated in the video, Qwitter is a third-party Twitter application with a screen reader-friendly version. It runs in the background of one’s computer and announces when you have new tweets to read, etc. But LinkedIn and Facebook are a nightmare for the visually impaired. With lots of links and images embedded in news streams there, many of which don’t have proper ALT or TITLE tags, you may as well give up and go on to another site.

Justin Romack, a content marketing consultant who also happens to be visually impaired, assured me that social media sites aren’t all frustrations for those visually challenged. Romack wasn’t always visually impaired. In 2008 he lost 95 percent of his vision and fell into depression. The blind and visually impaired communities on Facebook and Twitter were the people who helped him not just learn how to function in a less visible world, but helped him through it emotionally as well.

Romack also told me the iPhone is surprisingly accessible and he’s been delighted with several conversations with Foursquare about making their product more accessible to the visually impaired. He even reported that an engineer at Foursquare sent him some instructions on how to make maps accessible through touch screen products like the iPhone.

Dave Brodbeck, a psychology professor at Algoma University in Ontario who also has limited vision, wasn’t as thrilled with the accessibility of his phone. Perhaps he and Romack should talk? As someone who says he doesn’t use screen readers because he was never given access to them growing up so he learned to cope and deal, Brodbeck says his biggest frustrations are with page layout and styling.

“For me, the biggest challenge is font size and menu options,” he told me. “I zoom in on my screen, which is one of the many reasons I have a Mac. It is dead easy to do. But, when zoomed in, menus tend to be messed up, or be off the screen. I am not sure there is a solution for this.”

He, along with several other visually impaired I talked to, said the one thing that universally pisses users like them off is Captcha’s. I assured him they piss the visual off as well. It doesn’t matter how well you see detail, you never know if it’s an A, D, P or R. Heh.

McCarty told me most visually impaired folks will go to the mobile version of a site, if one is available, because you can at least access the main content there without images and other problematic page features. But that’s only half a solution since the mobile versions of many sites are limited in features and functionality. Facebook and LinkedIn are two culprits there – poorly accessible main site experiences with limited functionality in the mobile-optimized platform.

Watching McCarty was fascinating for me, as I’m sure it was for you. The sighted certainly take that gift for granted. We in the digital marketing and social media space probably moreso than others. I left APH thankful for my sight, but woeful for our sites. We can do better. How about we start today?

Note: Follow the American Printing House for the Blind on Twitter or subscribe to their Fred’s Head Blog, named after Fred Gissoni, a legendary employee of APH who is that guy there (and we all have them in our companies) that seems to know everything. The inspiration results in a pretty useful blog that serves a great purpose and audience. The screen reader McCarty referred to, JAWS, is available online at FreedomScientific.com.



Freebie: Responsive jQuery Slider Plugin Flexslider

without comments



Advertisement in Freebie: Responsive jQuery Slider Plugin Flexslider
 in Freebie: Responsive jQuery Slider Plugin Flexslider  in Freebie: Responsive jQuery Slider Plugin Flexslider  in Freebie: Responsive jQuery Slider Plugin Flexslider

When it comes to responsive design, it’s not just about fluid images or adaptive layouts. It’s also about the responsive methodology behind the entire design process. In responsive design, we are creating responsive experiences, meaning that all design components need to be able to adapt to the environment in which they are displayed and have to interact with. This is why we create tables, navigation menus, videos and other design elements responsive as well (see Responsive Web Design Techniques and Design Strategies for more details). It just makes sense to consider each and every design component — including the image slider.

In this post, we are glad to release a responsive jQuery slider plugin Flexslider which has been created, developed and maintained by Tyler Smith and exclusively released for Smashing Magazine and its readers. As usual, the plugin is absolutely free to use in private and commerical projects. The plugin includes fade and slide animations, customizable options as well as all the navigation options you would expect in such a plugin — touch gestures inclusive! It uses simple, semantic markup to create the slider and is lightweight, weighing only 4kb (minified). The plugin has been tested in Safari 4+, Chrome 4+, Firefox 3.6+, Opera 10+, and IE7+. iOS and Android devices are supported as well. In three simple steps, you can have a fully responsive slider for your responsive design.

Flexslider-new in Freebie: Responsive jQuery Slider Plugin Flexslider

Download the Plugin for Free!

The plugin is released under the MIT license. You can use it for all your projects for free and without any restrictions. Please link to this article if you want to spread the word. You may modify the plugin as you wish.

Flexslider1 in Freebie: Responsive jQuery Slider Plugin Flexslider

Features

  • Simple, semantic markup.
  • Supported in Safari 4+, Chrome 4+, Firefox 3.6+, Opera 10+, and IE7+.
  • iOS and Android devices are supported as well.
  • Slide and Fade animations.
  • Highly customizable slider options.
  • Directional, keyboard, and touch swipe navigation.
  • Lightweight (4 Kb minified).
  • You can use all HTML elements in the slides.
  • Free to use under the MIT license.

Flexslider5 in Freebie: Responsive jQuery Slider Plugin Flexslider
You can find the installation guide and documentation on the developer’s release site.

Behind the Design

As always, here are some insights from the designer:

“My motivation behind creating this plugin was the difficulty I had building my first responsive slider. There were no resources to pull from and I spent hours banging my head against the wall working through the logic. My goal was to make it easier for others doing the same thing. I wanted to build a plugin that served the newest of beginners, while providing seasoned developers a tool they could use with confidence.

FlexSlider serves beginners by being virtually plug and play, needing only the FlexSlider files and some images to get started. To seasoned developers, FlexSlider should be seen as a tool that gets them rolling quickly. It doesn’t add unnecessary markup and gives complete freedom to use any HTML element within each slide.

The most exciting thing about FlexSlider at this point, in my mind, is the slide animation. It was a challenge to construct, but the resulting responsive behavior is very cool. When you mix the slide animation with touch gestures, it creates a great experience across iOS and Android devices.

Problems I encountered when building the plugin was ensuring that the plugin would work across all different types of responsive builds, browsers, and devices. To accomplish that, I made sure the plugin did exactly what it needed too, and nothing more. For example, many sliders use fixed dimensions and absolute positioning to create animation effects, but this is not possible with fully fluid responsive design. Avoiding this practice, I limited my use of the $(window).resize() function and let the slider dimensions remain organic to the content within. The downside to this is that the fade animations can’t overlap, which is indeed a nice effect.

The most important lessons I’ve learned are that overusing (window).resize() function to control element sizing will make you cringe, which is why you won’t find much at all in FlexSlider. Keep your responsive design as light as you can. Remember the audiences you are extending to reach are on far less capable devices, especially with JavaScript.

If you are having a problem installing FlexSlider, post a comment in the Community section and I will respond. Follow @mbmufffin for FlexSlider updates!”

Thank you, Tyler. We sincerely appreciate your work and your good intentions.


© Smashing Editorial for Smashing Magazine, 2011.