You are not logged in.
Pages: 1
ENGLISH:
hello!
is it somehow possible to align the (text) content of a sortable table column to the right?
hallo!
ist es rigendwie möglich, in einer sortableTable den (Text-) Inhalt einer spalte rechtsbündig auszurichten?
Offline
ENGLISH:
I guess it's best to do this using css.
Use JavaScript to set a class to the thable widget and write some css just like this:
Ich denke es ist am besten, wenn du dies mit CSS regelst.
Dafür setzt du via JavaScript eine CSS-Klasse für deine Tabelle und kannst dann via CSS z.B. folgendes machen:
.test td + td + td + td {
text-align: right;
}
.test td + td + td + td + td {
text-align: left;
}
Best regards,
Lars Knickrehm
The oneye project.
Offline
I think you may be looking to do..
.sort-table {
text-align: right;
}
in the .css ?
Offline
thank you!
because I'm not very familiar with css i need a little more help:
$sorttypes = array('Hidden','Date', 'Char', 'Number', 'String', 'String');
$theaders = array('ID','Datum', 'Ein/Aus', 'Betrag', 'Text', 'Kategorie');
$tblBank = new SortableTable(array(
'name' => 'tblBank',
'title' => 'Bankbewegungen',
'father' => 'boxBank',
'x' => -5,
'y' => 30,
'width' => $boxBank->width-10,
'height' => $boxBank->height-70,
'cent' => 2,
'theader' => $theaders,
'sortypes' => $sorttypes));
$tblBank->show();
this is my table...i need to align the content of the 4th column ('Betrag').
can i do this by
$tblBank->setcss(...);
?
Last edited by losh (2011-09-02 11:24:08)
Offline
ok, i did this:
$tblBank->setCss(array('text-align' => 'right'));
this aligns every text within the table...but i only need the CONTENT (not header) of ONE COLUMN (not all columns) aligned.
Offline
Pages: 1