Theming a menu - removing a whitespace between the last  and I want to alter the HTML of the main menu. I have a manu set up with text-align: justify.
Now in Chrome, the whitespace between the last li and ul is rendered as 4px, making the last item not aligned to the right margin. See this stackexchange post. I want to remove the whitespace or replace it with and html comment.
I am a bit lost ;-). What should I be overriding? theme_menu_tree?
I am using the Omega 3.
Because it sounds like your question is really about how to manipulate the main menu markup in Omega, I guess I'll focus on that. That said however, the "whitespace" issue from the post that you reference is quit strange, as I'm not sure I understand how a newline between an closing li and ul tag would influence any visible alignment behavior. I'm also not sure that Omega even adds any such newlines to the menu output by default. Still, it sounds like you've isolated this as a cause already.

If you are using the main menu that's automatically inserted within the page by Omega (as opposed to displaying your main menu via a menu block or similar), then I believe the most specific theme hook that applies is 'links__system_main_menu'. Check out the omega/omega/templates/region--menu.tpl.php theme file to see how this is ultimately called.

It's important to note however that 'links__system_main_menu' is not necessarily a hook that you'll find an existing theme function for, it's just a suggested pattern. See this post for more on that. Chances are the theme function that's actually getting used currently is theme_links(), or in the case of Omega (which already has an override setup) omega_links().

So if you want to target an override that's specific to just the main menu you could use the code from omega_links() as a template for your own override called MYTHEMENAME_links__system_main_menu(). Then within this new function you could adjust the output to tweak the way "whitespace" is added before and after any ul and li tags as you deem necessary.