From 055871bb1ac4378212acd797f96dc1a62c0631ef Mon Sep 17 00:00:00 2001 From: Edmondo Tommasina Date: Wed, 19 May 2010 14:59:45 +0200 Subject: Define alternating odd/even css classes for rows in main summary To select different background colors for the rows in the main summary page, just uncomment the tr.odd/tr.even background definition in layout/style.css and set the color. --- inc/html.inc.php | 8 +++++++- layout/style.css | 8 ++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/inc/html.inc.php b/inc/html.inc.php index a05aab6..ada8d99 100644 --- a/inc/html.inc.php +++ b/inc/html.inc.php @@ -66,8 +66,14 @@ function host_summary($hosts) { echo "\n"; + $row_style = array(0 => "even", 1 => "odd"); + $host_counter = 0; + foreach($hosts as $host) { - printf('', + $host_counter++; + + printf('', $row_style[$host_counter % 2]); + printf('', $CONFIG['weburl'],$host, $host); if ($CONFIG['showload']) { diff --git a/layout/style.css b/layout/style.css index 83664a4..e478203 100644 --- a/layout/style.css +++ b/layout/style.css @@ -48,6 +48,14 @@ table.summary th { text-align: left; } +table.summary tr.even { +/* background: #eeeeee; */ +} + +table.summary tr.odd { +/* background: #cccccc; */ +} + table.summary td { width: 50px; text-align: right; -- cgit v1.1
%s
%s