CSS To Set Div Always Centered

HTML:
  1. <div id="container_centered"></div>
 CSS:
  1. <style type="text/css">  
  2.         body{ background-color: cadetblue; }  
  3.         #container_centered{  
  4.             background-color: floralwhite;  
  5.             width500px;  
  6.             height300px;  
  7.             positionabsolute;  
  8.             left: 50%;  
  9.             top: 50%;  
  10.             margin-left-250px;  
  11.             margin-top-150px
  12.         }
  13. </style>
here "margin-left" should be half of the width with (-) symbol and "margin-top" should be half of the height with (-) symbol.
 
Please give your valuable comments.