Css und Php verbinden

Dieses Thema im Forum "Webentwicklung" wurde erstellt von Talinsei, 15. Juni 2008 .

Schlagworte:
Status des Themas:
Es sind keine weiteren Antworten möglich.
  1. 15. Juni 2008
    Hallo , ich progge gerade bissel just for fun mäßig an ner Page rum und brauche eure Hilfe.

    Ich habe folgendes Design per css erstellt : Klick

    Code:
    body {
     background: #FFFFFF url(bdedfg.jpg) repeat;
     font-family:arial, helvetica, sans-serif;
     font-size:9pt;
     margin:0;
     padding:0;
    }
    
    #container {
     width:700px;
     height:auto;
     background:#cccaca;
     padding:10px;
     margin:10px auto 10px auto;
    }
    
    
    
    
    #header {
     height: 180px;
     width: 700px;
     background: #FFFFFF url('banner.jpg') bottom left no-repeat;
    
    }
    
    
    
    #header p {
     text-align:right;
     padding:50px 10px 10px 10px;
     color:#fff;
     font-size:10pt;
     font-weight:bold;
    }
    
    
    
    
    
    #nav {
     margin:30px 10 0 0;
     
     padding:0 10px 0 10px;
     height:37px;
     width:680px;
     background: top left repeat-x #000000;
     background
    }
    
    #nav li {
     list-style:none;
     margin:0;
     padding:0;
     display:inline;
    }
    
    #nav li a {
     color:#fff;
     font-weight:bold;
     font-size:12pt;
     text-decoration:none;
     padding:0 10px 4px 10px;
     display:inline;
     margin:0;
     line-height:33px;
     overflow:hidden;
     float: left
    }
    
    #nav li a:hover {
     background: top left repeat-x #890404;
    }
    
    #content {
    
     margin-top: 0;
     background: #FFFFFF;
    } 
    
    #content h2 {
     font-size:13pt;
     color:#f6502e;
     font-family:georgia, times, serif;
     font-weight:normal;
     margin:0;
     padding:0;
    }
    
    #content .post {
     margin-left:5px;
     border-top:1px solid #d9d7d7;
     margin-top:10px;
     padding:10px; 
    }
    
    
    #footer {
     
     color:#890404;
     margin-top:10px;
     padding:10px;
     text-align:center;
     font-size:8pt;
    }
    Jetzt habe ich mir in Php ein Script geschrieben mit dem ich News einträge in eine Datenbank schreiben kann , diese will ich jetzt auf der Startseite auslesen. Das ganze sieht nicht so ganz elegant aus und zwar so : Klick
    Wenn ich einen normalen Text von Hand auf der Seite eintrage , mache ich das folgendermaßen :

    Code:
    <div id="container"> 
    
     <div id="header"> 
     
     
    </div>
     <ul div id="nav">
    
     <li><a href="index.htm">Home</a></li>
     <li><a href="about.htm">About</a></li>
     <li><a href="http://mikemiller.mi.funpic.de/gallery/" target="_black">Photos</a></li>
     <li><a href="http://www.forum.de" target="_black">Forum</a></li>
     <li><a href="band.htm">Band</a></li>
     <li><a href="formmailer.php">Contact</a></li>
     </ul>
     
     <div id="content">
     <div class="post">
     <h2>A Blog Post</h2>..........
    Zum auslesen der Datenbank benutze ich folgenden Code :

    Code:
     $res= $db->query($sql);
     while($row=mysql_fetch_assoc($res)) {
     echo "<table width=\"60%\" border=\"0\">";
     echo "<tr>";
     echo "<th nowrap>Author</th>";
     echo "<th nowrap>Date</th>";
     echo "<th nowrap>Titel</th>";
     echo" <th nowrap>Inhalt</th>". "</tr>";
     
    
     echo "<td nowrap>". $row['Author']."</td>"; 
     echo "<td nowrap>". $row['Date']."</td>";
     echo "<td nowrap>". $row['Titel']."</td>";
     echo "<td nowrap>". $row['Inhalt']."</td>";
    Irgendwie steh ich immoment auf dem Schlauch , kann mir jemand helfen die Ausgabe richtig zur formatieren ? Ich hoffe ich hab alles wichtige angegeben.

    Gruß Tim
     
  2. 15. Juni 2008
    Zuletzt von einem Moderator bearbeitet: 13. April 2017
    AW: Css und Php verbinden

    hi und willkommen bei raid-rush.

    für allgemeine fragen haben wir extra einen thread erstellt:
    Metafragen - Readfirst - RR:Board

    ich denke deine frage hat sich damit erledigt

    ~ closed ~
     
  3. Video Script

    Videos zum Themenbereich

    * gefundene Videos auf YouTube, anhand der Überschrift.