codreanu
22-07-2007, 22:12
Ciao programmatori :).
Sto costruendo(ci provo, è il primo) questo sito. Il file è questo:
<html>
<head>
<title>Website</title>
<LINK href="style.css" rel="stylesheet" type="text/css" title="Default Styles" media="screen"/>
</head>
<body>
<div id = "container" align = "center">
<img src="images/website.png" width="900" height="1000" alt="">
</div>
<div id = "article">
<?php
function ReadArticle()
{
$myFile = "Article.txt";
$handle = fopen($myFile, 'r');
$Data = fread($handle, 10);
fclose($handle);
echo $Data;
}
ReadArticle();
?>
</div>
</body>
</html>
Come si vede ho 2 div. Il primo è la base del sito, un'immagine fatta in Photoshop. Il secondo è un pò di testo che la funzione PHP ReadFile() prende da un file .txt.
Vorrei poter sovrapporre i due div in modo che il testo appaia sopra l'immagine fatta in Photoshop. Grazie in anticipo.
Nel .css ho
body {
background-image: url(images/back.jpg);
}
Sto costruendo(ci provo, è il primo) questo sito. Il file è questo:
<html>
<head>
<title>Website</title>
<LINK href="style.css" rel="stylesheet" type="text/css" title="Default Styles" media="screen"/>
</head>
<body>
<div id = "container" align = "center">
<img src="images/website.png" width="900" height="1000" alt="">
</div>
<div id = "article">
<?php
function ReadArticle()
{
$myFile = "Article.txt";
$handle = fopen($myFile, 'r');
$Data = fread($handle, 10);
fclose($handle);
echo $Data;
}
ReadArticle();
?>
</div>
</body>
</html>
Come si vede ho 2 div. Il primo è la base del sito, un'immagine fatta in Photoshop. Il secondo è un pò di testo che la funzione PHP ReadFile() prende da un file .txt.
Vorrei poter sovrapporre i due div in modo che il testo appaia sopra l'immagine fatta in Photoshop. Grazie in anticipo.
Nel .css ho
body {
background-image: url(images/back.jpg);
}