Why is this table not laying out right?

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

BlackFrancis

Thread Starter
Joined
Oct 21, 2006
Messages
245
Hi. I'm fiddling around with the output of this software (Wordpress plugin, "Buddypress Activity Plus"), which itself doesn't matter because the issue is between HTML and PHP.

This is what I'm trying to do:

PHP:
<table width="858" border="0">
  <tr>
    <td colspan="2">
			<a href="<?php echo $url;?>"><?php echo $title;?></a>
</td>
  </tr>
  <tr>
    <td width="252"><?php if ($image) { ?>
		<a href="<?php echo $url;?>"><img src="<?php echo $image; ?>" /></a>
	<?php } ?>
</td>
    <td><?php echo $body;?>
</td>
  </tr>
</table>
The intended outcome being:

Entry Title
Entry Image | Entry description
What I get:



The content comes out in 3 rows. Never had HTML do this to me.
 
Joined
Feb 23, 2003
Messages
16,274
You could try this:

Code:
<table width="858" border="0">
  <tr>
    <td colspan="2">
            <a href="<?php echo $url;?>"><?php echo $title;?></a>
    </td>
 </tr>
  <tr colspan="2">
    <td width="252"><?php if ($image) { ?>
       <a href="<?php echo $url;?>"><img src="<?php echo $image; ?>" /></a>
    <?php } ?>
    </td>
    <td>ddd<?php echo $body;?>
    </td>
 </tr>
</table>
 

BlackFrancis

Thread Starter
Joined
Oct 21, 2006
Messages
245
The only thing that changed was the "ddd" that you included before the link description echo.

I'm looking it over on Chrome/Iron's inspect tool, and according to the source it's showing up as <p> and <div> tags?!

Why might this be?
 
Joined
Feb 23, 2003
Messages
16,274
I did leave the ddd in by mistake but there was one other change in the code from your code.
 

BlackFrancis

Thread Starter
Joined
Oct 21, 2006
Messages
245
Well it appears to me that there is something in the CSS, perhaps, of the software that is stripping tables and replacing with paragraphs and divs.

Do you know what might be capable of doing that? This is a vast piece of software, I need to find a clue.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Top