0
データベースからのデータを含むテーブルがプッシュダウンされ、フッタに固定されます。私はそれをどうやって取得し、私のフッターに固執するかわからない。データテーブルがプッシュダウンされる
if ($result->num_rows > 0) {
echo "<table style='border: solid 1px grey; margin-left: auto; margin-right: auto; margin-top: -20px;'><th>Film titel</th><th>Film genre</th>";
// output data of each row
while($row = $result->fetch_assoc()) {
echo "<tr><td>" . $row["film_titel"]. "<td> " . $row["genre"]. "</td></td></tr><br>";
}
echo "</table>";
} else {
echo "0 results";
}
フッターのCSS:
footer {
position: absolute;
left: 0;
bottom: 0;
height: 100px;
width: 100%;
font-family: 'Roboto', sans-serif;
/* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#619b28+0,427768+100 */
background: #619b28; /* Old browsers */
background: -webkit-linear-gradient(left, #619b28 0%, #427768 100%);
background: -o-linear-gradient(left, #619b28 0%, #427768 100%);
background: linear-gradient(to right, #619b28 0%, #427768 100%); /* FF3.6-15 */
/* Chrome10-25,Safari5.1-6 */
/* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#619b28', endColorstr='#427768',GradientType=1); /* IE6-9 */
}
下端を取り除く:cssから0。 – santhosh
どのようにしてテーブルが非常に低いデータを出力するのですか?それについて何かするべきことはありますか? – Russell
あなたの問題に関連していないかもしれませんが、 '
答えて
あなたのHTMLの構文エラーがあります。
<th>
要素はまた、第一</tr>
後<br>
を入れる理由はない別の<td>
要素<tr>
で囲む必要があります。validator.w3.orgを使用して、HTML間違いを見つけようとするとよいでしょう。
出典
2017-04-17 10:52:05
関連する問題