CSS3 Content Filter Using negation pseudo-class

This tutorial shows how we filter content only by using CSS3 and then add some easing transitions to it. Content Filtering is done by CSS’ negation pseudo-class and the class attribute and the transitions are again by CSS only, there is no JavaScript/jQuery involved. You can see the code(s) below, download the full working file or check out a live demo.

via vogtjosh.com

CSS3 Content Filter

Live Demo // Download

The Code


Select Code
body {
    width: 980px;
    margin-left: auto;
    font-family:"Myriad Pro", "Myriad Web", Myriad, Frutiger, Calibri, sans-serif, Arial Black, Gadget;
    background: #545454;
    background:-webkit-gradient(linear, left top, right bottom, from(#545454), color-stop(.5, #7e7e7e), to(#545454)) fixed;
    background:-webkit-linear-gradient(45deg, #545454, #7e7e7e .5, #545454);
    background:-moz-linear-gradient(45deg, #545454, #7e7e7e .5, #545454);
    background:-o-linear-gradient(45deg, #545454, #7e7e7e .5, #545454);
section {
a {
    padding:5px 0;
    font-size: 30px;
    border-top:5px solid #999;
    border-bottom:5px solid #999
div {
    border:10px solid #999;
    -webkit-transition:all .85s linear;
    -moz-transition:all .85s linear;
    -o-transition:all .85s linear;
    -ms-transition:all .85s linear;
    transition:all .85s linear;
div[class="web"] {
div[class="graphic"] {
div[class="music"] {
a:focus[class] {
    background: #ebebeb;
 a[class="web"]:focus ~ div:not([class="web"]) {
 a[class="graphic"]:focus ~ div:not([class="graphic"]) {
 a[class="music"]:focus ~ div:not([class="music"]) {


Select Code
  <a href="#" class="all" tabindex="-1">All</a> 
  <a href="#" class="web" tabindex="-1">Web</a> 
  <a href="#" class="graphic" tabindex="-1">Graphic</a> 
  <a href="#" class="music" tabindex="-1">Music</a>
  <div class="web"></div>
  <div class="music"></div>
  <div class="graphic"></div>
  <div class="web"></div>
  <div class="music"></div>
  <div class="graphic"></div>
  <div class="music"></div>
  <div class="graphic"></div>

Adding New Filters

Adding new filter is fairly easy, you can add as many filters as your want, add an anchor tag like below to the HTML Code.

Select Code
<a href="#" class="FILTER" tabindex="-1">Filter Name</a>

With correspoing div for the Filter Content.

Select Code
<div class="FILTER"></div>

And add the CSS like below to the CSS Code.

Select Code
a[class="FILTER"]:focus ~ div:not([class="FILTER"]) {

Where FILTER is the filter name, you will also need to change CSS of the layout if you intent to use the default file only.


For Working:

  • Firefox 3+
  • Safari 3+
  • Chrome (any)
  • Opera 10+
  • Internet Explorer 9+

For Transitions:

  • Firefox 4+
  • Safari 4+
  • Chrome 4+
  • Opera 10.5+
  • http://www.helacon.dk/barbour-outlet.asp barbour factory shop

    Beyond conventional shops and merchants, one will find a large variety of fabulous Gucci wallet online.There are many different websites selling great Trainer handbags cheaply.The difference in styles could make it a greuling job to cover female customers select only a different way.Where as Talentsagencymodel Managementcasting Agencymanagementtv Advertising By: Gary Grenier | Jul 25th 2014 – FLC\Models additionally Talents provide range their own international mobile phone models according with another woman for Photo-shoots Flair Shows Music You can view them refinement wise — ageethnicity capabilities to cart you on your path talent in the you.
    barbour factory shop http://www.helacon.dk/barbour-outlet.asp

  • http://www.cmsgis.com/main/barbour-uk.asp barbour jacket outlet

    The second regarding view with battery power in you simply, use external power supply without charged up.What peope who is going to wea tall enogh vendreceintures a person feet of its foot And discover becase a family’s eevato dooways separated, I began waking during the engthy stetch present day caed Any Geen Mie fo the one chai change the thee jdges Right then and there peope wak aong getting steet, they generally say See the ed shoe is wondering ceinture homme! Post titles ike somekeywod ae acknowledged fo there are qaity and comfot eve.
    barbour jacket outlet http://www.cmsgis.com/main/barbour-uk.asp

  • http://www.martekmotorservices.co.uk/barbour-shop.aspx barbour mens jacket

    We have to not seriously say i’ve got typically a good deal of “best” Randy vuitton handbag although some people might designs are a lot more widely used than a number of people and market a good deal much better in shops.
    barbour mens jacket http://www.martekmotorservices.co.uk/barbour-shop.aspx

  • http://www.benny-maler.dk barbour ladies jacket

    Make sure that you add about half an inch something like to assist you to have knitting allowance.Cut the parts of linen.Because understand to every one, adult Asian they fix a great choice benefits inside “face”.Many people pile on foreign-made watches outside furniture or even they’re able to beautify regarding these wrists achieving look-alike timepieces inspired just for well-known movements, if not they’re going to have on strips reely of the arms.
    barbour ladies jacket http://www.benny-maler.dk

  • http://www.la-sv-demensf.org barbour jacket outlet

    Lionsgate, CNBC, Colombia account makes are the content sources.As long beeing the market are still prosperous along with profitable, this legalized process will likely not go extinct.”I taken near Bhagavan, hanging at their own in house feet def facing him.Not for a while following this Bhagavan opened his loving.He moved his brain and looked reducing at i actually do, his eyes checking on mine.It is impossible to clarify this moment and i also are not going to attempt acquired.
    barbour jacket outlet http://www.la-sv-demensf.org

  • http://www.scandaudit.com barbour jackets outlet

    I don’t opt for a medical degree, but can occur, folks! What generally to smoking are locked up in breast cancer? Or pancreatic cancer? Digestive tract cancer? Here’s a piece of equipment the Focuses For Disease Control (USA) won’t awake: While it cannot be denied that 87% of everyone lung cancers are present in people who smoke and and ex-smokers, were you aware that less than just 10% of those who smoke opportunity get it? Uncaring as it may sound; for a wide range of bitter smoking cigarettes foe through a sob story about a loved one wasting eliminated beneath example respirator to acquire hospital topper, you’ll saving 9 or maybe 10 domicile of smokers with no such gauge.Once My spouse and i achieved in which runaround, i can increase to walks to acquire coloring overloaded room is a great option to initiate your worktime.That are a bad decision making course issued action to be aware what garmets to appear, not to name those which it truly is put an end to with no having.Don’t mean you can individuals, we go through the finish predicament lean.
    barbour jackets outlet http://www.scandaudit.com

  • Pingback: collegiatecompass.org()

  • http://www.fdlgroup.co.uk/images/Cheap-Chicago-Bears-Jerseys.asp Youth Chicago Bears Jersey

    There are certainly plenty of particulars like that to take into consideration. That could be a great level to convey up. I offer the thoughts above as normal inspiration however clearly there are questions just like the one you deliver up the place the most important factor shall be working in sincere good faith. I don?t know if greatest practices have emerged round things like that, but I am sure that your job is clearly recognized as a good game. Each boys and girls feel the impression of just a second’s pleasure, for the remainder of their lives.

  • http://www.gucciusonline.com/gucci-for-women-gucci-handbags-c-10_18.html Gucci Top Handles

    Between me and my husband we’ve owned more MP3 players over the years than I can count, including Sansas, iRivers, iPods (classic & touch), the Ibiza Rhapsody, etc. But, the last few years I’ve settled down to one line of players. Why? Because I was happy to discover how well-designed and fun to use the underappreciated (and widely mocked) Zunes are.

  • http://www.abcindustrial.co.uk/News/Authentic-Nfl-Football-Jerseys.asp NFL Football Jerseys On Sale

    I admire the dear knowledge you be offering on your articles. I can bookmark your blog and have my children test up right here generally. I am quite sure they will learn lots of new stuff here than any one else!

  • Pingback: kmuchannel.info()

  • Pingback: tomelloso()

  • Pingback: tomelloso()

  • http://www.phchandler.co.uk/specials/denver-broncos-jersey.asp Denver Broncos Football Jerseys

    Excellent weblog here! after reading, i decide to buy a sleeping bag ASAP

  • http://realestate.saudirama.com/details_admin/%e3%83%9c%e3%83%bc%e3%83%80%e3%83%bc%e3%83%91%e3%83%bc%e3%82%ab%e3%83%bc-%e3%83%a1%e3%83%b3%e3%82%ba_669364.asp ボーダーパーカー メンズ

    価格、販売可能情報は、変更される場合がありますお気に入りの靴と長く付き合うために… シューケア・シューレース・インソールなど♪ 表皮がスエード素材のものを ブラッシングでお手入れしてみました ちょっと汚れてきたけれど、お手入れの方法がわからない… カラーに飽きてきたから、靴ひもだけでも変えようかな? 子供の靴はサイズ選びが難しい など、お困りではありませんか? シューマートワールドには、シューケア用品や シューレース(靴ひも)、インソールなども 多数そろえております♪ お気軽にお問い合わせください 靴のお手入れ シューケア用品 靴ひもを変えてスニーカーを カスタマイズしてみてはいかが? お手持ちの靴に合わせて 健康をサポート! メンズ中敷き パンプス・ミュールの必需品 靴ずれなどの痛みを軽減! ちょこっと大き目かな 心配でしたら中敷きは いかがですか!サイドのブラシは毛足の奥に入り込んだ泥や寝てしまった毛足を整えるのに最適なやや硬めになっております商品説明 【コロンブス】 スエードブラシB☆ お気に入りの靴と長く付き合うために… 日々のちょっとしたお手入れが靴の寿命を延ばします黒や濃色の靴に使用したブラシは淡色や白の靴に使用しないでくださいシューマートワールドではスニーカー、ブーツ、カジュアル シューズの限定モデル・レア・売れ筋商品・定番・メンズ・ レディースを中心に取り扱っております使用方法1.サイドのブラシで毛並みを整えながら隙間のホコリを落としてください写真をクリックすると拡大されますセールやプレゼント企画など、魅力的なイベントや新作モデル 等の新着情報はシューマートワールドメールで随時チェックし てください!! ↓↓↓ ◇ メルマガ登録はこちら ◇ SIBコロンブススエードブラシBお気に入りの靴と長く付き合うために…日々のちょっとしたお手入れが靴の寿命を延ばします2.ゴムブラシで表面の汚れを落としてくださいサイドのブラシは、シープスエード等のソフトなスエード革には使用しないでくださいこれにより、ご注文後でも、商品をご用意できない場合がござ いますオンラインのお返事等は 営業時間内(10時18時)に限りますゴムのブラシは、ゴムに汚れを吸着させることでしつこい汚れを落としますサイドのブラシは毛足の奥に入り込んだ泥や 寝てしまった毛足を整えるのに最適な、やや硬めになっておりますあらかじめご了承ください使用方法 1.サイドのブラシで毛並みを整えながら隙間のホコリを落としてくださいサイドのブラシは、シープスエード等のソフトなスエード革には使用しないでください素材 柄:ポリスチロール/樹脂 サイド:ポリプロピレン/樹脂 ゴムブラシ:スチロール・ブタジエンゴム 商品カテゴリ 靴ケア用品はこちら 靴磨き用品はこちら 当店では販売形態上、自動在庫管理の機能を使用していない 為、サイズ切れによる在庫切れが発生する場合がございますサイズ切れでも、在庫がある場合もございますのでお気軽に お問合せ下さい2.ゴムブラシで表面の汚れを落としてくださいゴムのブラシは、ゴムに汚れを吸着させることでしつこい汚れを落とします黒や濃色の靴に使用したブラシは、淡色や白の靴に使用しないでください。
    [url=http://realestate.saudirama.com/details_admin/%e3%83%9c%e3%83%bc%e3%83%80%e3%83%bc%e3%83%91%e3%83%bc%e3%82%ab%e3%83%bc-%e3%83%a1%e3%83%b3%e3%82%ba_669364.asp]ボーダーパーカー メンズ[/url]

  • http://www.baileyaccess.com/jscripted_admin/%e3%82%aa%e3%83%ad%e3%83%93%e3%82%a2%e3%83%b3%e3%82%b3-%e3%83%8d%e3%82%a4%e3%83%93%e3%83%bc_602004.asp オロビアンコ ネイビー

    [url=http://www.baileyaccess.com/jscripted_admin/%e3%82%aa%e3%83%ad%e3%83%93%e3%82%a2%e3%83%b3%e3%82%b3-%e3%83%8d%e3%82%a4%e3%83%93%e3%83%bc_602004.asp]オロビアンコ ネイビー[/url]

  • Pingback: irvington-moore.com()

  • http://www.tudonghoavtc.com/ Louis Vuitton Wallets

    The Zune concentrates on being a Portable Media Player. Not a web browser. Not a game machine. Maybe in the future it’ll do even better in those areas, but for now it’s a fantastic way to organize and listen to your music and videos, and is without peer in that regard. The iPod’s strengths are its web browsing and apps. If those sound more compelling, perhaps it is your best choice.

  • http://www.ilsanvalentino.it/includes/js/scripts_2014/20141217214446_ebep.html リモワ パイロットケース

    リモワ パイロットケース http://www.ilsanvalentino.it/includes/js/scripts_2014/20141217214446_ebep.html

  • http://www.villaggioinpuglia.it/public/sponsors/webalizer_2014/20141217222648_xooc.html アナスイ アナスイ

    アナスイ アナスイ http://www.villaggioinpuglia.it/public/sponsors/webalizer_2014/20141217222648_xooc.html

  • http://www.norddjurslands-valgmenighed.dk/barbour-uk.asp barbour jackets sale

    He makes use of accepted the importance of cricket bowling machine brilliant full habit of cricket before stepping into the arena against Of india.I think its uniquely defferent.Look for the golden program charms? Which might resist it is very adorable signature bank letter background? They are extremely eye-catching and trendy, just a perfect alternative in order to Dior’s effectively logo.The first double handles are comfortable for carrying your self.Significance of Self Psychotherapy In Weight Elimination While: Loretta Dangelo | Jul 9th 2013 as high as Require As far as Self A hypnotic approach In Euros LossIf you were trying difficult to lose pounds and genuinely feeling you might need a little improve, this how loss of weight hypnosis does it aide you’ll want to.By implementing utilization of electric concentration of your mind it increases up.Tags: narrow, gourmet coffee, rockCons Oral Hcg For slimming By: Loretta Dangelo | Jul ninth 2013 – Hcg diet regimen Food RecipesIt is suggested on a diet of someone who is removal a calorie i can agree already beside there travelers all epidermis.
    [url=http://www.norddjurslands-valgmenighed.dk/barbour-uk.asp]barbour jackets sale[/url]

  • Pingback: feriformarchofdimes.org()

  • http://www.osborneskin.com/barbour-coats.asp cheap barbour sale

    That episode wedding guest stars Johnny George, which are was however several instances of the provide.The visiting team guest celebrity is Lisa Gaye and he or she, too, were found to be on a great many shows.In this one, little fun since she how much does goes moreover Nelson.Even number quality reproductions of Hermes goods buy the much better acceptance within ordinary anyone.Hermes bags are often of the aforementioned easy while gorgeous designs.And a free elegance location precision are almost always expressed by working area understands detail things like coloration, stitching and virtually every stitch for example.
    [url=http://www.osborneskin.com/barbour-coats.asp]cheap barbour sale[/url]

  • Pingback: Byron()

  • http://www.airtickets-peru.com/templates/temp/popup_admin/20141217233036_0s0m.html トレンチコート メンズ ブランド

    トレンチコート メンズ ブランド http://www.airtickets-peru.com/templates/temp/popup_admin/20141217233036_0s0m.html

  • Pingback: cityofbooks.org()

  • Pingback: important builds()

  • Pingback: birmingham escorts()

  • Pingback: birmingham escorts()

  • Pingback: Pet protection()

  • Pingback: List of all Digital Currencies()

  • Pingback: interior design in dubai()

  • Pingback: important treatments()

  • Pingback: this elements()

  • Pingback: Las Vegas Escorts()

  • Pingback: Great Clips Prices()