~ just web development & e-commerce blog


6/24/09

11 Useful Tools To Check, Clean & Optimize Your CSS File

Check your CSS code

W3C CSS Validator

The W3C CSS validator is a tool that you can use to validate your CSS. You can either download the Java validator to your computer and use it offline, or use the online form to check your CSS code.


w3c-validator - check css code




CSS Validator Firefox Add-On

To make it easier for you to validate your CSS code, there is this Firefox extension - CSS Validator - that you can install on your browser. Once installed, you can easily and quickly check your code with a right click of the mouse.




CSSCheck

Even though your CSS code is validated, it does not mean that it is free from error. The validation only means that it complies with the CSS standards set by the W3C. If you want to validate as well as looking into a few browser compatibility issues with your stylesheet, then CSSCheck is a good tool for you.




CSS Analyzer

CSS Analyzer is an useful tool that allows you to validate your stylesheet against the W3C’s standard, perform a color contrast test, and a test to ensure that relevant sizes are specified in relative units of measurement.

In case you are wondering, the color contrast test is to check that the foreground and background color combinations provide sufficient contrast when viewed by someone having color deficits, or when viewed on a black and white screen.






Clean up your CSS code

Dust-Me Selectors

Dust-Me Selectors is a Firefox extension that finds unused CSS selectors on the page that you are viewing. As you test subsequent pages of the same domain, the result is cross-checked with the previous data and any selectors encountered are crossed off from the list. You can use it to test individual pages or get it to spider the whole site.

In the end, you will get a report on the selectors that are not used anywhere in the site. You can then remove those selectors from your stylesheet (lesser code means smaller filesize).


clean css tool




CSS Redundancy Checker

Similar to Dust-Me Selectors, this tool checks your site for unused and redundant CSS selectors. The only thing that is different is that you need to manually enter the URI for each page that you want to test.


css-checker






Optimize and Compress your CSS code

Once you have completed checking the validity of your CSS and cleaned up unnecessary code, it’s time to optimize CSS file and reduce it to the smallest possible size.




CSS Tidy

CSS Tidy is an open source software that you can use to optimize and compress your CSS file. It is available in .exe format (Windows only) and a zipped php script format (all platforms, for Web developers). What CSS Tidy does is mainly remove the comment, unnecessary whitespace and change some of the code to shorthand. During compression, you can choose between code readability or maximum compression. Depending on the length of your code, you can easily achieve a compression ratio of up to 30% or more.

Since CSS Tidy is an open source project, there have been several websites that use the code and turned it into an online tool for people to use. Here are some of them:



Other CSS Optimizers

FlumpCakes CSS Optimizer

A simple optimizer that comes with several options for you to choose from.


flumpcakes-css-compressor




Robson CSS Compressor

While it may look the same as others, I have found the compression rate for Robson CSS Compressor to be the highest among them all. Although it comes with several options for you to tweak the setting, leaving all the options untouched (all options checked) always produces the best result.




CSS Drive CSS Compressor

The CSS Compressor offered by CSS Drive comes in two modes that you can use: Regular and Advanced. In the Regular mode, you only need to select which level of compression you want (Light, Normal or Super Compact) and the CSS Compressor will do the rest. In the Advanced mode, you are given more options and a greater say on how you want your stylesheet to be optimized.




CSS Optimizer

The CSS Optimizer from mabblog.com is a command line application for Mac and Linux. It is meant for those who are more comfortable with the terminal rather than an online interface. There is also a simple online version available for those who want to quickly get it over and done with.

Hopefully the tools listed here are enough for you to tweak and optimize your CSS stylesheet. If you have used any other tools that are more useful than those mentioned above, share them with us in the comments.



Source: http://www.makeuseof.com/tag/useful-tools-to-check-clean-and-optimize-your-css-file/

Share it

Followers

Follow by Email

Tags

News (210) Tips (210) Knowledges (148) Google (141) Web Development (46) Funny (41) Internet (38) eBay (33) SEO (28) Sweden (24) Free (23) Mobile Phones (22) IT (21) Software (21) Jobs (20) Apple (19) Facebook (19) Forward Mail (19) Opensource (19) Android (18) Google AdSense (18) Microsoft Windows (18) Google AdWords (17) Microsoft Office (17) iPhone (17) Ubuntu (16) E-Commerce (15) Google Analytics (15) Firefox (14) Google Apps (14) IKEA (14) DTAC (13) Microsoft (13) Phishing (13) Security (13) Domain Name (11) Google Chrome (11) Kasikorn Bank (11) Scripts (11) Seminar (11) WordPress (11) Joomla (10) Ads (9) Bank (9) Coupon (9) Google Maps (9) Paypal (9) Twitter (9) Doogle (8) Download (8) Gmail (8) Javascript (8) Linux (8) Toyota (8) Web 2.0 (8) Website (8) World Cup 2010 (8) Yahoo (8) Books (7) CSS (7) E-Banking (7) Email (7) IKEA Bangkok (7) IKEA Thailand (7) Olympic 2008 (7) Swedish (7) Youtube (7) ภาพลวงตา (7) 3G (6) Bangkok (6) GoDaddy (6) Google Logo (6) IKEA Bangna (6) Internet Banking (6) Jaturamitr (6) Sigve Brekke (6) Technology (6) Telenor (6) bcc (6) ซิกเว่ เบรกเก้ (6) ซิคเว่ เบรคเก้ (6) Bangkok Bank (5) Browsers (5) Business (5) Education (5) Google Translate (5) Hi5 (5) Joke (5) Norway (5) Office (5) Steve Jobs (5) Web Standard (5) iPod (5) ประชาคม เศรษฐกิจอาเซียน (5) Affiliates (4) Apps (4) Google Docs (4) Google Thailand (4) Happy New Year (4) Hybrid (4) IE (4) Information (4) Kbank (4) Make Money (4) PHP (4) Panda (4) Skype (4) Social Media (4) Social Network (4) TPS (4) Thai King (4) Thailand (4) jQuery (4) ABAC (3) Ajax (3) Amazon (3) Blogger (3) Certificate (3) Design (3) Doodle (3) English (3) Flood (3) Google Office (3) HTML (3) Hotmail (3) Icon (3) Manufacturing Production System (3) Movie (3) Notebook (3) Payment (3) Prototype js (3) Slide (3) Sports (3) Thailand Post (3) Toyota Production System (3) Training (3) Wifi (3) น้ำท่วม (3) สวีเดน (3) เพื่อน (3) AIS (2) Amadeus (2) Angry Birds (2) BTS (2) Bing (2) Black Friday (2) Bualuang iBanking (2) CEO (2) CMS (2) Central (2) China (2) Christmas (2) Co-Creation (2) Cool (2) Credit card (2) DOS (2) Dhamma (2) E-Business (2) EMS (2) Ebates (2) Evernote (2) Fellowship (2) Flash (2) Freelance (2) GPS (2) Games (2) Go Online (2) Google Bar (2) Google Buzz (2) Google Chrome Thailand (2) Google Search (2) Google Wave (2) Google Zeitgeist (2) Google+ (2) Groupon (2) Hostgator (2) IE6 (2) Instant WordPress (2) K-Payment Gateway (2) Kaizen (2) Khao Yai (2) Krungsri (2) Language (2) Leadership (2) MBA (2) MSN (2) Marketing (2) Mesothelioma (2) Microsoft Word (2) New Year (2) Online Payment (2) Outlook (2) PSD (2) Paul Octopus (2) Photoshop (2) PocketPC (2) Putty (2) QR Code (2) Ranking (2) Resume (2) SMEs (2) Search Engine (2) Sense-making (2) Settrade (2) Spotify (2) Starbucks (2) Templates (2) Thaksin (2) The Asbestos Test (2) The Golden Jubilee (2) Time (2) Top 10 (2) Toyota Prius (2) True Move (2) Usability (2) VISA (2) Video (2) Virus (2) VoIP (2) Volvo (2) Wallpaper (2) Web Hosting (2) Webinar (2) Wedding (2) WordPress Multisite (2) Zeitgeist (2) iPad (2) ความรัก (2) ตับอักเสบ (2) นาธาน (2) พม่า (2) หุ้น (2) อาหารและเครื่องดื่ม (2) เขาใหญ่ (2) โฆษณา (2) "The world map of social networks" (1) #WeLoveKing (1) +1 (1) 10100 (1) 2012 (1) 2bbit (1) 4G (1) 4shared (1) 8.9 Quake (1) 80s (1) API (1) ASUS (1) ATM (1) AVOS (1) AYF (1) Abbreviations (1) Abhisit (1) AdSense for domains (1) Adobe (1) Adobe CS3 Web Design - Workflow (1) Adsl (1) Agoda (1) Air Asia (1) Airport (1) Airport Link (1) Amit Singhal (1) AmitSinghal (1) Android 3.0 (1) Appointment slots (1) April Fools (1) Asbestos (1) Asia (1) Asian Martial Arts (1) Atari (1) Auctiva (1) Autopatcher (1) Bangkok Eye (1) Bangna (1) Benchmarking (1) Bhuddism (1) Big Mac (1) Birthday (1) Blackberry (1) Blog (1) Bloomberg (1) Blue Ocean (1) Bomagar (1) Bosch (1) Brands (1) Bridge (1) Brushes (1) Bryant Park (1) Bug (1) Bungkan (1) Burma (1) Business Intelligence (1) Button (1) CC (1) CC Salon (1) CDN (1) CERN (1) CN22 (1) Calendar (1) Canon (1) Carl-Gustav Alexander Tartagni (1) Carlaches (1) Cars (1) Categorizing (1) Central World (1) Chat (1) Chinese New Year (1) Chocolates (1) Chromebook (1) Clock (1) CloudFlare (1) Coca-Cola (1) Coins (1) Coke (1) Commencement Address (1) Competition (1) Condo (1) Condom (1) Crack (1) Craigslist.org (1) Creative Commons (1) Cultural Intelligence (1) Cultural Research (1) Cultural differences (1) Cultural shock (1) Culture (1) Curfew (1) Danone Activia Women Lead (1) Database (1) Daylight Saving Time (1) Delicious (1) Denmark (1) Desert flower (1) Diamond (1) Digital Signage (1) Dinner (1) Dinosaur leg (1) Dog Lovers (1) Door mat (1) Doteasy (1) Download Statusbar (1) Dream (1) Dreamhost (1) Drivers (1) DropBox. Box.net (1) Dubai (1) Dynabook (1) E16 (1) E4 (1) EU (1) East vs West (1) Eating (1) Egg (1) Entrepreneurs (1) Events (1) Evernote Food (1) Expensive Car Gallery (1) Export (1) Ext JS (1) Eyelashes (1) FaceLook (1) Facebook Email (1) Facebook Video Calling (1) Fashion (1) Fast Browser Search (1) Favicon (1) Female Entrepreneurs (1) Filmjölk (1) FireScope (1) Firebug (1) Flash Drive (1) Flintstones (1) Flixya (1) Flu (1) Followers (1) Font (1) Food (1) Foods (1) Football (1) Forex (1) Foursquare (1) Framework (1) Fried Ice-cream Recipe (1) Fuel Economy Label (1) Funny 3G Commercial (1) Garmin (1) Geek (1) George C. Marshall (1) Gift (1) Gigtide (1) Goals (1) Gold (1) Google Caffeine (1) Google Calendar (1) Google Chart (1) Google Cloud Connect (1) Google Data Center (1) Google Flights (1) Google Goggles (1) Google Instant (1) Google Latitude (1) Google Mobile (1) Google Offers (1) Google Search-based Keyword (1) Google Sites (1) Google Spreadsheets (1) Google Street View (1) Google Sync (1) Google Translator Toolkit (1) Google Trends (1) Google Voice (1) Google Wallet (1) Google Website Optimiser (1) Google's Easter Egg (1) Google's Zurich office (1) Google+ invite (1) Google-certified ad networks (1) Googley (1) Goonline.in.th (1) Graduate Programs (1) Great Places (1) Green (1) HDTV (1) Hack (1) Happy Birthday (1) Harddisk (1) Health (1) Hello (1) Helpdesk (1) Herika Fernanda (1) High and low context cultures/ communication (1) High and low context cultures/communication (1) High- and low-context cultures/communication (1) Homeplus (1) Hostel (1) How to Sleep FREE in Bangkok (1) How will you be maintaining yourself financially while you are in Australia? (1) Hurricane Katrina (1) Hysteria (1) ICT (1) IKEA Jobs (1) IMEI (1) Ice Skater (1) In-App Payments (1) India (1) Instant Pages (1) Interbrand (1) Invest (1) Investment (1) Isetan (1) Jack Welch (1) Jailbreak (1) Japanese (1) Jawbone (1) Jike (1) Jonas Seidler (1) Jordgubbar (1) Kanelbullar (1) King (1) King of Thailand (1) Kitty (1) Kiwi (1) Kopimism (1) Korea (1) Krating Poonpol (1) L'Arc~en~Ciel (1) LHC (1) LOVE AT FIRST FLIGHT (1) Languages (1) Laos (1) Laptop (1) Larry Page (1) Laws (1) Layout (1) Learning by doing (1) Let It Snow (1) Life (1) Lifestyle (1) Lingon (1) LinkedIn (1) Links (1) Lively (1) LivingSocial (1) Local business center (1) Logo (1) Love Mosaic (1) Loy Krathong (1) Lub D (1) LubD (1) MP145 (1) MP258 (1) MRT (1) MV (1) Mac (1) Maestro Card (1) Managing Diversity in International Context (1) Managing across cultures (1) Manchester United's Thailand Message (1) Map Your Valentine (1) Marcom Trainee (1) Mark Zuckerberg (1) Martin Luther King Jr. (1) McDonalds (1) Media Temple (1) Merry Christmas (1) Michael Jackson (1) Microsoft Download Manager (1) Middle age (1) Mobile Banking (1) Money (1) Most Expensive Car in the World (1) Motorola (1) Multi Monitors (1) Multi-communicative (1) Multi-touch (1) Music Beta (1) MySQL (1) NECTEC (1) Name Card (1) Nawamin City Avenue (1) Nawamin Festival Walk (1) Nero (1) Nestle Joya Ice cream (1) Netscape (1) New Media (1) New Orleans (1) Newsweek (1) Nexus (1) Nielsen (1) Nike Plus (1) Nike+ (1) Ninja (1) Nose Gel Dispenser (1) Nuvi (1) Nyponsoppa (1) Oficio (1) Oktoberfest (1) One-2-Call (1) Online Ads (1) Online Business (1) Orkut (1) PC (1) PMP (1) Page peel script (1) PageRank (1) Passport (1) Pasta (1) Path (1) PayPal Mobile (1) PaySbuy (1) Payment Gatewayม Verified by Visa (1) Philippines (1) Phone Remote Control (1) Place (1) Poem (1) Police (1) Portable Wordpress (1) Present (1) Prinsesstårta (1) Prototype (1) QZone (1) Queen (1) RE-CU (1) Rare Earth (1) Recall (1) Review (1) Rich (1) Riddle (1) Roaming (1) RockMelt (1) Rooftop Bars (1) Router Default Password List (1) Räkor (1) SCB (1) SEX (1) SMS (1) SPS (1) SQL (1) SQL Dump File Splitter (1) SQLDumpSplitter (1) SSH Command (1) SWIFT (1) Sabertooth filet (1) Salary (1) Samsung Galaxy Tab (1) Santika Pub (1) Schengen (1) Screenshot (1) Semlor (1) Sergey Brin (1) Server (1) Shaolin (1) Signature (1) Silence of Love (1) Simsimi (1) Singhal (1) Smartphone Ergonomics (1) Snow (1) Solar city (1) Song (1) Sopa (1) Space (1) Spettekaka (1) Spinning (1) Spotify's competitor (1) Stanford (1) Statistics (1) Stereotypes (1) Sticker (1) Stock (1) Strategy (1) Study (1) Subway (1) Sudoku (1) Supply Chain (1) Suvarnabhumi (1) Symbian (1) Symbols (1) Synaptics (1) THITEE (1) Tablet (1) Tarad (1) Taxi (1) Teach Parents Tech (1) Tesco (1) Tesco Homeplus (1) Thai Airways (1) Thai Stars (1) Thai police (1) Thaitrade (1) The Best Spinner (1) The Best Spinner API (1) The Church of Kopimism (1) The Evolution of Search (1) The Kite Runner (1) The Social Network (1) Themes (1) Timeline (1) Top Ten Most Expensive Cars (1) TouchPad (1) Trailer (1) Travel (1) Trojan (1) Tsunami (1) Twiends (1) Under30CEOs (1) Valentine (1) Valentine's Day (1) Varmrökt lax (1) Virtual Store (1) Virtual drive (1) VitaFresh (1) Vk (1) Vodafone (1) Vuvuzela (1) Waris Dirie (1) Waze (1) Web Analytics (1) Web Application (1) WebOn (1) Western Union (1) WiMP (1) Widget (1) Wikipedia (1) Windows 8 (1) Windows Mobile (1) Wine Bridge Plus (1) Wonder Wheel (1) Woraphan (1) Worship Day (1) Wushu (1) XHTML (1) XML (1) Xbox (1) Yahoo Pipes (1) Yahoo mail (1) YouTube Instant (1) Young Entrepreneurs (1) Young Female Entrepreneurs (1) bitthailand (1) cheat (1) cheating (1) e-waste (1) earthquake (1) fastest car in the world (1) findpeopleonplus.com (1) goo.gl (1) hiybbprqag (1) iOS 5 (1) iPad2 (1) iTunes (1) iframe (1) indoswiftjobinproduction (1) japan (1) march 11 (1) mbrzxpgjys (1) most expensive car (1) most expensive car in the world 2011 (1) multitouch (1) search (1) smtp (1) tokyo (1) กทม. (1) กรมส่งเสริมการส่งออก (1) กระทรวง ICT (1) กระสอบทราย (1) การดื่มน้ำ (1) การทักทาย (1) การนอน (1) การอ่าน (1) การเลือกตั้งนอกราชอาณาจักร (1) ก่อการร้าย (1) ขนตาปลอม (1) ขยะ (1) ขยะมีพิษ (1) ขยะอิเล็กทรอนิกส์ (1) ขับรถช่องขวา (1) ขี้ (1) ข้อคิดนักบริหาร (1) ครีมเทียม (1) ความจริงวันนี้ (1) คู่มือรับสถานการณ์น้ำท่วม (1) ค่าจอดรถ (1) จ.บึงกาฬ (1) จั่นเจา (1) ชานมไข่มุก (1) ดอทอะไร (1) ดารา (1) ตกเครื่องจนตกหลุมรัก (1) ตัน ภาสกรนที (1) ตัวอย่างหนังสือรับรองการทำงานภาษาอังกฤษ (1) ถมทะเล (1) ทอง (1) ทำบุญวันเกิด (1) ทีทำงาน (1) ท่องเที่ยว (1) ธนาคารกรุงเทพ (1) นังเมียโง่ (1) นามบัตร (1) นิทรรศการ (1) นิวออร์ลีนส์ (1) บทขออโหสิกรรม (1) บทขออโหสิกรรมเเละอฐิษฐานจิต (1) บทอฐิษฐานจิต (1) บีทีเอส (1) บึงกาฬ (1) ปัญหาเชาว์ (1) ผู้ว่า กทม. (1) ผู้ว่ากทม. (1) ฝรั่งเศส (1) พระเจ้าทันใจ (1) พันธมิตร (1) พิธีการศุลกากรไปรษณีย์ (1) มอมเหล้า (1) ยายกินลำไยน้ำลายยายไหลย้อย (1) ยุโรป (1) รถไฟฟ้าBTS (1) รถไฟฟ้าBTSเสีย (1) รถไฟฟ้าบีทีเอส (1) รถไฟฟ้าบีทีเอสเสีย (1) ระหว่างประเทศ (1) รัฐบาลสวีเดน (1) ลดน้ำหนัก (1) ลองใจ สามี (1) ลัดดาแลนด์ (1) ลานเบียร์ (1) วงล้อมหัศจรรย์ (1) วันช้างไทย (1) วิถีตัน (1) วีซ่า (1) วีซ่าออสเตรเลีย (1) สถาบันผลิตนักธุรกิจอสังหาฯ (1) สบู่เห็ดยามาบูชิทาเกะ (1) สสว. (1) สัมภาษณ์งาน (1) สามัคคี (1) สาวหล่อ (1) สุขภาพ (1) สุริยุปราคา (1) สูตรสำเร็จในชีวิต (1) หญิงหล่อ (1) หนีตามกาลิเลโอ (1) หยุดราชการ (1) หลินปิง (1) หิมะ (1) ห้องทำงาน (1) อริยะ (1) อริยะ พนมยงค์ (1) ออสเตรเลีย (1) อายัดบัตร (1) ฮิสทีเรีย (1) เขื่อนคลองท่าด่าน (1) เงินเดือน (1) เตือนภัย (1) เนียน (1) เพชร (1) เมนูอาหารคุมน้ำหนัก (1) เว็บบิส (1) เศรษฐกิจ (1) เสื้อแดง (1) เฮอริเคน แคทรีนา (1) แบรนด์ (1) แยกขยะ (1) โฆษณากูเกิลโครม ประเทศไทย (1) โฆษณาไทยประกันชีวิต (1) โต๊ะทำงาน (1) โฝวกวงซัน (1) โฟร์แชร์ (1) โรคขาดผู้ชายไม่ได้ (1) โรงเรียนที่ค่าเทอมแพงที่สุดในประเทศไทย (1) ในหลวง (1) ใบ CN22 (1) ไข่ (1) ไข่เจียว (1) ไข่ไก่ (1) ไข้หวัดหมู (1) ไม่ได้ใส่ถุง (1) ไอศกรีมทอด (1)