pinoyprogammer
Techie
[css] Center a <div> using percent
^
viola you have a centered div.
^
warning: padding will destroy this. be careful of using them.
"padding:" will add padding left and right so 5 + 5 = 10, 60 - 10 = 50.

Code:
-----------------------------
| |
| |
| |
divide it by 3
-----------------------------
| 33% | 33% | 33% |
^
Code:
div.center{margin-left: 33%; width: 33%}
Code:
-----------------------------
|20% | 60% |20% |
Code:
div.sidebar-left {width: 20%; }
div.center{width: 60%}
warning: padding will destroy this. be careful of using them.
Code:
div.center{ margin-left: 20%; padding: 5%; width: 50%;}
"padding:" will add padding left and right so 5 + 5 = 10, 60 - 10 = 50.