Skip to content
Hub Nexus

No author yetClaim it

Version 1Updated 1 min read

Support

This is an example of using CSS to format a table without actually using the HTML table element. This is critical since some browsers do not support dynamic tabular layout. The Firefox 0.6 extension also does not support the repeat-nodeset attribute, so you can not yet display repeating data inside HTML tables.

The biggest drawback to this solution is that the width of the tables must be predefined in a stylesheet and can not adjust the width of the columns based on the width of the data in each row.

Program Example

<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events">
<head>
<title>Table with CSS and Divs</title>
<style type="text/css">

  • {
    font-family: Arial, Helvetica, sans-serif;
    border-collapse: collapse;
    }
    /* Example of doing layout of a table without using the HTML table tags */

.table {
display: table;
}

.tableHeader, .tableRow, .tableFooter {
display: table-row;
}

.leftHeaderCell, .leftCell, .leftFooterCell,
.rightHeaderCell, .rightCell, .rightFooterCell
{
display: table-cell;
}

.leftHeaderCell, .rightHeaderCell, .leftFooterCell {
background-color: green;
color: white;
font-weight: bold;
padding: 0 5px 0 10px;
}

.leftHeaderCell, .rightHeaderCell {
text-align: center;
}

.leftCell {
padding: 0 5px 0 10px;
}

.rightCell {
text-align: right;
}

.rightFooterCell {
text-align: right;
border-top: solid black 2px;
font-weight: bold;
}

/* Draw even rows with a light green */
.even {
color: black;
background-color: #CCFFCC;
}
</style>
</head>
<body>
<p>Table with CSS and divs</p>
<div class="table">
<div class="tableHeader">
<div class="leftHeaderCell">Description</div>
<div class="rightHeaderCell">Value</div>
</div>
<div class="tableRow">
<div class="leftCell">Item one</div>
<div class="rightCell">$1,000.00</div>
</div>
<div class="tableRow even">
<div class="leftCell">Item two</div>
<div class="rightCell">$2,000.00</div>
</div>
<div class="tableRow">
<div class="leftCell">Item three</div>
<div class="rightCell">$3,000.00</div>
</div>
<div class="tableRow even">
<div class="leftCell">Item four</div>
<div class="rightCell">$4,000.00</div>
</div>
<div class="tableRow">
<div class="leftCell">Item five has a long description</div>
<div class="rightCell">$1,000.00</div>
</div>
<div class="tableFooter">
<div class="leftFooterCell">Total: </div>
<div class="rightFooterCell">$11,000.00</div>
</div>
</div>
</body>
</html>

Where this page came from

This page was imported from Wikibooks. From “XForms” on Wikibooks, by its contributors, under CC BY-SA 4.0. Changed here: set as a page; navigation and edit links left out; each image under its own licence, credited in its caption.

Nobody has written it yet — it is the source material at a new address, which is why search engines are asked to skip it and why no one earns from it. It is up for grabs: take it on, and it is yours to rewrite and to earn from.

Get each new page of

XForms

Following means one email when a page is added, nothing when a page changes.

Following means one email when a page is added, nothing when a page changes.

Comments

Spinner Logo

Next in XForms

CC BY-SA 4.0
This control displays a different image when a select1 list is selected. ## Screen Image ![XForms-custom-control]( (Image: The original uploader was Dmccreary at English Wikibooks ., CC BY-SA 3.0) ## Sample Program <html xmlns=" xmlns:xf=" <head> <title>Custom Image Control Sample</title> <bindings
CC BY-SA 4.0
function dirty() { setBunload(true); } function clean() { setBunload(false); } This one goes in your "submission" element: resource="javascript:clean()" ev:event="xforms-submit-done"/> and this resource="javascript:dirty()" ev:event="xforms-value-changed"/> goes somewhere in the form - place it at t
CC BY-SA 4.0
I have tried to use the current() function inside the repeat like this: ref="current()/@selected" value="'false'" /> but with no luck. If anyone knows how to get this working, please let us know. Thanks - Dan ### Alternate Way Note: does not work inside . Here is the workaround for this.
CC BY-SA 4.0
id="default-instance"> xmlns=""> B-item 2001-05-03 A-item 2005-05-03 Z-item 2003-05-03 D-item 2002-05-03 id="stylesheet"> xmlns="" xmlns:xsl=" version="1.0"> match="/"> select="data/item"> type="string" select="name"/> match="*|@*|text()"> select="*|text()|@*"/> To perform the sort we will use the f
CC BY-SA 4.0
Xfolite is licensed under the LGPL license. ### PicoForms [PicoForms]( has an XForms implementation that runs on cell phones supporting MIDP 2.0 and CLDC 1.x. It also supports PDAs including Palm and Pocket PCs. PicoForms is also able to provide customers (and evaluators) with an online development
CC BY-SA 4.0
To do this do the following. From the Windows start menu click Start/Run. Enter "regedit" and press enter. Use the Registry browser to navigate to the HKEY_CLASSES_ROOT folder and then find the MIME/Daatabase/Content Type folder.