Nested Table - what's wrong with this code?

M

michaaal

Here is a simplified version of my code which utilizes a nested table.
I realize there is no SRC for the IMG, but I have tested it both with and
without a legitimate path and it doesn't seem to make a difference, so for
the time being I'm leaving the SRC blank.

My goal is to have a table next to an image...something like this...

---------------------------------------------
Search
Catalog -------> The image is to the right
---------------------------------------------


The problem is the browser displays the output something like this...
---------------------------------------------
Search
Catalog

The image is below
---------------------------------------------
Also, the above information must exist inside the current table.

I realize that I could separate the Search Catalog and image into two
different TD cells, however, I don't want to do that - I need them in the
same cell. (If you really really must know when then email me and I am
happy to tell you).

Here's the code:

<html>

<body>

<table border="1">
<tr>
<td>
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td>
<table border="1">
<tr>
<td>
Search<br>Catalog
</td>
</tr>
</table><img src="">
</td>
<td>
</td>
</tr>
</table>

</body>

</html>
 
R

Ryan Stewart

michaaal said:
Here is a simplified version of my code which utilizes a nested table.
I realize there is no SRC for the IMG, but I have tested it both with and
without a legitimate path and it doesn't seem to make a difference, so for
the time being I'm leaving the SRC blank.

My goal is to have a table next to an image...something like this...

---------------------------------------------
Search
Catalog -------> The image is to the right
---------------------------------------------


The problem is the browser displays the output something like this...
---------------------------------------------
Search
Catalog

The image is below
---------------------------------------------
Also, the above information must exist inside the current table.

I realize that I could separate the Search Catalog and image into two
different TD cells, however, I don't want to do that - I need them in the
same cell. (If you really really must know when then email me and I am
happy to tell you).

Here's the code:
And your problem. You've got all this:
<table border="1">
<tr><td></td></tr>
<tr><td></td></tr>
<tr>
<td>
<table border="1"><tr><td>Search<br>Catalog</td></tr></table>
<img src="">
</td>
<td></td>
</tr>
</table>

when all you probably need is something like this:
<p></p>
<p></p>
<p>
<img style="float: right;" src="">
Search<br/>Catalog
</p>
<p></p>

with a little CSS.
 
L

lime

My goal is to have a table next to an image...something like this...
---------------------------------------------
Search
Catalog -------> The image is to the right
---------------------------------------------


The problem is the browser displays the output something like this...
---------------------------------------------
Search
Catalog

The image is below
---------------------------------------------

Here's the code:

<html>

<body>

<table border="1">
<tr>
<td>
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td>
<table border="1">
<tr>
<td>
Search<br>Catalog
</td>
</tr>
</table><img src="">
</td>
<td>
</td>
</tr>
</table>

</body>

</html>


You need to tell the image where you want it.

Rather than <img src="">

You need <img src="" align="right">
 
W

Webcastmaker

Here is a simplified version of my code which utilizes a nested table.

One sec while I take the time to build a sample page so I can see a
demonstration of what you are trying to tell me.

Wait a second, YOU should provide a sample page.
 
S

Sid Ismail

: Search
: Catalog -------> The image is to the right
: ---------------------------------------------
:
:
: The problem is the browser displays the output something like this...
: ---------------------------------------------
: Search
: Catalog
:
: The image is below


<table align=left>


</table>
<img src="...>


Or use the CSS float=left

Sid
 
M

michaaal

Webcastmaker said:
One sec while I take the time to build a sample page so I can see a
demonstration of what you are trying to tell me.

Wait a second, YOU should provide a sample page.

Webcastmaker, I did provide sample code in my first post. Was this not
adequate?

And my response to the other posts.... Why do you waste time telling me to
use <p> when I clearly stated that I'm only interested in using nested
tables for this particular project? By the way adding style="float:right;"
or align="right" didn't solve the problem. It would be nice if you test
your results without blindly posting them.
 
B

brucie

in post: <
Webcastmaker, I did provide sample code in my first post. Was this not
adequate?

you're supposed to make it easy for people to help you for free. supply
a URL, don't expect people to screw around reconstructing a page that
may not be the same or behave the same as the one you're working on.

<quote>
Avoid posting multiple lines of markup, often the markup posted is
incomplete and doesn't help identify the problem. Supply a link, it
makes it much easier for people to help you.
</quote> http://alt-html.info/
 
P

PeterMcC

michaaal wrote in
Webcastmaker, I did provide sample code in my first post. Was this
not adequate?

And my response to the other posts.... Why do you waste time telling
me to use <p> when I clearly stated that I'm only interested in using
nested tables for this particular project? By the way adding
style="float:right;" or align="right" didn't solve the problem. It
would be nice if you test your results without blindly posting them.

It may help to know that they're a funny lot around here - unlike other
places that you've been, this lot tend not to give out useful advice to
people that address them in the manner above. I know that it feels like
pandering to unreasonable expectations but, if you engage them in pleasant
discourse, they'll provide a much better response.

And, once you have your answers, you can tell them what you think of them ;)
 
W

Webcastmaker

And, once you have your answers, you can tell them what you think of them ;)

Of course when you have a different problem you have to come back
with a different alias....
 
M

michaaal

It may help to know that they're a funny lot around here - unlike other
places that you've been, this lot tend not to give out useful advice to
people that address them in the manner above. I know that it feels like
pandering to unreasonable expectations but, if you engage them in pleasant
discourse, they'll provide a much better response.

And, once you have your answers, you can tell them what you think of them ;)

PeterMcC,

Your comments were well taken and were. I'll let the sarcastic balkers'
comments
speak for themselves.
 
D

Disco Octopus

michaaal said:
Here is a simplified version of my code which utilizes a nested table.
.........
<html>

<body>

<table border="1">
<tr>
<td>
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td>
<table border="1">
<tr>
<td>
Search<br>Catalog
</td>
</tr>
</table><img src="">
</td>
<td>
</td>
</tr>
</table>

</body>

</html>


not sure what you are asking (because I dont like reading long bit of text)
but I can see straight away that your parent tables first two rows have one
cell each, where the third row has two cells. does that help?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top