but you may be setting the wrong path... unless your css file is located on
the same page as the html...
otherwise you would be looking at:

blablabal/*css*/images/bgleer.jpg from your css
*
*
*and *

blablabal/images/bgleer.jpg from your GWT/html code

On Wed, Jul 29, 2009 at 5:22 AM, Rodrigue Lagoue <rlag...@googlemail.com>wrote:

> Hi Ed
> at first thanks for your answer.
>
> "1) If yes: then you have your solution as you only have to set the CSS
> name on your widget/panel through for example setStyleName(String)."
>
> it's the first thing i tried. But it didn't work at all. here is a listing
> of the involved part in my css file:
>
> *.rightPanelReservedZone {*
> * **background-image: url(images/bgleer.jpg);*
> * **background-repeat: no-repeat;*
> * **background-attachment: fixed;*
> * **font-family: Arial, Helvetica, sans-serif;*
> * **font-size: 12px;*
> * **font-style: normal;*
> * **font-weight: normal;*
> * **height: 90%;*
> * **width: 85%;** *
> *}*
>
> and i then add a new style by calling:
>
>
> *//rightPanel.addStyleName("rightPanelReservedZone");*
> * **rightPanel.setStyleName("rightPanelReservedZone");*
> *
> *
> Like you can see, i tried the both methods, but without success.
>
> I thought it could be a problem with the image's path. But to my surprise,
> i the image was found as i try the following *panel.add(new
> Image("images/pic.jpg"))*.
>
>
>
>
>
> On Wed, Jul 29, 2009 at 9:38 AM, Ed <post2edb...@hotmail.com> wrote:
>
>>
>> Do you know how to set the background-image of any html tag, like a
>> DIV through CSS?
>>
>> 1) If yes: then you have your solution as you only have to set the CSS
>> name on your widget/panel through for example setStyleName(String).
>> 2) If not: please have a look at some HTML book how to do this and go
>> back to 1)...
>>
>> Extra info: go through a a tutorial of GWT, as it's basically the
>> first thing they explain..
>>
>>
>>
>
> >
>


-- 
Quer aprender a programar? acompanhe:
Wants to learn GWT? Follow this blog ->

http://tcninja.blogspot.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to