For anyone who might be interested... for all I know Igor is right and the
DataTable component does not add any CSS itself. This seems very odd to me
as a default styling would be nice to have. Anyway, I managed to find the
styling used in the Wicket-examples page and i just added it to my own CSS.
Here it goes:

table.dataview {
        margin-bottom: 10px;
        border-bottom: 1px solid #0079d6;
        font-size: 1em;
        font-family: arial;
        width: 100%;
}
        
table.dataview caption { text-align: left; }
table.dataview tr { padding-top: 2px; padding-bottom: 2px; }
table.dataview tr.even { background-color: #ffebcd; }
table.dataview tr.odd { background-color: #fff; }
table.dataview tr td { padding-left: 8px; padding-right: 30px; }
table.dataview tr th { color: black; padding-top: 3px; padding-bottom: 3px;
padding-left: 8px; padding-right: 30px; background-color: #c1e4ff;
border-bottom: 1px solid #0079d6; border-top: 1px solid #0079d6; text-align:
left; white-space: nowrap; vertical-align: middle;}

table.dataview tr th { background-position: right;
background-repeat:no-repeat; }
table.dataview tr th.wicket_orderDown {
        background-color: #87cbff; background-image:
url(displaytag/img/arrow_down.png); }
table.dataview tr th.wicket_orderUp {
        background-color: #87cbff; background-image:
url(displaytag/img/arrow_up.png); }
table.dataview tr th.wicket_orderNone {
        background-image: url(displaytag/img/arrow_off.png);
}
table.dataview tr th a { font-weight: normal; }
table.dataview #message { padding-left: 3px; }
table.dataview caption { padding-bottom: 2px; }

Just remember to add the .dataview CSS class to your component markup like
this:
<table class="dataview" wicket:id="myTable"></table>
-- 
View this message in context: 
http://www.nabble.com/DefaultDataTable-gets-no-CSS-styling-tp24913804p25002913.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to