inserting into rows and columns
Posted: Sun Feb 20, 2005 4:26 pm
i am fairly new to php and i have a minor problem and was wondering if any1 can give me some advice or some code would go down nicely.
my problem is that i am inserting some images into my webpage, that is working fine but i want my images to be inserted along side each other but only three along side each other and then when a fourth image is inserted it is inserted below the first one but my code is inserting images directly under each other all the time i want something like this
but at the moment it is doing this
image
image
image
image
etc
this is the code for my whole page
can some one please help????????????
thanks in advance
p.s some code would be really helpful
feyd | please use
my problem is that i am inserting some images into my webpage, that is working fine but i want my images to be inserted along side each other but only three along side each other and then when a fourth image is inserted it is inserted below the first one but my code is inserting images directly under each other all the time i want something like this
Code: Select all
image image image
image image image and etcbut at the moment it is doing this
image
image
image
image
etc
this is the code for my whole page
Code: Select all
<html>
<head>
<title>Hanover Furniture</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<STYLE type="text/css">
<!--
A {
text-decoration:none;
font-weight: bold;
}
A:hover { color:#FF8000 }
.style1 {font-weight: bold}
-->
</STYLE>
<link href="nav.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
a:link {
color: #000000;
}
.style5 {color: #000000}
-->
</style>
</head>
<body bgcolor="#FEFCD3" vlink="white" alink="blue">
<?php
require("dbcon.php");
?>
<div id="Layer1" style="position:absolute; left:10px; top:49px; width:171px; height:22px; z-index:1"><span class="style1"><font size="5" color="#0000FF">HANOVER</font><font size="5" color="#0099FF">FURNITURE</font><font size="4"></font></span></div>
<p>&nbsp;</p>
<div id="Layer2" style="position:absolute; width:200px; height:43px; z-index:8; left: 441px; top: 12px;">
<table width="203" height="36" border="0">
<tr>
<td height="30"><div align="center" bgcolor="white">
<p class="style5">Quick Find </p>
</div></td>
</tr>
</table>
</div>
<div id="Layer36" style="position:absolute; width:23px; height:25px; z-index:28; left: 608px; top: 50px;"><img src="go.gif" width="21" height="21"></div>
<div id="Layer37" style="position:absolute; width:160px; height:25px; z-index:29; left: 463px; top: 50px;">
<form name="form1" method="post" action="">
<input type="text" name="textfield">
</form>
</div>
<p><br>
</p>
<div id="Layer11" style="position:absolute; width:646px; height:52px; z-index:10; left: 17px; top: 122px;" class="nav">
<div align="center">View our exclusive range of designer fabric sofas available from our showroom. To find out more about each particular sofa click on the sofa or the link.</div>
</div>
<table width="644" height="29" border="0" cellpadding="0" cellspacing="0">
<tr align="right">
<td width="800" bgcolor="#606060">
<div align="right" class="nav"><a href="main frame.php"> <strong></strong>Home |</a> <a href="furniturelink.php">Furniture |</a> <a href="feedback.php" >Feedback |</a> <a href="contactus.php">Contact Us </a> </a> </div></td>
</tr>
</table>
<br>
<br><br>
<?php
// Request the text from database
$result = mysql_query(
"SELECT sofa_image,sofa_name FROM sofas");
if (!$result) {
echo("<P>Error performing query: " .
mysql_error() . "</P>");
exit();
}
print '<table width="694" height="187" border="0" cellpadding="0" cellspacing="0">';
while($row = @ mysql_fetch_row($result))
{
$imgdir = 'http://linux2.inf.brad.ac.uk:59285/Unnamed%20Site%201/images/' . $rowї0];
$imgdir2 = 'http://linux2.inf.brad.ac.uk:59285/Unnamed%20Site%201/moreinfologo.gif';
//$link = '<a href= "http://lamp.inf.brad.ac.uk:59285/Unnamed%20Site%201/sofa%20pages/1111.php=' . $more . '"></a>';
$more = "<img width='65' height='15' border='0' src=$imgdir2 >";
print '<tr>';
print "<td width='214' height='133'><img width='213' height='132' border='0' src=$imgdir ></td>";
print '<td width="214"></td>';
print '<td width="214"></td>';
print '</tr>';
print '<tr>';
print '<td height="21"><div align="left" class="nav">' . $rowї1] . ' ' . $more . ' </td>';}
print "<td></td>";
print '<td></td>';
print '</tr>';
print '</table>';
?>
</html>can some one please help????????????
thanks in advance
p.s some code would be really helpful
feyd | please use
Code: Select all
tags while theCode: Select all
tags are offline[/color]