Re: css Fehler
Posted: Wed 30. Mar 2011, 20:17
The solution is: In page layout where the checkboxes and fields for background and colors are: you need to check "disabled" and everything works fine.
The phpwcms support forum will help to find answers to your questions. The small but strong community is here since more than 10 years.
https://forum.phpwcms.org/
Code: Select all
function get_body_attributes(& $values) {
//return a standard list of standard html body attributes
//based on the pagelayout definitions
$body_class = '';
$link_class = '';
if(is_array($values)) {
if(empty($values["layout_noborder"])) {
$body_class .= add_style_attribute(' margin', '0').LF;
$body_class .= add_style_attribute(' padding-top', empty($values["layout_border_top"]) ? '0' : intval($values["layout_border_top"]) .'px').LF;
$body_class .= add_style_attribute(' padding-bottom', empty($values["layout_border_bottom"]) ? '0' : intval($values["layout_border_bottom"]).'px').LF;
$body_class .= add_style_attribute(' padding-left', empty($values["layout_border_left"]) ? '0' : intval($values["layout_border_left"]) .'px').LF;
$body_class .= add_style_attribute(' padding-right', empty($values["layout_border_right"]) ? '0' : intval($values["layout_border_right"]) .'px').LF;
$body_class .= LF;
}
if(!empty($values["layout_bgcolor"])) {
$body_class .= add_style_attribute(' background-color', $values["layout_bgcolor"]);
$body_class .= LF;
}
if(!empty($values["layout_bgimage"])) {
$body_class .= add_style_attribute(' background-image', 'url('.$values["layout_bgimage"].')');
$body_class .= LF;
}
if(!empty($values["layout_textcolor"])) {
$body_class .= add_style_attribute(' color', $values["layout_textcolor"]);
$body_class .= LF;
}
if(!empty($body_class)) {
$body_class = ' body {'.LF.$body_class.' }'.LF;
}
if(!empty($values["layout_linkcolor"])) {
$link_class .= ' a, a:link, a:active, a:visited, a:hover { color: '.$values["layout_linkcolor"].'; }';
$link_class .= LF;
}
if(!empty($values["layout_vcolor"])) {
$link_class .= ' a:visited { color: '.$values["layout_vcolor"].'; }';
$link_class .= LF;
}
if(!empty($values["layout_acolor"])) {
$link_class .= ' a:active { color: '.$values["layout_acolor"].'; }';
$link_class .= LF;
}
if(!empty($body_class) || !empty($link_class)) {
$body_class = ' <style type="text/css">'.LF. $body_class;
$body_class .= $link_class . ' </style>'.LF;
}
return $body_class;
}
return '';
}