From 33a2a8bf214bb57c3ed145dcec5cbf1aea18bd0e Mon Sep 17 00:00:00 2001 From: Simon Nagl Date: Sat, 23 Apr 2016 18:41:21 +0200 Subject: [PATCH] Fixes #159. Add CSS3 Flexbox for charts in a row. This fixes the issue that safari sometimes does not align the items in one streight row. --- web/dashboard.css | 15 +++++++++------ web/dashboard.slate.css | 14 ++++++++------ web/index.html | 4 ++-- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/web/dashboard.css b/web/dashboard.css index a7b090d6..009def63 100644 --- a/web/dashboard.css +++ b/web/dashboard.css @@ -10,11 +10,17 @@ body { margin-left: 55px; } +netdata-chart-row { + width: 100%; + text-align: center; + display: flex; + align-items: baseline; + justify-content: center; +} + + .netdata-container { - display: -webkit-flex; /* Safari */ - -webkit-flex-wrap: wrap; /* Safari 6.1+ */ display: inline-block; - flex-wrap: wrap; overflow: hidden; /* required for child elements to have absolute position */ @@ -31,10 +37,7 @@ body { } .netdata-container-with-legend { - display: -webkit-flex; /* Safari */ - -webkit-flex-wrap: wrap; /* Safari 6.1+ */ display: inline-block; - flex-wrap: wrap; overflow: hidden; /* fix minimum scrollbar issue in firefox */ diff --git a/web/dashboard.slate.css b/web/dashboard.slate.css index 66273106..0edcc87c 100644 --- a/web/dashboard.slate.css +++ b/web/dashboard.slate.css @@ -18,11 +18,16 @@ body { margin-left: 55px; } +.netdata-chart-row { + width: 100%; + text-align: center; + display: flex; + align-items: baseline; + justify-content: center; +} + .netdata-container { - display: -webkit-flex; /* Safari */ - -webkit-flex-wrap: wrap; /* Safari 6.1+ */ display: inline-block; - flex-wrap: wrap; overflow: hidden; /* required for child elements to have absolute position */ @@ -39,10 +44,7 @@ body { } .netdata-container-with-legend { - display: -webkit-flex; /* Safari */ - -webkit-flex-wrap: wrap; /* Safari 6.1+ */ display: inline-block; - flex-wrap: wrap; overflow: hidden; /* fix minimum scrollbar issue in firefox */ diff --git a/web/index.html b/web/index.html index 7be0bc3b..502973c3 100644 --- a/web/index.html +++ b/web/index.html @@ -1610,7 +1610,7 @@ function renderPage(menus, data) { // console.log(' >> ' + menu + ' (' + menus[menu].priority + '): ' + menus[menu].title); var shtml = ''; - var mhead = '
' + mainhead; + var mhead = '
' + mainhead; mainhead = ''; // sort the submenus of this menu @@ -1626,7 +1626,7 @@ function renderPage(menus, data) { if(menus[menu].submenus[submenu].info !== null) shtml += '
' + menus[menu].submenus[submenu].info + '
'; - var head = '
'; + var head = '
'; var chtml = ''; // console.log(' \------- ' + submenu + ' (' + menus[menu].submenus[submenu].priority + '): ' + menus[menu].submenus[submenu].title); -- 2.39.2