I have a property page that is populated from a database - my problem is that when the property picture is inserted it is tight against the RHS of the table and doesn’t look right.
Have a look at http://www.glenandco.co.uk/search.php
I am assuming that I want to add padding-right to the image to stop this.
This I think (not been very PHP savvy) is the line in question
echo "<img src="propfiles/images/" . stripslashes($row['picture']) . "" border="1" alt="Property/" . stripslashes($row['picture']) . "">";
How do I insert the padding-right that I want? or do I want to do it in a different way altogether?
David
dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
MIKEBR_FW
(MIKEBR_FW@telefonica.net)
April 12, 2008, 2:57pm
2
Dave,
I don’t know how you are adding the php and structuring the results
but could you not just style the bit that contains the echo so it has
padding on the right or align the image to middle rather than the
‘align=right’ that is has set now or… could you maybe also add
another ‘narrow’ column to the right of the picture?
I am sure some people will frown but I find returning results like
this in a table to be much neater and easier to work with, I find it
so much more controllable to create a table in FW, take the code and
stick it into a file I call it up for each result.
On Apr 12, 2008, at 4:01 PM, DeltaDave wrote:
I have a property page that is populated from a database - my
problem is that when the property picture is inserted it is tight
against the RHS of the table and doesn’t look right.
Have a look at http://www.glenandco.co.uk/search.php
I am assuming that I want to add padding-right to the image to stop
this.
This I think (not been very PHP savvy) is the line in question
echo “<img src=“propfiles/images/” .
stripslashes($row[‘picture’]) . “” border=“1” alt=“Property/” .
stripslashes($row[‘picture’]) . “”>”;
dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
waltd
(Walter Davis)
April 12, 2008, 3:03pm
3
To add space outside the image, you would use Margin. To add
space inside the image (hint: there’s no such thing possible) you
would use Padding.
Walter
On Apr 12, 2008, at 10:57 AM, Mike B wrote:
I have a property page that is populated from a database - my
problem is that when the property picture is inserted it is tight
against the RHS of the table and doesn’t look right.
Have a look at http://www.glenandco.co.uk/search.php
I am assuming that I want to add padding-right to the image to stop
this.
dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
Thanks Mike and Walter
I think the easiest way to achieve this would be using Mike’s suggestion
could you maybe also add another ‘narrow’ column to the right of the picture
Only problem is the table structure is defined by the php and, being a Freeway user, I don’t know how to code tha addition of another column.
The full code for the results return and table generation is this:
$row = mysql_fetch_array($result);
echo '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 COLSPAN=2 width=840 bgcolor=#c0c0c0>';
echo '<tr>';
echo '<td WIDTH=100 VALIGN=TOP HEIGHT=12>';
echo '<p class="style45"><span class="body12VB">'.($i+1).'</span></p>';
echo '</td>';
echo '</p>';
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td WIDTH=100 VALIGN=TOP HEIGHT=10>';
echo '<p class="style45"><span class="body12VB">Location: ';
echo '</span></p></td>';
echo '<td WIDTH=500 VALIGN=TOP HEIGHT =12><p class="style45"><span class="body12V">';
echo stripslashes($row['location']);
echo '</span></p></td>';
echo '<td width=1 rowspan=8 valign=middle><img src="../Resources/_clear.gif" border=0 width=1 height=1 alt=""></td>';
echo '<td width=496 rowspan=8 valign=middle align=right>';
echo "<img src=\"propfiles/images/" . stripslashes($row['picture']) . "\" border=\"1\" alt=\"Property/" . stripslashes($row['picture']) . "\">";
echo '</td>';
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td WIDTH=100 VALIGN=TOP HEIGHT=10>';
echo '<p class="style45"><span class="body12VB">Address: ';
echo '</span></p></td>';
echo '<td WIDTH=500 VALIGN=TOP HEIGHT =12><p class="style45"><span class="body12V">';
echo stripslashes($row['address']);
echo '</span></p></td>';
echo '</tr>';
echo '<tr>';
echo '<td WIDTH=100 VALIGN=TOP HEIGHT=10>';
echo '<p class="style45"><span class="body12VB">Type: ';
echo '</span></p></td>';
echo '<td WIDTH=500 VALIGN=TOP HEIGHT =12><p class="style45"><span class="body12V">';
echo stripslashes($row['type']);
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td WIDTH=100 VALIGN=TOP HEIGHT=10><p class="style45"><span class="body12VB">';
echo 'Status: ';
echo '</span></p></td>';
echo '<td WIDTH=500 VALIGN=TOP HEIGHT =12><p class="style45"><span class="body12V">';
echo stripslashes($row['status']);
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td WIDTH=100 VALIGN=TOP HEIGHT=10><p class="style45"><span class="body12VB">';
echo 'Area: ';
echo '</span></p></td>';
echo '<td WIDTH=500 VALIGN=TOP HEIGHT =12><p class="style45"><span class="body12V">';
echo stripslashes($row['area']);
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td WIDTH=100 VALIGN=TOP HEIGHT=10><p class="style45"><span class="body12VB">';
echo 'Price: ';
echo '</td>';
echo '<td WIDTH=500 VALIGN=TOP HEIGHT =12><p class="style45"><span class="body12V">';
echo stripslashes($row['price']);
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td WIDTH=100 VALIGN=TOP HEIGHT=10><p class="style45"><span class="body12VB">';
echo 'Information: ';
echo '</td>';
echo '<td WIDTH=500 VALIGN=TOP HEIGHT =12><p class="style45"><span class="body12V">';
echo stripslashes($row['information']);
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td WIDTH=100 VALIGN=TOP HEIGHT=10><p class="style45"><span class="body12VB">';
echo 'PDF: ';
echo '</td>';
echo '<td WIDTH=500 VALIGN=TOP HEIGHT =12><p class="style45"><span class="body12V">';
$pdf = stripslashes($row['pdf']);
echo '<a href="http://www.glenandco.co.uk/propfiles/images/' . ($row['pdf']). '">' . $pdf . '</a>';
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td WIDTH=100 VALIGN=TOP HEIGHT=10><p class="style45"><span class="body12VB">';
echo 'ID: ';
echo '</td>';
echo '<td WIDTH=500 VALIGN=TOP HEIGHT =12><p class="style45"><span class="body12V">';
echo stripslashes($row['id']);
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td width=100 height=5 bgcolor=#FFFFFF><img src="../Resources/_clear.gif" border=0 width=100 height=5 bgcolor=#FFFFFF alt=""></td>';
echo '<td width=400 height=5 bgcolor=#FFFFFF><img src="../Resources/_clear.gif" border=0 width=400 height=5 bgcolor=#FFFFFF alt=""></td>';
echo '<td width=1 height=5 bgcolor=#FFFFFF><img src="../Resources/_clear.gif" border=0 width=1 height=5 bgcolor=#FFFFFF alt=""></td>';
echo '<td width=1 height=5 bgcolor=#FFFFFF><img src="../Resources/_clear.gif" border=0 width=1 height=5 bgcolor=#FFFFFF alt=""></td>';
echo '</tr>';
echo '</TABLE>';
Now to you code experts out there this is meat and potatoes but to me it is caviar and foie gras so any help is appreciated.
David
dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
MIKEBR_FW
(MIKEBR_FW@telefonica.net)
April 13, 2008, 3:52pm
5
Try making the rowspan=9 or even CELLPADDING=0 (try 5), play around
with those, I would have a deeper look but I am rushing at the moment,
if I get a chance later I will have a look… if your changes don’t
work.
On Apr 13, 2008, at 5:43 PM, DeltaDave wrote:
Thanks Mike and Walter
I think the easiest way to achieve this would be using Mike’s
suggestion
could you maybe also add another ‘narrow’ column to the right of
the picture
Only problem is the table structure is defined by the php and, being
a Freeway user, I don’t know how to code tha addition of another
column.
The full code for the results return and table generation is this:
$row = mysql_fetch_array($result);
echo ‘
’;
echo ‘’;
echo ‘’;
echo ‘
’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’.($i+1).‘</
span>
’;
echo ‘ ’;
echo 'Location: ';
echo ‘
’;
echo stripslashes($row[‘location’]);
echo ‘
’;
echo “<img src=“propfiles/images/” .
stripslashes($row[‘picture’]) . “” border=“1” alt=“Property/” .
stripslashes($row[‘picture’]) . “”>”;
echo ‘ ’;
echo 'Address: ';
echo ‘
’;
echo stripslashes($row[‘address’]);
echo ‘
’;
echo 'Type: ';
echo ‘
’;
echo stripslashes($row[‘type’]);
echo ‘
’;
echo 'Status: ';
echo ‘
’;
echo stripslashes($row[‘status’]);
echo ‘
’;
echo 'Area: ';
echo ‘
’;
echo stripslashes($row[‘area’]);
echo ‘
’;
echo 'Price: ';
echo ‘
’;
echo stripslashes($row[‘price’]);
echo ‘
’;
echo 'Information: ';
echo ‘
’;
echo stripslashes($row[‘information’]);
echo ‘
’;
echo 'PDF: ';
echo ‘
’;
$pdf = stripslashes($row[‘pdf’]);
echo ‘’ . $pdf . ‘ ’;
echo ‘
’;
echo 'ID: ';
echo ‘
’;
echo stripslashes($row[‘id’]);
echo ‘
’;
Now to you code experts out there this is meat and potatoes but to
me it is caviar and foie gras so any help is appreciated.
David
dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
Thanks for your help Mike
I have fiddled and got there in the end thanks to your guidance.
http://www.glenandco.co.uk/search.php
David
dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options