How to use a dbhtml or dbfo file for processing instruction to set the background color for an individual table cell. The view should look like the following there should be number of tables and at the background the color would be anything.
How to use a dbhtml or dbfo file for processing instruction to set the background color for an individual table cell. The view should look like the following there should be number of tables and at the background the color would be anything.
In my experience, reliable printing of HTML pages "in the wild" is impossible. Some browsers do not display a table cell's background color unless the cell contains some HTML content. One solution (and admittedly an imperfect one) that I have used is to use table cell background colors to "paint" a whole region a different color than the page background. Or to generate a PDF version of a page (genreated on the server) for printing.
To ensure that every "empty" table cell displays background color, insert a non-breaking space ( ) in the table cell. CSS, currently at least, has no way to style an element based on anything that appears after the start tag for that element in the document. You could do this to your CSS:
Code:td { height: 100%;} .bg { background-color: #f00; width: 100%; height: 100%; display: block; }
My program makes an HTML report which needs to be easily printable. On this report is a table, and one of the columns in the table needs to express a color. The bottom row demonstrates what happens with no non-breaking spaces (the yellow will not display in some browsers).
Code:<TABLE BORDER="1" CELLPADDING="0" CELLSPACING="2" WIDTH="400"> <TR> <TD BGCOLOR="#ffcc00">Application</TD> <TD BGCOLOR="#ffcc00">Benchmark</TD> <TD BGCOLOR="#ffcc00">Results</TD> </TR> </TABLE>
Bookmarks