diff --git a/IPython/html/static/style/ipython.min.css b/IPython/html/static/style/ipython.min.css
index e3d24d4..b3ffe9e 100644
--- a/IPython/html/static/style/ipython.min.css
+++ b/IPython/html/static/style/ipython.min.css
@@ -1527,7 +1527,10 @@ div.cell.text_cell.rendered {
box-flex: 0;
/* Modern browsers */
flex: none;
- margin: 5px;
+ margin-top: 0px !important;
+ margin-bottom: 0px !important;
+ margin-right: 5px;
+ margin-left: 5px;
}
.widget-hbox input[type="checkbox"] {
margin-top: 9px;
diff --git a/IPython/html/static/style/style.min.css b/IPython/html/static/style/style.min.css
index 5869fe3..1843541 100644
--- a/IPython/html/static/style/style.min.css
+++ b/IPython/html/static/style/style.min.css
@@ -9402,7 +9402,10 @@ div.cell.text_cell.rendered {
box-flex: 0;
/* Modern browsers */
flex: none;
- margin: 5px;
+ margin-top: 0px !important;
+ margin-bottom: 0px !important;
+ margin-right: 5px;
+ margin-left: 5px;
}
.widget-hbox input[type="checkbox"] {
margin-top: 9px;
diff --git a/IPython/html/static/widgets/less/widgets.less b/IPython/html/static/widgets/less/widgets.less
index 5a49516..c62eac6 100644
--- a/IPython/html/static/widgets/less/widgets.less
+++ b/IPython/html/static/widgets/less/widgets.less
@@ -188,7 +188,10 @@
.widget-hbox {
/* Horizontal widgets */
.hbox();
- margin: 5px;
+ margin-top: 0px !important;
+ margin-bottom: 0px !important;
+ margin-right: 5px;
+ margin-left: 5px;
input[type="checkbox"] {
margin-top: 9px;