4 Replies Latest reply: May 2, 2012 2:27 PM by tharpa RSS

    Cell borders disappear when value is null

    tharpa
      I'm maintaining a PL/SQL report. When the value for a column is null, the cell borders disappear. I would prefer that they not disappear.

      Any suggestions?
        • 1. Re: Cell borders disappear when value is null
          Bob37
          Are you building up the html cells yourself then?

          ie.
          <td> column</td>
          
          If so, one thought is to change that to 
          
          <td>NVL(column,'&nbsp')</td>
          So you get a non-breaking space at minimum.
          • 2. Re: Cell borders disappear when value is null
            tharpa
            Thanks, Bob, I just tried that but it does not help. It looks like htp.p includes a carriage return before the line feed, which seems to cause the problem.
            • 3. Re: Cell borders disappear when value is null
              Bob37
              That's unfortunate.. There are several solutions suggested and indicated as working in this link. Too much cut and paste, so here's the link and I hope one of these suggestions is helpful in your case. Seems IE browsers have a bit opf trouble with it also. Shocker.

              http://stackoverflow.com/questions/57002/css-to-make-an-empty-cells-border-appear

              Actually this entry halfway down the page looks promising so I'll paste it...

              "The problem results because IE7 does not see any internal content for the cell; in programming terms the cell is resulting as a null and like most things, you cannot border a null or perform any action on it. The browser needs an element/object that has a layout, in order to apply a border/layout.

              Even empty {code} <div></div> or <span></span> {code} do not contain content, thus there is nothing to render, resulting in that null case again.

              However, you can trick the browser into thinking the cell has content, by giving the empty div/span layout properties. The easiest way is to apply the CSS style zoom:1.
              {code}
              <table>
              <tr><td>Foo</td>
              <td><span style="zoom:1;"></span></td></tr>
              </table>
              This workaround is better than using a & nbsp ; , since it doesn't unnecessarily mess up screen readers, and isn't misrepresenting the value of the cell. In newer browser you can use the empty-cell:<show|hide> alternative."
              Edited by: Bob37 on May 2, 2012 1:52 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
              • 4. Re: Cell borders disappear when value is null
                tharpa
                Thanks, Bob. The part that worked for me was adding this to the style section in the HTML Header:

                table {
                border-collapse: collapse;}