|
Posted by Oliver on February 25, 2005, 8:55 pm
Please log in for more thread options
Hello,
i'm having a problem with an html table and the use off css and can't
figure out, why this problem occurs. The following happens. I create a
table and some content via php and mysql and then always the third
element doesn't show the hyper-linking, though it is written in the
source code.
If i save the code and load it as html the linking is working.
What is so strange is, that it's always the third element.
Anybody an idea?
my php code is like this:
[code]
if($row['cont_type']=="2") {
//Feld-ELEMENT
$x=$row['cont_id'];
$sql="SELECT * FROM `type_c` WHERE `cont_id`='$x'";
$result_b=mysql_query($sql,$db) or die ("Nicht
erlaubte Operation: $sql");
$row_b = mysql_fetch_array($result_b);
if($row_b['link']!="0") {
echo "<a
href="./tpfrm.php?site_id=".$row_b['link']."" target="_top">";
}
if($row['frame']=="2") {
echo "<div class="frame2"
style="border-color:".$col."">";
} else {
echo "<div class="noframe">";
}
echo "<table width="100%" cellpadding="0"
cellspacing="0" border="0">
<tr valign="top">
<td align="left" width="100">
<img
src="./images/produkte/".$row_b['image']."" border="0" class="images">
</td>
<td align="center"
valign="middle" class="td_b_left" style="border-color:".$col.""
width="150">
<p
class="fl_text">".$row_b['topic']."</p>
</td>
<td align="center"
valign="middle" class="td_b_left" style="border-color:".$col."">
<p
class="fl_text">".$row_b['text']."</p>
</td>
</tr>
</table>";
echo "</div>";
if($row_b['link']!="0") {
echo "</a>";
}
}
[/code]
And the resulting html code is this:
http://www.familie-summa.com/test/test2.htm
That the images aren't there, doesn't matter. I also tried it with the
images and it's the same.
thx olli
|
|
Posted by Steve Pugh on February 25, 2005, 8:07 pm
Please log in for more thread options
>i'm having a problem with an html table and the use off css and can't
>figure out, why this problem occurs. The following happens. I create a
>table and some content via php and mysql and then always the third
>element doesn't show the hyper-linking, though it is written in the
>source code.
>
>http://www.familie-summa.com/test/test2.htm
Put the links inside the table cells instead of around the whole
table. Running your code though a validator would have pointed out
this basic error.
Steve
--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor
|
|
Posted by Oliver on February 25, 2005, 9:46 pm
Please log in for more thread options
Steve Pugh schrieb:
>
>
>>i'm having a problem with an html table and the use off css and can't
>>figure out, why this problem occurs. The following happens. I create a
>>table and some content via php and mysql and then always the third
>>element doesn't show the hyper-linking, though it is written in the
>>source code.
>>
>>http://www.familie-summa.com/test/test2.htm >
>
> Put the links inside the table cells instead of around the whole
> table. Running your code though a validator would have pointed out
> this basic error.
>
> Steve
>
Thanks so far, but i want the link to be or the whole table, taht's why
the link is before a div tag.
the problem with putting the link several times into the table is, that
it only links when i hover the text or the images and not the entire
table itself.
it should work with the div. shouldn't it?
|
|
Posted by Dan on February 25, 2005, 12:48 pm
Please log in for more thread options
Oliver wrote:
> Thanks so far, but i want the link to be or the whole table, taht's
why
> the link is before a div tag.
It doesn't matter what you want; what you did is not valid HTML. The
<a> element is inline-level, and is not allowed to surround a
block-level element such as <div> or <table>.
--
Dan
|
|
Posted by Oliver on February 25, 2005, 9:53 pm
Please log in for more thread options
Dan schrieb:
> Oliver wrote:
>
>>Thanks so far, but i want the link to be or the whole table, taht's
>
> why
>
>>the link is before a div tag.
>
>
> It doesn't matter what you want; what you did is not valid HTML. The
> <a> element is inline-level, and is not allowed to surround a
> block-level element such as <div> or <table>.
>
Ok, i see, but how do i get then the entire table as a link? Not just
the text and image?
|
|