473,395 Members | 1,403 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,395 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 84546
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: 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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.