Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with "div" in a "table" does any one know? PLEASE

Status
Not open for further replies.

avihaimar

Programmer
Joined
Jul 30, 2003
Messages
38
Location
IL
hello
i have the code below:
<html>
<body>
<table>
<div id="div1" style="display :none">
<tr>
<td>
uuu
</td>
</tr>
</div>
</table>
</body>
</html>

i want in table tag to display or not display ( according to some
bussnies rules ) a section of some rows.
but the tag div dosnt work for me inside the table tag.
if i remove the table tag it is work and not diplay the code inside
the div.

does any one know how to resolve this problem.
i dont want to put style on every row in the table.
i want to wrap a section of row in order to control on them via
javascript


thank u a lot

 
no can do like that, and it's invalid xhtml too.

you'll have to change the 'display' property of multiple <tr> elements, or perhaps contain all your conditional rows in another table within a <td>, like

<table>
<tr id="conditional">
<td>
<table>
<tr>
<td>foo</td>
</tr>
<tr>
<td>foo</td>
</tr>
<tr>
<td>foo</td>
</tr>
</table>
</td>
</tr>
</table>

so you can just alter the display of the conditional row

=========================================================
-jeff
try { succeed(); } catch(E) { tryAgain(); } finally { rtfm(); }
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top