• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

Html Seite ausgewählt aus txt dateiverwenden.......

Clockit

Neues Mitglied
Hallo !

ich hab mal ne sehr schwere Frage unszwar hab ich eine Seite aufgebaut mit 0% system und das ist natürlich stressig wenn ich eine neues Artikel reinmache dann muss ich auch auf allen artikelseiten die menüs ändern....
also hab ich mich dafür entschieden das cssund html vom menu einzubinden von einer txt datei aber irgendwie geht es nicht bitte um hilfe---(ich hab meine menubar via html (spry assets) .. ....)

artikelseiten---
HTML:
<html>
<head>
    <title> :: Home</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <link rel="stylesheet" type="style/css" href="style.txt">


</head>
test
<body>
Style.txt
HTML:
<style type="text/css">
<!--
#AutoNumber6 #AutoNumber7 #AutoNumber8 #AutoNumber9 #AutoNumber11 #AutoNumber12 #AutoNumber13 td {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-style: italic;
    color: #333333;
}
#AutoNumber6 #AutoNumber7 #AutoNumber8 #AutoNumber9 #AutoNumber11 #AutoNumber12 #AutoNumber13 .Stil1 {
}
#AutoNumber6 #AutoNumber7 #AutoNumber8 #AutoNumber9 #AutoNumber11 #AutoNumber12 #AutoNumber13 .Stil1 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 24px;
    font-style: italic;
    font-weight: bold;
    color: #000000;
}
#AutoNumber6 #AutoNumber7 #AutoNumber8 #AutoNumber9 #AutoNumber11 #AutoNumber12 #AutoNumber13 p {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12pt;
    font-style: normal;
    line-height: normal;
    font-weight: normal;
    font-variant: normal;
    color: #000000;
}
.Stil8 {
    font-size: 36px;
    font-weight: bold;
}
.Stil10 {font-size: 14pt; }
body {
    background-image: url(Bilder/HG11.png);
}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script src="Menue-Scrpts/SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>

<style type="text/css">
<!--
a {
    font-family: Arial, Helvetica, sans-serif;
    color: #000000;
}
a:link {
    text-decoration: none;
}
a:visited {
    text-decoration: none;
    color: #000000;
    background-color: #0099FF;
}
a:hover {
    text-decoration: none;
    color: #000000;
}
a:active {
    text-decoration: none;
    color: #000000;
}
-->
</style>

<style type="text/css">
<!--
.Stil29 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 24px;
    font-style: normal;
    font-weight: bold;
}
-->
</style>

<style type="text/css">
<!--
.Stil35 {color: #000000}
-->
</style>
<link href="Menue-Scrpts/SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.Stil36 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: bold;
}
.Stil37 {
    font-size: 91%
}
-->
</style>
</head>
</html>

<html>
<head>
</head>

<body bgcolor="#003333">
<div align="center">

  <center>
    <table width="741" height="272" border="0" cellpadding="0" cellspacing="0" bgcolor="#0099FF" id="AutoNumber6" style="position:absolute;top:20px; left:300px;">
      <tr bgcolor="#0099FF">
        <td width="741" height="125" valign="top" background="Bilder/Banner.png" bgcolor="#0099FF" style="border-style: none; border-width: medium"><table width="100%" border="0" cellspacing="0" cellpadding="15">
          <tr>
            <td width="42%"><p class="Stil8">&nbsp;</p>              </td>
            <td width="58%">&nbsp;</td>
          </tr>

        </table></td>
      </tr>
      <tr bordercolor="#FF6600" bgcolor="#FF6600">
        <td width="741" height="224" valign="top" bordercolor="#0099FF" bgcolor="#0099FF" style="border-style: none; border-width: medium"><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#0099FF" bgcolor="#0099FF" id="AutoNumber7" style="border-collapse: collapse; border-left-width: 0; border-right-width: 0; border-bottom-width:0">
          <tr bordercolor="#0099FF" bgcolor="#0099FF">
            <td width="11%" align="center" bordercolor="#0099FF" style="border-left: 1px solid #0099FF; border-right-style: solid; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style:none; border-bottom-width:medium"><b><font face="Arial" size="2" color="#FFFFFF"><a href="index.php" target="_self">Home</a></font></b></td>
            <td width="16%" align="center" bordercolor="#0099FF" bgcolor="#0099FF" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style:none; border-bottom-width:medium"><b><font face="Arial" size="2" color="#FFFFFF"><a href="neubau.php" target="_self">News</a></font></b></td>
            <td width="13%" align="center" bordercolor="#0099FF" bgcolor="#0099FF" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style:none; border-bottom-width:medium"><b><font face="Arial" size="2" color="#FFFFFF"><a href="http://dreamerhotel0.dr.funpic.de/Infobuch/index.php" target="_blank">G&auml;stebuch</a></font></b></td>

            <td width="18%" align="center" bordercolor="#0099FF" bgcolor="#0099FF" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style:none; border-bottom-width:medium"><b><font size="2" color="#FFFFFF" face="Arial"><a href="Galerie.php" target="_self">Galerie</a></font></b></td>
            <td width="17%" align="center" bgcolor="#0099FF" style="border-left-style: solid; border-left-width: 1; border-right: 1px solid #0099FF; border-top-style: solid; border-top-width: 1; border-bottom-style:none; border-bottom-width:medium"><span class="Stil36"><a href="http://daydreamerforum.da.funpic.de/" target="_new">Forum</a></span></td>
            <td width="25%" align="center" bgcolor="#0099FF" style="border-left-style: solid; border-left-width: 1; border-right: 1px solid #0099FF; border-top-style: solid; border-top-width: 1; border-bottom-style:none; border-bottom-width:medium"><b><font size="2" color="#FFFFFF" face="Arial"><a href="Impressum.php" target="_self">Kontakt / Impressum</a></font></b></td>
          </tr>
          <tr bordercolor="#0099FF">
            <td colspan="6" align="center" style="border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: solid; border-top-width: 1; border-bottom-style: none; border-bottom-width: medium"><table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border-width: 0" bordercolor="#0099FF" width="100%" id="AutoNumber8">
                <tr bordercolor="#0099FF" bgcolor="#0099FF">

                              </ul>
                          </li>
                          <li><a href="#" title="Schulthemen" target="_self" class="MenuBarItemSubmenu">Schulthemen</a>
                            <ul>
                              <li><a href="Mehr_Farbe.php" title="Mehr Farbe!" target="_self">Mehr Farbe!</a></li>
                              <li><a href="klassenterror.php" title="Klassenterror" target="_self">Klassenterror</a></li>
                              <li><a href="Lehrermangel.php" title="Lehrermangel" target="_self">Lehrermangel</a></li>

                              <li><a href="stundenausfall.php" title="Stundenausfall" target="_self">Stundenausfall</a></li>
                              <li><a href="soziales_training.php" title="Soziales Training" target="_self" class="Stil37">Soziales Training</a></li>
                              <li><a href="Konfliktlotsen.php">Konfliktlotsen</a></li>
                            </ul>
                            </li>
                          <li><a href="#" title="M&auml;dchenkram" target="_self" class="MenuBarItemSubmenu">M&auml;dchenkram</a>

                              <ul>
                   ........(abgekürzt spry menubar)
                          </li>
                          <li><a href="#" title="&Uuml;ber uns" target="_self" class="MenuBarItemSubmenu">&Uuml;ber uns</a>
                            <ul>
                              <li><a href="ueber_uns.php" title="Mitarbeiter" target="_self">Redaktion</a></li>
                              </ul>
                            </li>
                        </ul>                        </td>

                        

<script type="text/javascript">
<!--
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
//-->
</script>
</body>

</html>
 
ja ich weiß aber ich versuche eben nur z.b. für news eine musterseite zu erstellen damit mann einfach musterseite öffnet und reinpackt die news... und damit mann sich nicht harte arbeit macht soll das ding die menubar von einer internen basis rauszippen und an seine position bringen damit ich nicht an allen seiten die navi umändern muss hättest du möglicherweise ein fertiges php script auf lager?
 
Da braucht man kein Script für.
Nur eine einzige Codezeile.
das geht aus den Seiten hervor, die ich dir als Lesestoff vorgeschlagen habe.

Aber ich geb dir mal ein Beispiel, anhand dessen du dann deinen bestehenden Code umstrukturieren kannst:

schablonenseite.php
PHP:
<!DOCTYPE>
<html>
<head>
<meta>
<link href="style.css" rel="stylesheet" type="text/css">
<title>Seitentitel</title>
</head>

<body>
<p>Hier sind alle Elemente oberhalb deines individuellen Newsbeitrages</p>

<?php
// In der nachfolgenden Zeile gibst du den Pfad der Datei an, die du einbinden möchtest.
// Diese enthält ausschließlich den Code deines Newsbeitrages!
include("pfad/zur/datei.html"); 
?>

<p>Hier sind alle Elemente unterhalb deines individuellen Newsbeitrages</p>
</body>
</html>

Externe CSS-Dateien enthalten ausschließlich CSS-Code!
Keine HTML-Tags oder anderen Code.
Also auch kein <style></style>

style.css
Code:
a {
    font-family: Arial, Helvetica, sans-serif;
    color: #000000;
}
a:link {
    text-decoration: none;
}
a:visited {
    text-decoration: none;
    color: #000000;
    background-color: #0099FF;
}
a:hover {
    text-decoration: none;
    color: #000000;
}
a:active {
    text-decoration: none;
    color: #000000;
}

und so weiter, etc...
 
Zurück
Oben