A popular technique to build a set fixed centered layout is wrap everything in the body in a div and set some CSS rules on it, for example:
<body>
<div id="wrap">
all content here
</div>
</body>
#wrap { width: 850px; margin: 0 auto; }
I was wondering, if there is a reason to add this extra wrapping div, since setting the same CSS rules on the body works. Is it for compatibility with some browsers or just a tradition?
No. You do not need a “wrapper” div that so many use because they saw others do so. Use the body for that as you should. Setting CSS properties on the body was a problem in the past but not any longer.