Message-Id: <200508270631.j7R6VEEg013143@xxxxxxxxxxxxxxxxxxxxxxxxxx>
From: "Chris Payne" <chris@xxxxxxxxxxxx>
To: <php-db@xxxxxxxxxxxxx>
Date: Sat, 27 Aug 2005 02:31:13 -0700
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0000_01C5AAAF.64FE18E0"
Subject: DB formatting question
Hi there everyone,
I'm converting a video website from CGI to use Databases and they want me to
keep their existing layout. However, I have a slight formatting problem.
This is a HTML problem (not PHP or MySQL or even video problem !)
Each page displays 6 videos, 2 are on the first row (Which has 3 columns
with the 2nd one being a hardcoded flash video) so the first 2 videos go on
the left and on the right, then below that is another row with 4 columns
which have to display the other 4 videos.
How can I format the table so that when the MySQL data is read in the loop,
MySQL is unrelated to this, just store the video in 6 variables and
populate the table cells with the HTML from those.
Any basic tutorial on HTML can show you how to layout rows and columns.
but it needs to be 3 columns across on 1 row with the middle column not
having any MySQL data and the 2nd row needs to have 4 videos, 1 in each of
the 4 columns.
So like this : (OK ok nested tables aren't elegant, you could use CSS and
DIVs instead)
<!-- Start layout table -->
<table width="100%" border="0" cellspacing="2" cellpadding="2">
<tr id="row1">
<td width="33%"><?=$video_1_html?></td>
<td width="33%"> </td>
<td width="33%"><?=$video_2_html?></td>
</tr>
<tr id="row2">
<td colspan="3">
<!-- Start inner video layout table -->
<table width="100%" border="0" cellspacing="0"
cellpadding="2">
<tr>
<td
width="25%"><?=$video_3_html?></td>
<td
width="25%"><?=$video_4_html?></td>
<td
width="25%"><?=$video_5_html?></td>
<td
width="25%"><?=$video_6_html?></td>
</tr>
</table>
<!-- End inner video layout table -->
</td>
</tr>
</table>
<!-- End video layout table -->
HTH
Cheers - Neil
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php