473,387 Members | 1,590 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

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
3 84542
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
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


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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: F. Da Costa | last post by:
Following is a snippet of html in which I hide a whole table and try to hide a single row. Here is my question (plz don't chew my head off if its css related instead): Why does the divTable...
19
by: CMAR | last post by:
I have the following markup. The problem is that the browser, e.g., IE6, inserts several lines of blank space between the <div> and the following table. Is there a way to minimize that vertical...
44
by: Jim M | last post by:
I have had great success with using <iframe> with overflow-y set to auto. I can get a similar look with the <iframe> tag. BUT... In all cases I need to have fixed heights. Is there a way to...
2
by: bissatch | last post by:
Hi, I am trying to use JavaScript to write a table column on a web page. The code is as follows: <html> <head> <script> function displaycount() {
2
by: taras.di | last post by:
Hi everyone, I know that there's been a bit of discussion involving placing <div>s inside table cells, but I've read all of the posts and couldn't find anything that solved my problem. I've...
15
by: scott | last post by:
Hello, I'm working on updating some of my table-based sites to use CSS instead of tables. One of my sites has a header that is composed of three elements: A B C In my prior design, this was...
1
by: leaflord | last post by:
Hello, I've got basic html knowledge and am working on a site that was originally designed by someone else. My problem is this: I've been embedding YouTube videos in a website where one of...
13
by: wilq | last post by:
I got a little problem, maybe You could help me out. I have one layer that is used to darken all content on page (opacity 50%) to make other layer more visible. If i show two separate Layers -...
8
prino
by: prino | last post by:
Hi all, I've written code (in REXX) that takes files in legacy languages (PL/I, COBOL, z/OS assembler, etc) and converts them into HTML in a format similar to what's displayed in the z/OS ISPF...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.