speicher
05-07-2004, 11:17
Hallo,
vielleicht kann mir jemand helfen, denn ich komm irgendwie nicht weiter.
Ich versuche die Attribute meiner CSS Datei:
A:link {
COLOR: #0000AA;
TEXT-DECORATION: none;
FONT-FAMILY: Comic Sans MS;
FONT-STYLE: normal}
A:visited {
COLOR: #800080;
TEXT-DECORATION: none;
FONT-FAMILY: Comic Sans MS;
FONT-STYLE: normal}
A:active {
COLOR: #FF0000;
TEXT-DECORATION: none;
FONT-FAMILY: Comic Sans MS;
FONT-STYLE: normal}
A:hover {
COLOR: #009000;
TEXT-DECORATION: none;
FONT-FAMILY: Comic Sans MS;
FONT-STYLE: normal;
height: 12px }
in einer php-Datei anzuwenden. In dieser Datei ist die Funktion, mit der ich die CSS einbinden möchte.
<?php
function build_body($title, $bgcolor, $text_color, $link_color, $vlink_color, $alink_color, $style_sheet) {
if ($style_sheet)
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"css.css\">";
if ($title)
echo "<title>$title</title>\n";
if (!$bgcolor)
$bgcolor = "#000000";
if (!$text_color)
$text_color = "#FFFFFF";
if (!$link_color)
$link_color = "#FFFFFF";
if (!$vlink_color)
$vlink_color = "#FFFFFF";
if (!$alink_color)
$alink_color = "#FFFF00";
if ($background)
$background = "background=\"$background\"";
echo "<body bgcolor=\"$bgcolor\" text=\"$text_color\" link=\"$link_color\" vlink=\"$vlink_color\" alink=\"$alink_color\" $background>\n\n";
}
An der Stelle sollten eigentlich die Attribute funktionieren...tun sie aber nicht. Warum?? Vor allem der hover Effekt wäre mir wichtig.
function print_error($reason,$type = 0) {
build_body($title, $bgcolor, $text_color, $link_color, $vlink_color, $alink_color, $style_sheet);
if ($type == "fehlt") {
if ($missing_field_redirect) {
header("Location: $missing_field_redirect?error=$reason");
exit;
} else {
?>
<div style="position: absolute; top: 108px; left: 0px; width: 100%; height: 70%">
Das Formular wurde aus folgenden Gründen nicht gesendet:<p>
<ul><?
echo $reason."\n";
?></ul>
Zum Ändern drücken Sie bitte:
<a href="javascript:history.go(-1);">[Zurück zur Eingabe]</a> <?
}
}
echo "<br><br>\n";
exit;
}
?>
Ich danke für jede Hilfe schon einmal im Voraus.
Gruß
Mathias
vielleicht kann mir jemand helfen, denn ich komm irgendwie nicht weiter.
Ich versuche die Attribute meiner CSS Datei:
A:link {
COLOR: #0000AA;
TEXT-DECORATION: none;
FONT-FAMILY: Comic Sans MS;
FONT-STYLE: normal}
A:visited {
COLOR: #800080;
TEXT-DECORATION: none;
FONT-FAMILY: Comic Sans MS;
FONT-STYLE: normal}
A:active {
COLOR: #FF0000;
TEXT-DECORATION: none;
FONT-FAMILY: Comic Sans MS;
FONT-STYLE: normal}
A:hover {
COLOR: #009000;
TEXT-DECORATION: none;
FONT-FAMILY: Comic Sans MS;
FONT-STYLE: normal;
height: 12px }
in einer php-Datei anzuwenden. In dieser Datei ist die Funktion, mit der ich die CSS einbinden möchte.
<?php
function build_body($title, $bgcolor, $text_color, $link_color, $vlink_color, $alink_color, $style_sheet) {
if ($style_sheet)
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"css.css\">";
if ($title)
echo "<title>$title</title>\n";
if (!$bgcolor)
$bgcolor = "#000000";
if (!$text_color)
$text_color = "#FFFFFF";
if (!$link_color)
$link_color = "#FFFFFF";
if (!$vlink_color)
$vlink_color = "#FFFFFF";
if (!$alink_color)
$alink_color = "#FFFF00";
if ($background)
$background = "background=\"$background\"";
echo "<body bgcolor=\"$bgcolor\" text=\"$text_color\" link=\"$link_color\" vlink=\"$vlink_color\" alink=\"$alink_color\" $background>\n\n";
}
An der Stelle sollten eigentlich die Attribute funktionieren...tun sie aber nicht. Warum?? Vor allem der hover Effekt wäre mir wichtig.
function print_error($reason,$type = 0) {
build_body($title, $bgcolor, $text_color, $link_color, $vlink_color, $alink_color, $style_sheet);
if ($type == "fehlt") {
if ($missing_field_redirect) {
header("Location: $missing_field_redirect?error=$reason");
exit;
} else {
?>
<div style="position: absolute; top: 108px; left: 0px; width: 100%; height: 70%">
Das Formular wurde aus folgenden Gründen nicht gesendet:<p>
<ul><?
echo $reason."\n";
?></ul>
Zum Ändern drücken Sie bitte:
<a href="javascript:history.go(-1);">[Zurück zur Eingabe]</a> <?
}
}
echo "<br><br>\n";
exit;
}
?>
Ich danke für jede Hilfe schon einmal im Voraus.
Gruß
Mathias

