From a09646cf230ac0aecb53f5df9bbd31f7de27b807 Mon Sep 17 00:00:00 2001 From: moodler Date: Fri, 5 Jan 2007 13:17:21 +0000 Subject: [PATCH] More fixes to print_simple_box --- lib/weblib.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/weblib.php b/lib/weblib.php index f4c13dd03a..9bf4b33b0e 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -2925,21 +2925,25 @@ function print_simple_box_start($align='', $width='', $color='', $padding=5, $cl $output = ''; $divclasses = $class.' '.$class.'content'; + $divstyles = ''; if ($align) { $divclasses .= ' boxalign'.$align; // Implement alignment using a class } if ($width) { - $width = ' style="width:'.$width.'"'; + $divstyles .= ' width:'.$width.';'; } if ($id) { $id = ' id="'.$id.'"'; } if ($color) { - $color = ' style="background:'.$color.'"'; + $divstyles .= ' background:'.$color.';'; + } + if ($divstyles) { + $divstyles = ' style="'.$divstyles.'"'; } - $output .= ''; + $output .= ''; if ($return) { return $output; -- 2.39.5