![]() |
|
||||||
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hi, Can anybody help please?
I have amended the page.php to create 5 product pages, but i can't understand why in the <h2> header in the products section has doubled in height, whereas the <h2> header in the sidebar is as the size I expect. It's not so bad in FF, but in ie7 the back ground colour spills outside the postarea <div> and up under the breadcrumb navigation. vist this page to illustrate it best http://www.partydressesandmore.co.uk/dress-store/ Code:
excerpt (Template_Dresses.php)
<?php
/*
Template Name: Store
*/
?>
<?php get_header(); ?>
<div id="content">
<div id="contentleft">
<div class="postarea">
<?php include(TEMPLATEPATH."/breadcrumb.php");?>
<?php...
(code for page pagination)
...?>
<?php
echo "<h2>Dress Store</h2>";
echo "<table id='shop' cellspacing='5px'>";
//$sql="SELECT * FROM dresses";
//$result= mysql_query($sql);
//while ($data=mysql_fetch_assoc($result)){
//echo "".$data['Product']."";
//}
// Check result
// This shows the actual query sent to MySQL, and the error. Useful for debugging.
if (!$result) {
$message = 'Invalid query: ' . mysql_error() . "\n";
$message .= 'Whole query: ' . $query;
die($message);
}
// Use result
// Attempting to print $result won't allow access to information in the resource
// One of the mysql result functions must be used
// See also mysql_result(), mysql_fetch_array(), mysql_fetch_row(), etc.
while ($data = mysql_fetch_array($result))
{
extract($data);
echo "<tr>\n";
echo "<td align='center'>
<span id='shopDescription'>" . $data['product']. "</span>
<img src=\"" . $data['image'] . "\" id='image' alt=\"" . "\">
";
echo "<span id='price'> Price: £".$data['price'].
"</span></td>";
$data = mysql_fetch_array($result);
echo "<td align='center'>
<span id='shopDescription'>" . $data['product']. "</span>
<img src=\"" . $data['image'] . "\" id='image' alt=\"" . "\" >
";
echo "<span id='price'> Price: £".$data['price'].
"</span></td>";
$data = mysql_fetch_array($result);
echo "<td align='center'>
<span id='shopDescription'>" . $data['product']. "</span>
<img src=\"" . $data['image'] . "\" id='image' alt=\"" . "\" >
";
echo "<span id='price'> Price: £".$data['price'].
"</span></td>";
echo "</tr>\n";
}
echo "</table>\n";
echo "<hr size='1'>\n";
?>
<div id="pag"> <?=$pagination?> </div>
</div>
</div>
<?php include(TEMPLATEPATH."/sidebar.php");?>
</div>
<?php get_footer(); ?>
Code:
excerpt (style.css)
#content h2 {
background: #cc0000;
color: #FFFFFF;
text-indent: 2%;
font-size: 14px;
font-family: Arial, Tahoma, Verdana;
font-weight: bold;
margin: 0px 0px 10px 0px;
padding: 0px;
}
Thanks Paul |
| Thread Tools | |
| Display Modes | |
|
|
© Copyright 2012 Copyblogger Media LLC · StudioPress™ is a trademark of Copyblogger Media LLC
Privacy Policy | Refund Policy | Terms of Service | Affiliate Program | Contact Us