On 28 avr, 08:31, dduck <[email protected]> wrote:
> Hi,
>
> I am new to CSS, but not to programming.
>
> I would like to apply a table style that I like (http://icant.co.uk/
> csstablegallery/index.php?css=3#r3) to a Grid, but I don't know how to
> proceed. Just adding the table CSS to the GWT project's CSS screws
> with the general page lay-out, so I assume that GWT uses tables
> internally for page lay.out.

Yes, in many places (HorizontalPanel, VerticalPanel, TabPanel,
DecoratorPanel, etc.)

> What do I do from here?

1. understand how CSS works
2. understand the DOM created by GWT widgets (tools like Firebug for
Firefox, Safari/Chrome's Web Inspector, IE8's Developer Tools, IE6/7's
Developer Toolbar or Opera's developer tools really help)
3. replace all occurences of "table" in the CSS with .gwt-Grid (or
eventually some "style name" of your own that you'd apply to your grid
with addStyleName)
4. GWT doesn't generate <thead>s, so replace them with a style name of
your own that you'd apply to a given row using the Grid's
RowFormatter's addStyleName)
5. Same for <tfoot>s
6. Same for <th>s but using the CellFormatter
7. Apply the "odd" style name to the appropriate rows (same method,
grid.getRowFormatter().addStyleName(rowIndex, "odd"))
8. There's no easy solution for the <caption> (the solution isn't
actually quite hard: insert the <caption> using the DOM-level methods,
e.g.: grid.getElement().appendChild(captionElement))
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to