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

Colspan not working in Firefox...

Status
Not open for further replies.

okiiyama

IS-IT--Management
Jan 3, 2003
269
US
Coding for mulitple browsers is like being a child of divorced parents. Anyways, I don't think that I've had problems like this before, but it seems that in firefox colspan is not getting read. Here is a snippet that I'm looking at:
Code:
<tr id="details_#rownum#" style="display: none;">
	<td colspan="10" width="700px">
		<cfinclude template="detailsdisplay.cfm">
	</td>
</tr>
The page is made in coldfusion, and this snippet is in a loop. The include's first tag is a table tag. My page looks fine in IE, but not in FF. The <TD> is not spanning the 10 columns in FF.

If colspan is supported, then I'm pretty sure I'm missing a closing tag somewhere.
 
Colspan should work fine. However you have a table row set to display:none. I don't see anything wrong besides that with the example posted.

I don't know the answer but my good friend Google does.
 
#rownum# is a CF variable that is incremented after each row is created.
The "display" is controlled by a button with a javascript onclick
So... it looks something like...
Code:
var el = document.getElementById("details_1")
if(el.style.display == "block") {
  el.style.display = "none";
} else {
  el.style.display = "block";
}

Could the javascript be messing this up?
 
It does not work in FF because tr is displayed as table-row by default, not block. When you display it as block, FF gets overly confused and does not render it properly. IE is oblivious of the table-row, table-cell display and is therefore satisfied with what you have.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top