/    Sign up×
Community /Pin to ProfileBookmark

Problem displaying page in Explorer

Hello everyone,

I am really really need your help.I have spend so many hours to find the problem but still nothing.
Ok the problem I need help is with the design of a page I have developed including php code.
When I run the following code in Firefox it displays perfect as it has to be but when I open with internet explorer
it is not display it correct as it displays many gaps between the rows.

[code=html]
<table width=”725″ align=”center” >
<tr>
<td width=”77″ rowspan=”4″>home</td>
<td width=”154″ height=”68″><img src=”giftmatching.jpg” width=”154″ height=”66″ /></td>
<? $sqlcolour = “Select * from Items where Items.itemID=’$itemID'”;
$rscolour=mysql_query($sqlcolour);
$num=mysql_num_rows($rscolour);

$c=0;
while ($c<$num){
$ref=mysql_result($rscolour,$c,”ref”);
?>
<td width=”154″ height=”198″ rowspan=”3″><img src=”/large_<? echo $image_large; ?>” width=”154″ height=”198″></td>

<td width=”154″ height=”68″>
<span class=”brandname”><? echo $brand; ?></span>
<br/>
<span class=”generalfont”><? echo $descr; ?></span></td>

<!–start of the last column(5th)–>
<td width=”154″ height=”264″ rowspan=”4″>
<form name=”search” method=”post” action=”test.php”>
<table width=”161″ align=”center”>
<tr>
<td width=”155″ height=”24″> <select name=”kids” >
<option selected value=”kids”> Kids</option>
<? $querykids=”select DISTINCT Kids.kid_category from Items where Kids.kidID=Items.kidID”;
$rskids=mysql_query($querykids);
while ($rowkids=mysql_fetch_array($rskids)){
echo “<option>$rowkids[kid_category]</option>”;
} ?>
</select></td>
</tr>
<tr>
<td width=”155″ height=”18″><select name=”brands” >
<option selected value=”brands”>Brands</option>
<? $querybrands=”select DISTINCT Brands.brand_name from Items
where Brands.brandID=Items.brandID “;
$rsbrands=mysql_query($querybrands);
while ($rowbrands=mysql_fetch_array($rsbrands)){
echo “<option>$rowbrands[brand_name]</option>”;
} ?>
</select></td>
</tr>
<tr>
<td width=”155″ height=”21″><select name=”category” >
<option selected value=”category”>Category</option>
<? $querycategory=”select DISTINCT Categories.categoryname from Items where
Items.categoryID=Categories.categoryID and Items.kidID=’4′”;
$rscategory=mysql_query($querycategory);
while ($rowcategory=mysql_fetch_array($rscategory)){
echo “<option>$rowcategory[categoryname]</option>”;
} ?>
</select></td>
</tr>
<tr>
<td height=”66″ width=”155″ align=”center”><input name=”submit” type=”image” id=”submit”
src=”/babyfind.jpg”></td>
</tr><tr><td height=”66″ width=”155″><a href=”checkout.php”><img src=”boycheckout.jpg”
alt=”checkout” border=”0″ /></a></td>
</tr>

<tr>
<td height=”68″ width=”155″><a href=”test.php”><img src=”boyback.jpg” border=”0″
onclick=”history.go(-1)”/></a></td>
</tr>
</table>
</form> </td>
<!– end of the rowspan –>
</tr>
<tr><!– end of the 5th column–>

<td height=”66″ width=”154″><!–start matching item 1 –>
<table width=”154″ height=”66″>
<? $query1=”select * from Items where image_small=’$matching1′”;
$rs1=mysql_query($query1);
$row1=mysql_fetch_array($rs1);
?>

<tr>
<td rowspan=”4″ height=”66″>
<form action=”matching_items.php” method=”get”><input name=”submit” type=”image” id=”submit”
src=”i/small_<? echo $matching1; ?>” alt=”matching one” />
<input name=”matchingID” type=”hidden” value=”<? echo $row1[‘itemID’]; ?>” />
</form></td>
<td height=”33″><span class=”brandname”><? echo $brand; ?></span></td>
</tr>
<tr>
<td height=”33″><span class=”generalfont”>&pound;<? echo $price; ?></span></td>
</tr>
</table>
<!– end matching item 1–></td>

<td height=”66″ width=”154″ ><span class=”generalfont”><? echo $size; ?></span>
<span class=”generalfont”><? echo $colour; ?></span><span class=”generalfont”><? echo $category; ?></span></td>
</tr>

<tr>
<td height=”66″ width=”154″>

<!–start matching item 2 –>
<table width=”154″ height=”66″>
<? $query2=”select * from Items where image_small=’$matching2′”;
$rs2=mysql_query($query2);
$row2=mysql_fetch_array($rs2);
//echo “item matchin:”. $row1[‘itemID’];
?>
<tr>
<td rowspan=”4″ ><form action=”matching_items.php” method=”get”><input name=”submit” type=”image” id=”submit”
src=”small_<? echo $matching2; ?>” alt=”matching two” />
<input name=”matchingID” type=”hidden” value=”<? echo $row1[‘itemID’]; ?>” />
</form></td>
<td height=”33″><span class=”brandname” ><? echo $brand; ?></span></td>
</tr>

<tr>
<td height=”33″><span class=”generalfont”>&pound;<? echo $price; ?></span></td>
</tr>
</table>

<!– end matching item 2–></td>
<td rowspan=”2″ width=”154″ height=”132″>
<form action=”addtobasket.php” method=”post”>

<table width=”154″ height=”132″ >
<tr>
<td width=”101″><label class=”generalfont”>SIZE</label>
<select name=”size” class=”selectcriteria”>
<? $querysizeselect=”select DISTINCT Items.size from Items where Items.ref=’$ref'”;
$rssizeselect=mysql_query($querysizeselect);
while ($rowsizeselect=mysql_fetch_array($rssizeselect)){
echo “<option>$rowsizeselect[size]</option>”;
}
?>
</select> </td>
</tr>
<tr>
<td height=”34″><label class=”generalfont”>QTY</label>
<select name=”qty” class=”selectcriteria”>
<option value=”1″>1</option>
<option value=”2″>2</option>
<option value=”3″>3</option>
<option value=”4″>4</option>
<option value=”5″>5</option>
<option value=”6″>6</option>
<option value=”7″>7</option>
<option value=”8″>8</option>
<option value=”9″>9</option>
</select>

<input name=”descrdetails” type=”hidden” value=”<? echo $descr; ?>” />
<input name=”categorydetails” type=”hidden” value=”<? echo $category; ?>” />
<input name=”imagedetails” type=”hidden” value=”<? echo $image; ?>” />
<input name=”itemIDdetails” type=”hidden” value=”<? echo $itemID; ?>” /></td>
</tr>

<tr>
<td> <input name=”refdetails” type=”hidden” value=”<? echo $ref; ?>” />
<input name=”colourdetails” type=”hidden” value=”<? echo $colour; ?>” />
<input name=”branddetails” type=”hidden” value=”<? echo $brand; ?>” />
<?
$c++;
}?></td>
</tr>
<tr><td height=”26″ >
<input type=”submit” name=”Submit” value=”add to basket” /></td>
</table>
</form> <!–</td>–><!– end to display the details of the specifc info–> </td>
</tr>
<tr>
<td height=”66″ width=”154″>

<!–start matching item 3 –>
<table width=”154″ height=”76″ >
<? $query3=”select * from Items where image_small=’$matching3′”;
$rs3=mysql_query($query3);
$row3=mysql_fetch_array($rs3);
//echo “item matchin:”. $row1[‘itemID’];
?>
<tr>
<td rowspan=”4″ height=”66″><form action=”matching_items.php” method=”get”>
<input name=”submit2″ type=”image” id=”submit2″
src=”small_<? echo $matching3; ?>” alt=”matching three” />
<input name=”matchingID2″ type=”hidden” value=”<? echo $row1[‘itemID’]; ?>” />
</form></td>
<td height=”35″><span class=”brandname” ><? echo $brand; ?></span></td>
</tr>
<tr>
<td height=”33″><span class=”generalfont”>&pound;<? echo $price; ?></span></td>
</tr>
</table>
<!– end matching item 3–></td>
<td height=”68″ width=”154″><!–the add item function–></td>
<!– end div–>
</tr>
</table>

[/code]

I would really appreciate any help and any mistake that you think might cause this problem.

Thank you,
Xenia

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@NogDogMay 23.2006 — Try adding this to the <style> block or external stylesheet for the page:
<i>
</i>td img {
display: block;
}
Copy linkTweet thisAlerts:
@chickenlandMay 23.2006 — try setting cellpadding=0 and cellspacing=0 explicitly.
Copy linkTweet thisAlerts:
@xeniaauthorMay 23.2006 — I tryied both methods but still not working
Copy linkTweet thisAlerts:
@NogDogMay 24.2006 — Might be easier to solve if we could see the resulting HTML page.
Copy linkTweet thisAlerts:
@xeniaauthorMay 24.2006 — Ok I will upload two images the first is how I want to do the design(default.jpg) and the second what I have done(mydesign.jpg).

As you can see the problem is with the first and second coloumn that has the back to home and the matching items. Both columns is not displayed at the same line as the search criteria and the large image. Under the matching items image the three cells display them bigger than it is.

The images matching item,find me, checkout ,backlist have dimensions width:154 height:66.I also want every cell to have the same dimensions as the images I mention before.

I will post also my code and I would reaaly really appreciate your help.

[code=html]<table width="725" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="77" rowspan="4" class="generalborder">HOME</td>
<td width="154" height="66"><img src="boymatching.jpg" alt="matching items"/></td>
[/code]


[code=php] <!-- start to display the details of the specifc info-->
<? $sqlcolour = "Select * from Items where Items.itemID='$itemID'";


$rscolour=mysql_query($sqlcolour);
$num=mysql_num_rows($rscolour);

$c=0;
while ($c<$num){
$itemID=mysql_result($rscolour,$c,"itemID");
$brand=mysql_result($rscolour,$c,"brand_name");
$colour=mysql_result($rscolour,$c,"colour");
$category=mysql_result($rscolour,$c,"categoryname");
$size=mysql_result($rscolour,$c,"size");
$price=mysql_result($rscolour,$c,"price");
$image=mysql_result($rscolour,$c,"image_small");
$image_large=mysql_result($rscolour,$c,"image_large");
$matching1=mysql_result($rscolour,$c,"matching1");
$matching2=mysql_result($rscolour,$c,"matching2");
$matching3=mysql_result($rscolour,$c,"matching3");
$descr=mysql_result($rscolour,$c,"description");
$ref=mysql_result($rscolour,$c,"ref");
?>
[/code]

[code=html]<td width="154" rowspan="3">
<img src="large_<? echo $image_large; ?>" width="177" ></td>


<td width="154" >
<span class="brandname"><? echo $brand; ?></span>
<br/><span class="generalfont"><? echo $descr; ?></span></td>


<!--start of the last column(5th)-->
<td width="154" rowspan="4">
<form name="search" method="post" action="test.php">
<table width="161" cellpadding="0" cellspacing="0">
<tr>
<td width="154" > <select name="kids" >
<option selected value="kids"> Kids</option>
<? $querykids="select DISTINCT Kids.kid_category from Items,Kids where Kids.kidID=Items.kidID";
$rskids=mysql_query($querykids);
while ($rowkids=mysql_fetch_array($rskids)){
echo "<option>$rowkids[kid_category]</option>";
} ?>
</select></td>
</tr>
<tr>
<td width="154" ><select name="brands" >
<option selected value="brands">Brands</option>
<? $querybrands="select DISTINCT Brands.brand_name from Items,Brands
where Brands.brandID=Items.brandID ";
$rsbrands=mysql_query($querybrands);
while ($rowbrands=mysql_fetch_array($rsbrands)){
echo "<option>$rowbrands[brand_name]</option>";
} ?>
</select></td>
</tr>
<tr>
<td width="154" ><select name="category" >
<option selected value="category">Category</option>
<? $querycategory="select DISTINCT Categories.categoryname from Items, Categories where
Items.categoryID=Categories.categoryID and Items.kidID='4'";
$rscategory=mysql_query($querycategory);
while ($rowcategory=mysql_fetch_array($rscategory)){
echo "<option>$rowcategory[categoryname]</option>";
} ?>
</select></td>
</tr>
<tr>
<td width="154" align="center"><input name="submit" type="image" id="submit"
src="babyfind.jpg"></td>
</tr><tr><td width="154"><a href="checkout.php"><img src="boycheckout.jpg"
alt="checkout" border="0" /></a></td>
</tr>

<tr>
<td width="154"><a href="test.php"><img src="boyback.jpg" border="0"

onclick="history.go(-1)"/></a></td>
</tr>
</table>
</form> </td>
<!-- end of the rowspan -->
</tr>
<tr><!-- end of the 5th column-->


<td width="154" ><!--start matching item 1 -->
<table width="154" cellpadding="0" cellspacing="0" class="generalborder">
<? $query1="select * from Items where image_small='$matching1'";
$rs1=mysql_query($query1);
$row1=mysql_fetch_array($rs1);
?>

<tr>
<td rowspan="4" >
<form action="matching_items.php" method="get"><input name="submit" type="image" id="submit"

src="small_<? echo $matching1; ?>" alt="matching one" />
<input name="matchingID" type="hidden" value="<? echo $row1['itemID']; ?>" />
</form></td>
<td ><span class="brandname"><? echo $brand; ?></span></td>
</tr>
<tr>
<td ><span class="generalfont">&pound;<? echo $price; ?></span></td>
</tr>
</table>
<!-- end matching item 1--></td>

<td width="154" ><span class="generalfont"><? echo $size; ?></span>
<span class="generalfont"><? echo $colour; ?></span><span class="generalfont"><? echo $category; ?></span></td>
</tr>

<tr>
<td width="154" >

<!--start matching item 2 -->
<table width="154" class="generalborder" cellpadding="0" cellspacing="0">
<? $query2="select * from Items where image_small='$matching2'";
$rs2=mysql_query($query2);
$row2=mysql_fetch_array($rs2);
//echo "item matchin:". $row1['itemID'];
?>
<tr>
<td rowspan="4" ><form action="matching_items.php" method="get"><input name="submit" type="image" id="submit"

src="small_<? echo $matching2; ?>" alt="matching two" />
<input name="matchingID" type="hidden" value="<? echo $row1['itemID']; ?>" />
</form></td>
<td ><span class="brandname" ><? echo $brand; ?></span></td>
</tr>

<tr>
<td ><span class="generalfont">&pound;<? echo $price; ?></span></td>
</tr>
</table>


<!-- end matching item 2--></td>
<td rowspan="2" >
<form action="addtobasket.php" method="post">

<table width="154" >
<tr>
<td width="101"><label class="generalfont">SIZE</label>
<select name="size" class="selectcriteria">
<? $querysizeselect="select DISTINCT Items.size from Items where Items.ref='$ref'";
$rssizeselect=mysql_query($querysizeselect);
while ($rowsizeselect=mysql_fetch_array($rssizeselect)){
echo "<option>$rowsizeselect[size]</option>";
}
?>
</select> </td>
</tr>
<tr>
<td ><label class="generalfont">QTY</label>
<select name="qty" class="selectcriteria">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
</select>

<input name="descrdetails" type="hidden" value="<? echo $descr; ?>" />
<input name="categorydetails" type="hidden" value="<? echo $category; ?>" />
<input name="imagedetails" type="hidden" value="<? echo $image; ?>" />
<input name="itemIDdetails" type="hidden" value="<? echo $itemID; ?>" /></td>
</tr>

<tr>
<td> <input name="refdetails" type="hidden" value="<? echo $ref; ?>" />
<input name="colourdetails" type="hidden" value="<? echo $colour; ?>" />
<input name="branddetails" type="hidden" value="<? echo $brand; ?>" />
<?
$c++;
}?></td>
</tr>
<tr><td >
<input type="submit" name="Submit" value="add to basket" /></td>
</table>
</form> <!--</td>--><!-- end to display the details of the specifc info--> </td>
</tr>
<tr>
<td width="154" >

<!--start matching item 3 -->
<table width="154" class="generalborder" cellpadding="0" cellspacing="0">
<? $query3="select * from Items where image_small='$matching3'";
$rs3=mysql_query($query3);
$row3=mysql_fetch_array($rs3);
//echo "item matchin:". $row1['itemID'];
?>
<tr>
<td rowspan="4" ><form action="matching_items.php" method="get">
<input name="submit2" type="image" id="submit2"
src="ismall_<? echo $matching3; ?>" alt="matching three" />
<input name="matchingID2" type="hidden" value="<? echo $row1['itemID']; ?>" />
</form></td>
<td><span class="brandname" ><? echo $brand; ?></span></td>
</tr>
<tr>
<td ><span class="generalfont">&pound;<? echo $price; ?></span></td>
</tr>
</table>
<!-- end matching item 3--></td>
<td width="154"><!--the add item function--></td>
<!-- end div-->
</tr>
</table>
[/code]


Thank you again and sorry for the big code.

[upl-file uuid=adb19187-0e2d-4f0d-94c2-b082c9e5af98 size=60kB]defaultdesign.jpg[/upl-file]

[upl-file uuid=929de4e4-0e06-4baf-9504-6484470c83a5 size=50kB]mydesign.jpg[/upl-file]
×

Success!

Help @xenia spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.6,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...