I am reading articles about css. I found out that many of writers suggest to use % value for div\'s width or height.
I am using pixels all the time.
Why should I
Although certainly not the only reason, use percentage to take up a certain amount of space of something you don't initially know the container parents width of.
For example, let's say I want my div element to always occupy at least 50% of the viewers browser window, I could write that as:
This will take up 50% of the width
Doing this the fixed way by using "px" will require you know the resolution of the browser if you want at least 50% width taken up. You could do this using JavaScript, but CSS is much more easier and faster.
Some other Examples using tables, divs, and animations: http://jsfiddle.net/BLQp7/1/