Het probleem is als volgt:
Ik ben bezig met een webpagina met dynamische content.Voor het uitlijnen van deze content maak ik gebruik van DIV's. Nu heb ik alles op papier uitgewerkt en de zaak in elkaar gedraait. Helaas werkt het zowel in IE als in FF niet:
Internet explorer:

Firefox:

Het CSS bestand:
De index pagina:
Include"show_products.inc":
Excuus voor de lange code.. maar ik begrijp echt niet wat ik fout doe.
Ik ben bezig met een webpagina met dynamische content.Voor het uitlijnen van deze content maak ik gebruik van DIV's. Nu heb ik alles op papier uitgewerkt en de zaak in elkaar gedraait. Helaas werkt het zowel in IE als in FF niet:
Internet explorer:

Firefox:

Het CSS bestand:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
| .head_cont{width:100%;clear:both;}
.head_left{float:left; background:white;}
.head_right{background:white;text-align:right;}
.product_bar_left{margin-left:1px;margin-top:1px;float:left;width:60px;height:80px;border-style: solid; border-color:#000000; border-width:2px;}
.product_bar_right{height: 84px;margin-left: 1px;margin-right;margin-top: 1px;}
.product_bar_image{vertical-align:middle;width:60px;height:80px;}
.product_bar_container{width:100%;}
.detail_bar_left{text-align:center;margin-left:1px;margin-top:1px;width: 180px; height: 241px;float:left;}
.detail_bar_right{height: 241;margin-left:1px;margin-top:1px;background-color:#cccccc;}
.detail_bar_in{float:left;margin-left:0px;margin-top:210px;background-color:#cccccc;}
.detail_bar_rb{text-align:right;float:right;margin-right:5px;margin-top:3px;width:100px;background-color:#cccccc;}
.detail_bar_image{vertical-align:middle;width:180px;height:241px;}
.general_layout_cont{width:100%;}
.general_layout_left{float:left; width:200px;margin-top:1px;background-color:#cccccc;}
.general_layout_right{margin-left:200px;}
.catagory_links{color:black;text-decoration:none;}
.price_normal{color:black;text-decoration:none;font-size:20px;}
.price_offer {color:red;text-decoration:line-through;font-size:16px;}
.price_normal_product_view{color:black;text-decoration:none;font-size:16px;}
.price_offer_product_view {color:red;text-decoration:line-through;font-size:16px;}
.top_line{float:left;width:100%;height:22px;margin-top:1px;background:black;clear:both;}
.top_line_font{color:#ffffff; font-weight:bold;}
.foot{float:left; width:100%;background:black;clear:both;margin-top:1px;text-align:right;} |
De index pagina:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
| <html>
<head>
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
?>
<link rel="stylesheet" type="text/css" href="style.css" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/><title>Weapon Master - The Online weapon catalog</title></head>
<body>
<div class="head_cont">
<div class="head_left">[img]"_graphics/logo_left.jpg"/></div>
<div[/img][img]"_graphics/logo_right.jpg"/></div>
</div>
<div[/img]<font class="top_line_font"> Catagories</font></div>
<div class="general_layout_left"><br /><b><?php include"show_catagories.php"; ?></b></div>
<div class="general_layout_right">
<?php
if($action=="moreinfo")
{
include"moreinfo.php";
} else
{
include"show_products.inc";
}
?></div>
<div class="foot">[img]"_graphics/footer.jpg"/></div>
</body>
</html[/img] |
Include"show_products.inc":
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
| <?php
$con=mysql_connect("127.0.0.1","root","") or die("could not connect to the database");
$res=mysql_select_db("store");
if($catag)
{} else
{
$query="SELECT cat_name,product_id FROM catagories GROUP BY cat_name ASC";
$result=mysql_query($query);
$data=mysql_fetch_array($result);
$catag=$data[cat_name];
}
if ($catag=="all_products") { $query="SELECT * FROM product order by product_name ASC"; }
if ($catag=="all_offers") { $query="SELECT * FROM product WHERE BIT_LENGTH(price_offer)>0 order by product_name ASC"; }
if ($catag<>"all_products" AND $catag<>"all_offers"){ $query="SELECT * FROM catagories WHERE cat_name='".$catag."' ORDER BY product_id"; }
$result=mysql_query($query);
while($data=mysql_fetch_array($result))
{
if ($data[product_id]<>0)
{
$query="SELECT * FROM product WHERE product_id='".$data[product_id]."'";
$result2=mysql_query($query);
$data2=mysql_fetch_array($result2);
if ($colu=="#CCCCCC") { $colu="#DDDDDD"; } else { $colu="#CCCCCC"; }
echo'<div class="product_bar_container">';
echo'<div class="product_bar_left" style="background-color: '.$colu.';">';
echo'[img]"/sport/_shoppic/'.$data2[product_id].'.jpg?un='.time().'"[/img]</div>';
echo'<div class="product_bar_right" style="background-color: '.$colu.';">';
echo'<b> '.$data2[product_name];
if ($data2[size])
{
echo " Size ".$data2[size]."</b>";
} else
{
echo '</b>';
}
echo '<br/> '.$data2[product_descr_short].'<br/>';
if($data2[price_offer])
{
echo' <font class="price_offer_product_view"> € '.$data2[price].'</font> ';
echo' <font class="price_normal_product_view"> € '.$data2[price_offer].'</font><br/>';
} else
{
echo' <font class="price_normal_product_view"> € '.$data2[price].'</font><br/>';
}
echo' <a href="index.php?action=moreinfo&product_id='.$data[product_id].'"><img src="_graphics/more_info.gif" width="97"
height="21" border="0"/></a>[img]"_graphics/add_to_cart.gif"[/img]</div></div>';
}
}
?> |
Excuus voor de lange code.. maar ik begrijp echt niet wat ik fout doe.
[ Voor 16% gewijzigd door iznogood op 27-07-2005 12:15 ]
Just as Good