By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,640 Members | 1,598 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,640 IT Pros & Developers. It's quick & easy.

<div > inside <table> doesn't work - why not?

P: n/a
When I put a <div ...> inside a <table> specification, functionality is
not there. When I put the <table> inside the <div> everything works.

Why is that?

Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Paul Thompson wrote on 28 aug 2003 in comp.lang.javascript:
When I put a <div ...> inside a <table> specification, functionality is
not there. When I put the <table> inside the <div> everything works.


1 not true

2 not javascript, better ask a html NG

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 20 '05 #2

P: n/a
In article <bi**********@newsreader.wustl.edu>, pa**@wubios.wustl.edu
enlightened us with...
When I put a <div ...> inside a <table> specification, functionality is
not there. When I put the <table> inside the <div> everything works.

Why is that?


Because the magic 8 ball said so.

How about a little more data for those of us with no magic 8 ball?

I put divs in tables all the time and have no problem.
Browser?
What functionality doesn't work?
What happens?
What doesn't happen?
Test code?
You can't overlap. Watch your nesting.

Bad:
<div>
<table>
....
</div>
</table>

Bad:
<table>
....
<div>
....
</table>
</div>

Bad:
<table>
<div>
<tr>
....
</tr>
</div>
</table>

Good:
<table>
<tr><td>
<div>
....
</div>
</td>
</tr>
</table>

Divs in tables must be *in* the table cell, not between rows or cells.

-------------------------------------------------
~kaeli~
Press any key to continue or any other key to quit.
Who is General Failure and why is he reading
my hard disk?
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
-------------------------------------------------
Jul 20 '05 #3

P: n/a


kaeli wrote:
In article <bi**********@newsreader.wustl.edu>, pa**@wubios.wustl.edu
enlightened us with...
When I put a <div ...> inside a <table> specification, functionality is
not there. When I put the <table> inside the <div> everything works.

Why is that?

Because the magic 8 ball said so.

How about a little more data for those of us with no magic 8 ball?

I put divs in tables all the time and have no problem.
Browser?
What functionality doesn't work?
What happens?
What doesn't happen?
Test code?


Thanks. Your reply addresses my problem. I was trying

<table>
<div>
<tr><td>...
</div><div>
<tr><td>
</div>
</table>

and this did not work at all. The problem appears to be that
information must be properly presented within the table structure.
I was trying to put the <div> between cells, which appears to be a
non-starter.

Appreciate your response...

You can't overlap. Watch your nesting.

Bad:
<div>
<table>
...
</div>
</table>

Bad:
<table>
...
<div>
...
</table>
</div>

Bad:
<table>
<div>
<tr>
...
</tr>
</div>
</table>

Good:
<table>
<tr><td>
<div>
...
</div>
</td>
</tr>
</table>

Divs in tables must be *in* the table cell, not between rows or cells.

-------------------------------------------------
~kaeli~
Press any key to continue or any other key to quit.
Who is General Failure and why is he reading
my hard disk?
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
-------------------------------------------------


Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.