Stworzyłem plik PHP, w którym umieszczony jest kod HTML z dołączonym plikiem CSS. Problem tkwi w tym, że gdy wpisuję kod PHP do diva, to strona wyświetla się do momentu gdzie kod PHP został wpisany. Poniżej kodu PHP, strona ucięta i reszta DIVów jest niewidoczna. Bez wpisanego kodu PHP strona wyświetla się prawidłowo z widocznymi DIVami. Z góry dziękuje za pomoc.
<DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" /> <meta name="Description" content="Tu wpisz opis zawartości strony" /> <meta name="Keywords" content="Tu wpisz wyrazy kluczowe rozdzielone przecinkami" /> <link rel="Stylesheet" type="text/css" href="style.css" /> </head> <div id="calosc"> <div id="tresc"> <?php include 'config.php'; db_connect(); check_login(); // pobieramy dane usera $user_data = get_user_data(); db_close(); ?> </div> </div> </body> </html>
Plik CSS:
CODE
body{
background-color: gray;
}
#calosc{
margin-left:auto;
margin-right:auto;
width: 1000px;
height:730px;
background-color:lightblue;
}
#logo{
width: 1000px;
height:150;
background-color:blue;
}
#menu{
width: 980px;
height:50;
background-color:red;
margin-top:10px;
margin-left:auto;
margin-right:auto;
}
#tresc{
width: 980px;
height:450px;
background-color:yellow;
margin-top:10px;
margin-left:auto;
margin-right:auto;
}
#stopka{
width: 980px;
height:50px;
background-color:green;
margin-top:10px;
margin-left:auto;
margin-right:auto;
}
background-color: gray;
}
#calosc{
margin-left:auto;
margin-right:auto;
width: 1000px;
height:730px;
background-color:lightblue;
}
#logo{
width: 1000px;
height:150;
background-color:blue;
}
#menu{
width: 980px;
height:50;
background-color:red;
margin-top:10px;
margin-left:auto;
margin-right:auto;
}
#tresc{
width: 980px;
height:450px;
background-color:yellow;
margin-top:10px;
margin-left:auto;
margin-right:auto;
}
#stopka{
width: 980px;
height:50px;
background-color:green;
margin-top:10px;
margin-left:auto;
margin-right:auto;
}