From: moodler Date: Fri, 5 Jan 2007 13:17:21 +0000 (+0000) Subject: More fixes to print_simple_box X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=a09646cf230ac0aecb53f5df9bbd31f7de27b807;p=moodle.git More fixes to print_simple_box --- 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;