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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

display:none to table rows

Status
Not open for further replies.

aigarzzz

Programmer
Apr 5, 2006
16
LV
<table>
<tr id="first"><td>1cell</td><td>2cell</td></tr>
<tr id="second" style="display:none"><td colspan="2" >2nd row content</td></tr>
</table>

and the javascript:
document.getElementById('second').style.display = 'block';

why second row td colspan=2 dosn't work - text '2nd row content' is only in 2nd row 1st cell?
 
Try getting rid of the style="display:none;" from the row... and then applying that style using javascript once the page has loaded. What brtowser have you tested this on - try other browsers to see if it's browser specific.

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
content align to 2nd row 1 cell right corner after style="text-align:right"...
 
i just test it on IE6 and there everything is fine. Problem is when i use Firefox!
 
content align to 2nd row 1 cell right corner after style="text-align:right"..
Then everything appears to be fine. Maybe you could explain to us what the difference is between IE and FF in this case? Be specific about what you are seeing and what you are expecting to see.

We'll figure it out [smile]

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
difference between IE6 and FIREFOX is that IE6 text '2nd row content' is placed in 2nd row 1st and 2nd cell (colspan=2), but in Firefox only in 2nd row 1st cell(colspan=1)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top