html - Table Row, can you set the height to zero? -
Can you set table row height to 0? IE 8, Chrome, Firefox, Opera
Why, you ask! OK, I have a line that is dynamically created and displayed when a user clicks on a basic line. The problem is that if there are no rows, then when clicked, it is still an empty 1 pixel Highline displays.
This child gridview:
& lt; Asp: TemplateField HeaderStyle-CssClass = "hidden-column" item style- CssClass = "hidden-column" footer-CSS class = "hidden-column" & gt; & Lt; ItemTemplate & gt; & Lt; TR & gt; & Lt; Td colspan = "8" & gt; & Lt; Div id = '& lt;% # Eval ("PublicationID")%> & gt; Style = "display: none; condition: relative;" & Gt; & Lt; Asp: GridView id = "GridView2_ABPubs" runat = "server" AutoGenerateColumns = "false" width = "100%" DataKeyNames = "PublicationID" font-name = "Wordana" font-size = "small" & gt; & Lt; Columns & gt; & Lt; ASP: TemplateField & gt; & Lt; ItemTemplate & gt; & Lt; ASP: Checkbox ID = "Childbank Selection" Runat = "Server" /> & Lt; / ItemTemplate & gt; & Lt; / ASP: TemplateField & gt; & Lt; ASP: Boundfield Dated Field = "Name Abreb" Header Text = "Publication Name" Sorted Expression = "Name Abrev" /> & Lt; / Column & gt; & Lt; / ASP: GridView & gt; & Lt; / Div & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / ItemTemplate & gt; & Lt; / ASP: TemplateField & gt;
CSS:
.hidden-column {display: none; }
Javascript:
& lt; Script language = "javascript" type = "text / javascript" & gt; Var presentAprididDiv = ""; Function collapseExpand (object) {var div = document.getElementById (object); // if (currently active! = "" & Amp; amp; amp; amp; currently active DIV! = Div) // // currently running DIVI.style. Display = "none"; //} if (div.style.display == "none") {div.style.display = "inline"; Currently diode = div; } And {div.style.display = "none"; }} & Lt; / Script & gt;
I do not think the 0-line-height move works perfectly, However - with Firefox and IE it creates a thick border at the top of the table, if you close the borders it does not matter to you (although I think you still have a blank 1 pixel row at the top of the table ). Many web designer spacer uses GIF (a 1x1 transparent gif, which is the size of the size of the appropriate width) to get the same effect which both problems solve
Comments
Post a Comment