Reader
  • Home
  • About
  • Deals
  • Services
  • Contact

Adapt.js: Adaptive CSS based on Browser Window’s Width

Last updated on April 25th, 2011 by Gabriel Livan

Adapt.js is a lightweight JavaScript file that determines which CSS file to load before the browser renders the page. In case the browser tilts of resizes, the script checks its width and loads the needed CSS file accordingly. If JavaScript is disabled default stylesheets can be served via <noscript> which is valid in the HEAD of HTML5.

Alternatives include: Build a separate site for mobile. Or, use media queries to adjust layout, with a polyfill for older browser support, and conditional Internet Explorer comments for Windows phones. Also a factor is how to handle multiple image resolutions without adding file size. Filament Group is advocating context aware image sizing.

  • Source & Demo: http://adapt.960.gs/ (resize the page to see it in action)
  • License: GPL and MIT

Filed Under: HTML & CSS, jQuery

About Me

Gabriel LivanHey, there! I'm Gabriel Livan, Web Developer, Blogger and Internet Marketer. I love making fast, secure and scalable web applications, running and travelling around the world. I blog about WordPress, site speed & security and quality tools for web professionals. Read more

What are you looking for?

Categories

  • AJAX (22)
  • Deals (10)
  • Design (30)
  • eBooks (2)
  • Flash (19)
  • Freebies (11)
  • General (62)
  • Giveaways (1)
  • Graphics (27)
  • HTML & CSS (35)
    • Frameworks (9)
  • JavaScript (160)
    • Frameworks (8)
    • jQuery (89)
    • MooTools (14)
  • Page Loading Speed (2)
  • Photoshop (3)
  • PHP (113)
  • Reviews (8)
  • SEO (6)
  • Statistics (2)
  • Web Tools (13)
  • WordPress (27)
    • Plugins (15)
    • Snippets (4)
    • Tools (2)
    • Tutorials (6)

Copyright © 2026 · BitRepository.com - All Rights Reserved

  • Home
  • About
  • Contact