Re: DefaultDataTable gets no CSS styling
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: -- 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
Re: DefaultDataTable gets no CSS styling
Are you sure? Other components, such as ModalWindow, comes with styling included. You just add the component and it adds the appropriate CSS itself. I can see in the markup produced for the DefaultDataTable that the table rows have the classes "odd" and "even", am I supposed to define these classes in my own CSS? igor.vaynberg wrote: > > you are supposed to provide your own css > -igor On Tue, Aug 11, 2009 at 1:35 AM, Lukas Wilczek wrote: > Hi, > > I'm trying to use a DefaultDataTable and it shows with correct data > but it has no styling at all. When I view source in the browser I > can't see any CSS file that has been added to the markup (apart from > my own and the one for ModalWindow). I've looked through the source > folders for Wicket Extensions and I can't see any suitable CSS file > there either. I've probably missunderstood how this works, please help > me understand :) > > I'm using wicket 1.4.0 > > Thanx > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/DefaultDataTable-gets-no-CSS-styling-tp24913804p24950509.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