Vitaly Friedman

About The Author

Vitaly Friedman Vitaly Friedman loves beautiful content and doesn’t like to give in easily. Vitaly is writer, speaker, author and editor-in-chief of Smashing Magazine. He runs responsive Web design workshops, online workshops and loves solving complex UX, front-end and performance problems in large companies. Get in touch.

Powerful CSS-Techniques For Effective Coding

Sometimes being a web-developer is just damn hard. Particularly coding is often responsible for slowing down our workflow, reducing the quality of our work and sleepless nights with pizza and coffee laying around the laptop. Reason: with a number of incompatibility issues and quite creative rendering engines it sometimes takes too much time to find a workaround for some problem without...

Sometimes being a web-developer is just damn hard. Particularly coding is often responsible for slowing down our workflow, reducing the quality of our work and sleepless nights with pizza and coffee laying around the laptop. Reason: with a number of incompatibility issues and quite creative rendering engines it sometimes takes too much time to find a workaround for some problem without addressing browsers with quirky hacks. And that’s where ready-to-use solutions developed by other designers come in handy.

One year ago we’ve published the post with 53 CSS-Techniques You Couldn’t Live Without where we provided references to the most useful CSS-techniques which are often used in almost every project. Over the last year we’ve been observing what’s happening with the CSS-based web-development, and we collected most useful CSS-techniques we’ve stumbled upon — for us and for our readers.

In this post we present 50 new CSS-techniques, ideas and ready-to-use solutions for effective coding. You definitely know some of them, but definitely not all of them. Some technique is missing? Let us know in the comments to this post.

Thanks to all developers who contributed to the CSS-based design over the last year. The community appreciates it.

CSS-Techniques

  1. Triadic Background Setting with CSS
  2. The Silverback web site uses three background images to create the illusion of 3D with simple CSS. No documentation is provided, however the source code is quite intuitive. [via Wilson Miner]

    CSS-Technique

  3. CSS Server-Side Pre-Processor
  4. CSS-Technique

  5. Advanced CSS Menu
  6. CSS-techniques - Advanced CSS Menu

  7. Styling File Inputs with CSS and the DOM
  8. File inputs (<input type=“file” />) are the bane of beautiful form design. No rendering engine provides the granular control over their presentation designers desire. This simple, three-part progressive enhancement provides the markup, CSS, and JavaScript to address the long-standing irritation.

    CSS-Technique

  9. A Savvy Approach to Copyright Messaging
  10. Derek Powazek suggests adding a copyright message to a photo and use CSS to crop its view. This is supposed to accomplish the goal of adding robust copyright information without defacing your own work.

    Screenshot

  11. Advanced CSS Menu Trick
  12. What we want to do here, is instead of simply altering the state of the navigation item the user is currently rolling over, we want to alter the non navigation items as well.

    Screenshot

  13. CSS hover effect
  14. CSS-techniques - CSS hover effect | Veerle's blog

  15. Creating a table with dynamically highlighted columns like Crazy Egg’s pricing table
  16. CSS-techniques - Creating a table with dynamically highlighted columns like Crazy Egg's pricing table

  17. A Stripe of List Style Inspiration
  18. A different type of list and navbar styling. As stripes.

    CSS List Style

  19. Rediscovering the Button Element
  20. CSS-techniques - Particletree » Rediscovering the Button Element

  21. Dynamic CSS With Variables
  22. Geoffrey Grosenbach describes how you can integrate CSS variables in CSS coding — with Ruby on Rails.

    Dynamic CSS

  23. A CSS styled table version 2
  24. CSS-techniques - A CSS styled table version 2 | Veerle's blog

  25. CSS Step Menu
  26. A method of designing the so-called step-menus, which have some steps users have to go through in order to achieve some aim. This menu offers a varying amount of steps, dependent upon the type of user accessing the application.

    Stepmenu

  27. Creating bulletproof graphic link buttons with CSS | 456 Berea Street
  28. CSS-techniques - Creating bulletproof graphic link buttons with CSS | 456 Berea Street

  29. Iconize Textlinks with CSS
  30. Links are fun, but sometimes we don’t know where they take us. With this little CSS technique a user can identify a link by its icon. The updated release of the technique.

    Screenshot

  31. Better Ordered Lists (Using Simple PHP and CSS)
  32. Ordered lists are boring! Sure you can apply background images and do quite a bit of sprucing up to a regular ordered list, but you just don’t get enough control over the number itself.

    Screenshot

  33. Circular Menu with CSS
  34. This article shows how a beautiful circular navigation menu is created. In Spanish with Source code and an example.

    Circular Menu with CSS

  35. CSS Dock Menu
  36. CSS-techniques - CSS Dock Menu

  37. Digg-like navigation bar using CSS
  38. This tutorial explains how to design a digg-like navigation bar using a liquid design with rounded corners for links.

    Screenshot

  39. How to create VISTA style toolbar with CSS
  40. Reproducing Vista toolbar, with buttons and hover effect in cross-browser compatible CSS and (X)HTML.

    Vista CSS Toolbar

  41. Fade Out Bottom
  42. This is a demonstration of the effect where the bottom of the page seems to fade out. The technique makes use of an fixed position div (bottom: 0%) with a transparent PNG image and a high z-index value.

    CSS-techniques - Fade Out Bottom

  43. Scrollovers - A New Way of Linking
  44. Everyone is familiar with hover-effects. This CSS+JavaScript-based techniques creates the Scrolleffect - not really necessary, but it’s nice to know, how it can be done.

    Scrollovers

  45. How to Style an A to Z Index with CSS
  46. CSS-techniques - How to Style an A to Z Index with CSS | Smiley Cat Web Design

  47. CSS List Boxes
  48. Using a simple unordered list this experiment aligns the boxes across the page with the end result being to showcase items like services, products, or specials. One of cool thing about this — if you turn off styles — is the extractable semantics with the headings and paragraphs used.

    List Boxes

  49. How-to create a “Table of Contents” Navigation
  50. In as little as 8 lines of HTML, and 5 lines of CSS, the Table Of Contents Navigation block can be integrated in your site ready for even more styling.

    Table of Contents

  51. CSS Recipe for Success
  52. CSS-techniques - CSS - A Recipe for Success

  53. Partial Opacity
  54. CSS-techniques - Stu Nicholls | CSSplay | Partial Opacity

  55. Simple Round CSS Links (Wii Buttons)
  56. CSS-techniques - Simple Round CSS Links ( Wii Buttons )

  57. Drop Shadow CSS
  58. CSS-techniques - Drop Shadow CSS

  59. CSS Double Lists
  60. CSS-techniques - CSS: Double Lists | Mike’s Experiments | MikeCherim.com

  61. Perspective Text with CSS
  62. CSS-techniques - Mike’s Experiments: Archives Page | A Record of My Madness | Powered by the GreenBeast CMS RSS Newsmaker - -

  63. Better Email Links: Featuring CSS Attribute Selectors
  64. Learn how to generate code for displaying the e-mail automatically once mailto is used. CSS Attribute Selectors in action which is not supported by Internet Explorer 6 and 7.

    Screenshot

  65. CSS: Menu Descriptions
  66. This is a CSS technique that could be useful if you want to give users accessible added content such as tool-tips, notifications, or alerts, without adding unnecessary clutter to your page. And since it doesn’t rely of JavaScript, it should be useful to everyone, even disabled users.

    Screenshot

    Further Techniques

  67. CSS Transparency Settings for All Browsers
  68. CSS-techniques - CSS Transparency Settings for All Browsers

  69. Custom Reading Containers
  70. This amazing little script allows the user to resize any container.

  71. Eric Meyer’s CSS Reset
  72. CSS-techniques - CSS Tools: Reset CSS

  73. PNG Overlay
  74. Create a transparent PNG overlay which can be used as a mask / frame around regular JPEG or GIF so users can upload photos without having to worry about using any graphics program to apply filters, plus it saves time.

  75. Turning Lists into Trees
  76. CSS-techniques - odyniec.net

  77. Create Resizable Images With CSS
  78. CSS-techniques - Create Resizable Images With CSS | Smiley Cat Web Design


More Articles on

Flash-Based Galleries For Your Images

by Sven Lennartz

In many situations web designers should avoid Flash and prefer usual text-based presentation. For instance, in most tasks related to pure text presentation Flash is neither necessary nor user-friendly, and it also has some serious accessibility problems: in fact, "pure" text is easier to maintain and easier to copy and paste. However, if you'd like to present some multimedia-content,...

Read more

50 Designers x 6 Questions

by Sven Lennartz

Some months ago we’ve selected 50 prominent designers and design companies, contacted them and asked to answer five design-related questions, sharing their knowledge and experience with fellows developers. 35 designers have responded then. For each of 5 questions we've received 5 precise answers. The result was 35x5 professional ideas from some of the leading web-developers all around the...

Read more

CSS Specificity: Things You Should Know

by Vitaly Friedman

Apart from Floats, the CSS Specificity is one of the most difficult concepts to grasp in Cascading Stylesheets. The different weight of selectors is usually the reason why your CSS-rules don't apply to some elements, although you think they should have. In order to minimize the time for bug hunting you need to understand, how browsers interpret your code. And to understand that, you need to...

Read more