Hi,
I am fairly new to using PHP and Dreamweaver together and I have placed the included code in my document and I have noticed that the PHP generated table, div or anything else is always shifting down in IE and FireFox as well. Why?..and what is the solution to display and position
dynamic content correctly inside the “content” div without unexpected shifting and having control of it. In this scenario I just want the table to start at the top as if I would type something in a div instead of displaying it much lower.
Thank you in advance.
jim
<!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” lang=“en-US”>
<head>
<title>Welcome to the library!</title><meta http-equiv=“content-type” content=“text/html; charset=utf-8” />
<style type=“text/css”>
body {
background-color: #CCD3D9;
color: #000000;
text-align: center;
}
#content {
width: 800px;
height: 1000px;
margin-left: auto;
margin-right: auto;
border: 2px solid #A6B2BC;
background-color: #FFFFFF;
color: #000000;
margins: 0 20px 0 20px;
text-align: left;
}
#TableResult {
width: 750px;
height: 900px;
margin-left: auto;
margin-right: auto;
background-color: #FFFFFF;
color: #000000;
text-align: left;
border-collapse:collapse;
}
#TableResult td {
padding: 0.7em 0.5em 0.5em 0.8em;
border: 2px solid #A6B2BC;
background-color: #CCFFCC;
}
</style>
</head>
<body>
<div id=“content”>
<?
include(“library_browse.php”);
?>
</div>
</body>
<!-- the code below is the PHP content in “library_browse.php”–>
<?include(“database.php”);
$result = mysql_query(“SELECT * FROM library”);
print ("<TABLE id=“TableResult”>");
print ("<TR><TD colspan=“7” >Available Books</TD></TR><BR>");
print ("<TR> <TD> ID </TD> <TD > Title </TD> <TD > Author </TD> <TD > Year </TD> <TD > Delete </TD></TD>");
print ("<TR><TD colspan=“7” >Please click the title for more information.</TD></TR><BR>");
while($row = mysql_fetch_array($result)) {
print (" <TR><TD >$row[id] </TD> <TD ><A href=“browseb.php?id=$row[id]”>$row[title] </A></TD> <TD >$row[author] </TD> <TD >$row[year] </TD><TD ><A href=“delete.php?id=$row[id]”>Delete </A></TD></TR><BR>");
}
print ("</TABLE>");
mysql_close($linkID);?>