Ik heb weer eens een probleem met de website die ik op het moment zit te maken, ik heb namelijk in mijn css ingevuld: "min height: 100px;" maar blijkbaar herkent hij de producten die in oproep uit mijn database niet zie maar:
[img]http://s21.postimg.org/88t9xwimr/probleem.jpg[/img]
(bovenste rode vierkant is de body, onderste is de footer)
Eigenlijk hoort de height van de body zich aan te passen aan de inhoud van de body maar dit doet hij opeens niet meer, op andere pagina's gebruik ik dezelfde CSS maar daar zijn geen problemen, kan iemand mij aub helpen?
De CSS code begint op regel 1
De HTML code op regel 11
De include staat op regel 36
en de PHP code begint op regel 46
[code]
CSS code:
.BODY{
background:white;
width: 900px ;
min-height: 300px;
margin-left: auto ;
margin-right: auto ;
margin-top: 0px;
}
De HTML code waarin de include staat op regel
<?php session_start(); ?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Webshop</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body>
<?php
if (isset($_SESSION['email'])) {
include 'includes/header_ingelogd.php';
} else {
include 'includes/header.php';
}
?>
<div class="BODY">
</br>
<h1>  Aanbevolen producten</h1>
<?php include("hoofdpagina.php");?>
</div>
</div>
<?php include 'includes/productfooter.php'; ?>
</body>
</html>
De php code:
<?php
include 'includes/connectie.php';
?>
<?php
$sql="SELECT * FROM `producten` LIMIT 8 ";
$sql_result = $dbh -> query ($sql);
foreach($sql_result as $row)
{
$prijs=$row['prijs'];
$product_naam=$row['product_naam'];
$product_specificaties=$row['product_specificaties'];
$foto=$row['foto'];
$product_id=$row['product_id'];
echo " <div class='product'>
<div><center><h2>$product_naam</h2></center></div>
<center><a href='product.php?id=$product_id'><img src='$foto'></a></center>
<div class='kopen'>
<a href='product.php?id=$product_id'><img src='kopen.png'></a>
</div>
<div><h3>  $prijs euro</h3></div>
</div>";
}
?>
1.624 views