<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl"> <head> <link rel="stylesheet" href="layout/style.css" type="text/css"/> </head> <body> <div id="glowny"> <div id="logo"> Logo </div> <div id="menu"> menu </div> <div id="lewy"> <?php pokaz_newsy(); ?> </div> </div> </body> </html>
<?php function pokaz_newsy(){ $query = 'SELECT * FROM news'; $tytul = $row['tytul']; $tresc = $row['tresc']; $autor = $row['autor']; $data_dodania = $row['data_dodania']; echo" <div class="news"> <div class="dane"> Tytul $tytul <p>Autor: $autor</p> <p>Data dodania: $data_dodania</p> </div> <div class="tresc"> $tresc </div> <hr/> </div> "; } }; ?>
/*------------------------ W tym divie jest logo ------------------------*/ div#logo{ width:100%; height:50px; background-color:#7aabe7; } /*------------------------ W tym divie jest menu --------------------------*/ div#menu { background-color: #eef2f7; width: 200px; float: left; } /*------------------------ Wyswietlanie --------------------------*/ div#lewy { background-color: #cdcccc; margin-left:200px; } div.tresc{ margin-left:250px; } div.dane{ }

chcialbym zeby Tresc newsa byla tak samo ustawiona w poziomie jak dane newsa
Obrazowo zaznaczylem to na screenie