From 994998fcca96e69bfbd7eed09e3c0023aadc2ce1 Mon Sep 17 00:00:00 2001 From: BlueRaja Date: Sun, 13 Jan 2013 15:57:36 -0600 Subject: Updated CSS of leaderboard page to not get ridiculously large with long names, and not make the points-string off-center --- css/stats.css | 26 +++++++++++++++++++++++--- pages/leaderboard.php | 12 ++++++------ 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/css/stats.css b/css/stats.css index d262a75..28d6842 100644 --- a/css/stats.css +++ b/css/stats.css @@ -9,7 +9,7 @@ margin-right: 0px; margin-left: 12px; float: left; - width: 300px; + max-width: 340px; height: auto; } .col { @@ -37,6 +37,26 @@ table { td, th { padding: 3px; } + +.leaderboardHeaders .leaderboardHeadersRank, +.leaderboardHeaders .leaderboardHeadersName, +.leaderboardHeaders .leaderboardHeadersMoves, +.leaderboardHeaders .leaderboardHeadersTime +{ + border:1px solid #ccc; +} + +.leaderboardHeaders .leaderboardHeadersRank { width: 40px; } +.leaderboardHeaders .leaderboardHeadersName, +.leaderboardName +{ + max-width: 140px; + text-overflow: ellipsis; + overflow: hidden; +} +.leaderboardHeaders .leaderboardHeadersMoves { width: 45px; } +.leaderboardHeaders .leaderboardHeadersTime { width: 85px; } + .lbrow { /* Temporary adjust for font changes */ font-size:105%; @@ -112,13 +132,13 @@ td, th { white-space:nowrap; } -.wrapper .col1 .myPoints +.myPoints { text-align: center; color: #00DDFF; } -.wrapper .col1 .myPoints .myPointsValue +.myPoints .myPointsValue { font-weight: bold; } \ No newline at end of file diff --git a/pages/leaderboard.php b/pages/leaderboard.php index 4636429..1c6ef89 100644 --- a/pages/leaderboard.php +++ b/pages/leaderboard.php @@ -256,11 +256,11 @@ function displayPastMaze($mapType, $name, $daysAgo = 1) { function displaystats($result, $caption = NULL) { //Get names. - $headers = ""; - $headers .= "Rank"; - $headers .= "Name"; - $headers .= "Moves"; - $headers .= "Time taken"; + $headers = ""; + $headers .= "Rank"; + $headers .= "Name"; + $headers .= "Moves"; + $headers .= "Time taken"; $headers .= ""; //Start table //$r .= ""; @@ -288,7 +288,7 @@ function displaystats($result, $caption = NULL) { $x = "\n"; $x .= ""; - $x .= ""; + $x .= ""; //$x .= "'; $x .= ''; $x .= ''; -- cgit v1.2.3
$i$displayName$displayName" . $row['Name'] . '' . $row['Moves'] . '' . $row['Timetaken'] . '