You are on the right track by trying to change the style settings, but
since they are set by the HTML-CSS output jax, you need to set them
for that component, not for MathJax as a whole (since otherwise HTML-
CSS will override it). Try
<script type="text/javascript" src="/js/mathjax/MathJax.js">
MathJax.Hub.Config({
extensions:["mml2jax.js"],
jax:["input/MathML","output/HTML-CSS"],
"HTML-CSS": {
styles: {
'.MathJax_Display': {
"margin": 0
}
}
}
});
</script>
I think that will take care of it for you. Otherwise, be sure all
your <math> elements have the same display value (either "block" or
"inline").
Hope that helps.
Davide