celltable - howto use an image as background of the entire table or at least for some rows

35 views
Skip to first unread message

David Gonzalez

unread,
Mar 15, 2012, 12:04:24 AM3/15/12
to google-we...@googlegroups.com
Hi,

I need to use an image as table background (as entire row background will works).
I tried this:

.cellTableOddRow {
background-image: url(image.jpg);
background-repeat: repeat-y;
width: 300px;
}

but it puts the image in each cell.
Is this possible?

Thx a lot! 

JoseM

unread,
Mar 16, 2012, 9:48:19 AM3/16/12
to google-we...@googlegroups.com
You can try a hack like this, although maybe the syntax would be a little different for you.

static {

StyleInjector.injectAtEnd("."+tableResources.cellTableStyle().cellTableHoveredRow()+" tr {background-image: url(image.jpg);}");

Adolfo Panizo Touzon

unread,
Mar 16, 2012, 10:54:12 AM3/16/12
to google-we...@googlegroups.com
I'm sure that isn't an elegant solution, but you can try this:

yourTable.getElement.getParentElement().....getStyle.setBackgroundImage(yourImageValue);

You must stop to call getParentElement(), when you be in the top of the table.

Regards,

Adolfo.

2012/3/16 JoseM <jose.a....@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/Keyy0fssIaUJ.

To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.



--
El precio es lo que pagas. El valor es lo que recibes.
Warren Buffet
Reply all
Reply to author
Forward
0 new messages