Monday, December 3, 2012

Know your CSS?

Stylesheets sure looks easy. You specify a set of font sizes, padding, etc to a name and then you specify your HTML elements to use that. Easy enough? Nowadays stylesheets can get a lot more tricky.

In one job interview, I was asked. "What does 'div > p' means? How is it different from 'div p'". A sweat came down my spine. I just don't know. I have not seen this.

How do you react when someone ask you something you don't know may be difference between get job or not get job. I think I eventually guessed something close to the correct answer.

This is a CSS Selector. Glorious details: here. Nowadays CSS can even do manymore interesting stuff. Of course you need to watch for browser compatibility. How the heck do you expect people to keep up?

No comments: