diff --git a/IPython/html/static/notebook/less/renderedhtml.less b/IPython/html/static/notebook/less/renderedhtml.less
index ebf1fbc..2d4ceff 100644
--- a/IPython/html/static/notebook/less/renderedhtml.less
+++ b/IPython/html/static/notebook/less/renderedhtml.less
@@ -43,7 +43,15 @@
margin: 1em 2em;
}
- table, tr, th, td {
+ table {
+ // Center tables horizontally
+ margin-left: auto;
+ margin-right: auto;
+ border: 1px solid black;
+ border-collapse: collapse;
+ }
+
+ tr, th, td {
border: 1px solid black;
border-collapse: collapse;
margin: 1em 2em;
@@ -66,9 +74,16 @@
p + p {
margin-top: 1em;
}
-
+
+ img {
+ display: block;
+ margin-left: auto;
+ margin-right: auto;
+ }
+
.MathJax_Display {
- margin-left: 12ex;
+ text-align: center !important;
+ // margin-left: 12ex;
}
}
diff --git a/IPython/html/static/style/ipython.min.css b/IPython/html/static/style/ipython.min.css
index a5df16a..7e5a334 100644
--- a/IPython/html/static/style/ipython.min.css
+++ b/IPython/html/static/style/ipython.min.css
@@ -170,12 +170,14 @@ div.quickhelp{float:left;width:50%;}
.rendered_html pre{margin:1em 2em;}
.rendered_html pre,.rendered_html code{border:0;background-color:#ffffff;color:#000000;font-size:100%;padding:0px;}
.rendered_html blockquote{margin:1em 2em;}
-.rendered_html table,.rendered_html tr,.rendered_html th,.rendered_html td{border:1px solid black;border-collapse:collapse;margin:1em 2em;}
+.rendered_html table{margin-left:auto;margin-right:auto;border:1px solid black;border-collapse:collapse;}
+.rendered_html tr,.rendered_html th,.rendered_html td{border:1px solid black;border-collapse:collapse;margin:1em 2em;}
.rendered_html td,.rendered_html th{text-align:left;vertical-align:middle;padding:4px;}
.rendered_html th{font-weight:bold;}
.rendered_html p{text-align:justify;}
.rendered_html p+p{margin-top:1em;}
-.rendered_html .MathJax_Display{margin-left:12ex;}
+.rendered_html img{display:block;margin-left:auto;margin-right:auto;}
+.rendered_html .MathJax_Display{text-align:center !important;}
span#save_widget{padding:0px 5px;margin-top:12px;}
span#checkpoint_status,span#autosave_status{font-size:small;}
@media (max-width:767px){span#save_widget{font-size:small;} span#checkpoint_status,span#autosave_status{font-size:x-small;}}@media (max-width:767px){span#checkpoint_status,span#autosave_status{display:none;}}@media (min-width:768px) and (max-width:979px){span#checkpoint_status{display:none;} span#autosave_status{font-size:x-small;}}div.text_cell{padding:5px 5px 5px 5px;}
diff --git a/IPython/html/static/style/style.min.css b/IPython/html/static/style/style.min.css
index 2ebab58..a32c9b9 100644
--- a/IPython/html/static/style/style.min.css
+++ b/IPython/html/static/style/style.min.css
@@ -1551,12 +1551,14 @@ div.quickhelp{float:left;width:50%;}
.rendered_html pre{margin:1em 2em;}
.rendered_html pre,.rendered_html code{border:0;background-color:#ffffff;color:#000000;font-size:100%;padding:0px;}
.rendered_html blockquote{margin:1em 2em;}
-.rendered_html table,.rendered_html tr,.rendered_html th,.rendered_html td{border:1px solid black;border-collapse:collapse;margin:1em 2em;}
+.rendered_html table{margin-left:auto;margin-right:auto;border:1px solid black;border-collapse:collapse;}
+.rendered_html tr,.rendered_html th,.rendered_html td{border:1px solid black;border-collapse:collapse;margin:1em 2em;}
.rendered_html td,.rendered_html th{text-align:left;vertical-align:middle;padding:4px;}
.rendered_html th{font-weight:bold;}
.rendered_html p{text-align:justify;}
.rendered_html p+p{margin-top:1em;}
-.rendered_html .MathJax_Display{margin-left:12ex;}
+.rendered_html img{display:block;margin-left:auto;margin-right:auto;}
+.rendered_html .MathJax_Display{text-align:center !important;}
span#save_widget{padding:0px 5px;margin-top:12px;}
span#checkpoint_status,span#autosave_status{font-size:small;}
@media (max-width:767px){span#save_widget{font-size:small;} span#checkpoint_status,span#autosave_status{font-size:x-small;}}@media (max-width:767px){span#checkpoint_status,span#autosave_status{display:none;}}@media (min-width:768px) and (max-width:979px){span#checkpoint_status{display:none;} span#autosave_status{font-size:x-small;}}div.text_cell{padding:5px 5px 5px 5px;}