More fixes to print_simple_box

This commit is contained in:
moodler 2007-01-05 13:17:21 +00:00
parent fcf78b1557
commit a09646cf23

View File

@ -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 .= '<div'.$color.$width.$id.' class="'.$divclasses.'">';
$output .= '<div'.$id.$divstyles.' class="'.$divclasses.'">';
if ($return) {
return $output;