Ich habe eine Seite mit externen Textfiles, nav.txt - Navigation ; text1.txt - Starttext auf der Seite. Die Navigation wird aufgebaut und via CSS gibts auch Rollover-Effekte. Wie kann ich :
1. Das Menu verlinken ?
2. Dass wenn ich auf einen Link klicke, der Text ausgetauscht wird ?
Die PHP-Seite :
Code:
<html>
<head>
<link rel="stylesheet" href="css/alteme.css" type="text/css">
<title>alteme.ch</title>
</head>
<body>
<table cellpadding="0" cellpsacing="0" border="0" width="100%">
<tr>
<td height="60"></td>
</tr>
</table>
<table cellpadding="0" cellpsacing="0" border="0" width="910" align="center">
<tr>
<td colspan="6" align="center">[img]img/alteme_logo.gif[/img]</td>
</tr>
<tr>
<td colspan="6">
</td>
</tr>
<tr>
<td width="130" valign="top">
<?
$menu = file_get_contents("text/navi.txt");
$line = explode("\r",$menu);
foreach($line as $value){
if($_GET["srv"]==trim($value)){
$navClass="naviAct";
}else{
$navClass="navi";
}
print "<a href=\"?srv=$value\" class=\"$navClass\">$value</a>
";
}
?>
</td>
<td width="250" valign="top">
<?
$txt = file_get_contents("text/text1.txt");
$txt = str_replace("\r","
",$txt);
print $txt;
?>
</td>
<td width="10"></td>
<td width="260" valign="top">
[img]img/Messeturm_Basel.jpeg[/img]
Architekten: Morgen, Degelo und Marques
</td>
<td width="10"></td>
<td width="250" valign="bottom">
[img]img/DLD_2.jpeg[/img]
<?
$txt = file_get_contents("text/text2.txt");
$txt = str_replace("\r","
",$txt);
print $txt;
?>
</td>
</tr>
</table>
</body>
</html>
Das CSS :
Code:
body{
color: #000000;
font-family: Arial, Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 11px;
font-style: normal;
background-color: #ffffff;
margin: 0 0 0 0;
}
td{
font-size: 11px;
}
.naviAct{
color: #00ceff;
font-size:13px;
font-weight:bold;
text-decoration: none;
}
.navi{
color: #000000;
font-size:13px;
font-weight:bold;
text-decoration: none;
}
a {
color: #ffffff;
text-decoration:none;
}
a:hover{
color: #00ceff;
}