That example does look a bit old. The fact it claims to work with IE7 is a give-away and the comments date from 2012 and 2013.
You are right not to want to use the 200px margin, that’s “magic numbers” and will only centre a one specific width.
The quick way to centre a block element is to set margin: 0 auto; and give it a max-width value.
But this menu relies on floats, which is a bit old-fashioned, there are better solutions now.
Another consideration with hover-drop-down menus is keyboard accessibility. I had one on a site for ages and was horrified when it dawned on me that it was impossible to navigate the site by keyboard alone, then had to change it for something else.
The problem being that hover works fine on list items in sub-lists, because being children of the parent item, the parent never loses hover state.
Bur focus is different, it applies to just the one element, so when focus shifts to a child element, the parent loses focus, and in the case of a drop-down, will then hide, thus hiding the children, including what you are trying to focus on.