Thursday, August 14, 2014

Cascading Style Sheet (CSS) - Tips and Tricks

CSS - Development and Testing Resources

Color Checking Tool
For CSS development the following tools can be used
  • Adobe Dreamweaver
There are CSS analysis tools that come with all the leading browsers now.
  • IE - Tools->Developer Tools or press F12
  • Firefox - Firebug plugin has webdeveloper toolbar.
  • Chrome - The browser itself comes with rich java script and CSS handling tools. To access go to Tools->Developer Tools
Testing Tools
  • For IE testing one can use Expression Web super view from
  • IE tester is another one that can be used for testing different version of IE
  • Adobe Browser lab
CSS - Handling Browser Moods

I think a big part of browser compatibility industry survives on the moods of IE6. And still this can not be ignored because still substantial number of people use IE6. To see the various trends on browser usage, look at the link

To handle IE specific issues, the conditional statements are put inside comment. (We think comments are only for real user). The IE will look into those comments though all other browser ignore it. The condition looks like

<! -- [if condition] >
IE is the greatest browser. Only IE will see it :)
<! [endif]- ->

Conditions are:
  • lt  Less than
  • lte  Less than or equal to
  • gt  Greater than
  • gte  Greater than or equal to
  • IE 6  IE version 6 (Note the space between IE and 6
  • IE 7  IE version 7
For example for less than or equal to IE6

<! -- [if lte IE 6] >
IE 6 is the coolest browser ever made
<! [endif]- ->

CSS - Trivia

What is the most available font list in internet?
What is 960 grid system?
  • Designers use to do the layout and is based on 960 pixels width screen and is used for doing layouts. Check
HTML5 boilerplate
Modernizr Javascript
  • A small javascript library which provides fine level control on various issues depending on the underlying browser.
  • selectivizr is a JavaScript utility that emulates CSS3 pseudo-classes and attribute selectors in Internet Explorer 6-8. Simply include the script in your pages and selectivizr will do the rest.
Please add to comment if you have more tricks under your sleeve.

More articles on CSS

No comments:

Post a Comment