|
Posted by Jukka K. Korpela on 01/31/07 21:37
Scripsit splashedwater@yahoo.com:
> Hi guys, I have a question which is kind of tricky....
Perhaps. Try posting a URL, and we'll see.
> I was wondering how to format text in between left and center.
I can parse the sentence but I cannot make sense of it.
> I have an
> image (of a product) then under that a price. When I try to center the
> text it goes slightly too far to the right (because my image is
> slightly off center from my table). Does anyone know how to rememedy
> this.
We need to know how you created the problem in order to help you stop doing
that. How about a URL?
> Here is the code,:
We want a URL. If relevant, we might later take a look at the code that
generates the HTML code, but the HTML code is really what browsers work on.
They won't even see your PHP code.
>
> <code>
> echo "<td border='0' height='168' valign='top' align='left'><a
> href='view_print.php?pid=".$row['product_id']."'><img src='uploads/".
> $row['image_name']."' alt='".$row['item_name']."'></a><br /><font
> size='4'><b><div align='left'>Price: \$".$row['price']. " </div></
> b></font></td>";
> </code>
>
>
> You probably have to know php or programming to understand this...
No, you need to post the URL. The snippet isn't enough even to people who
are fluent in all human and non-human languages.
We _can_ see, rather immediately actually, that you generate grossly
malformed (invalid) markup, like a phoney border attribute and an attempt to
nest <div> inside <font>. So why don't you clean up what's really broken
syntactically and _then_ post a URL, if symptoms recur? You might as well
get rid of the <font> markup and use CSS instead.
If you wish to center, why don't you use just align="center" (and not
align="left") in <td>? Using that just with <td ...><img ...><br>Text
here</td> might solve the problem.
> Does this make sense? If not I can clarify.
Try posting the URL.
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
[Back to original message]
|