Try adding another widget on top of the panel and adding the background to that?
If you are not familiar enough with the output html/css page structure in your browser you should inspect this with the MS Developer Toolbar plugin for IE and/or Firebug plugin for FF. They also allow you to change style values in the browser to see what will work for the layout before coding them. Also look at http://projectpossibility.org/projects/word_prediction/gwt-linux-1.4.60/doc/html/com.google.gwt.doc.DeveloperGuide.UserInterface.html Especially Understanding Layout and Style Sheets sections. BTW & OT Apologies if you know all this already. I come from a design/html/css/javascript background so this is my daily work, but I see how some java developers struggle with layout. They should be delegating the front-end to a front-end designer, but then these typically don't know java/oop! I'm learning it fast, but this can be a problem for gwt development I think. hth Alanj On Fri, Apr 3, 2009 at 9:49 AM, Hilbrand <[email protected]> wrote: > > This is a known issue; not being able to align the popup panel at the > right side via CSS: > > See, issue 1538 for details: > http://code.google.com/p/google-web-toolkit/issues/detail?id=1538&can=5 > > Hilbrand. > > On Apr 2, 5:26 pm, cj <[email protected]> wrote: >> That gets me pretty close. Thanks. >> Though, the background image is obscured by the image that is already >> added to the panel. I tried adding a high z-index value in the css, >> but that didn't fix it. >> >> Also, I am interested to know how to do this with html. >> >> Thanks >> >> On Apr 2, 10:09 am, alan m <[email protected]> wrote: >> >> > you could setStyleName(myCssName) on your existing panel, and then >> > place your image with css: >> >> > .myCssName {background-image:url("url"); >> > background-repeat:no-repeat; background-position:right;} >> >> > On Thu, Apr 2, 2009 at 4:58 PM, cj <[email protected]> wrote: >> >> > > Thanks for the correction on text-align. Though, that still doesn't >> > > work for me. >> > > I've tried the float attribute. It doesn't seem to have an affect. >> >> > > I should also clarify that I'm trying to right align an image on top >> > > of an existing panel. That is why I was originally playing with the >> > > PopupPanel. I've toyed with the AbsolutePanel, but that only aligns >> > > with the left and is even less functional when it comes to re-sizing. >> >> > > On Apr 2, 8:43 am, alan m <[email protected]> wrote: >> > >> FWIW the CSS syntax is "text-align:right;" >> >> > >> You could also try "float:right;" depending on what else is going on >> > >> in the layout. >> >> > >> hth >> >> > >> Alanj >> >> > >> On Thu, Apr 2, 2009 at 4:23 PM, cj <[email protected]> wrote: >> >> > >> > Thanks. I was hoping to avoid handling resize events. >> > >> > All I want to do is align an image or text along the right side of a >> > >> > panel. With straight HTML and CSS this can easily be done by using >> > >> > the align: right; style. With GWT, I can align things with the left >> > >> > side just fine. The set position method aligns with top and left. >> > >> > There doesn't seem to be support for aligning with the right side >> > >> > (unless listeners are implemented). This is a fundamental capability >> > >> > of HTML that I figured would be in GWT. I wanted to make sure that it >> > >> > isn't part of GWT before I try implement a workaround. >> >> > >> > By the way, searching for aligning with the right side returns >> > >> > virtually nothing. There are many results on listening for resize >> > >> > events, but I'm not looking for a hackish workaround. I'm looking for >> > >> > the basic HTML capability of aligning with the right side. Is the >> > >> > capability to aligning on the right side in GWT? >> >> > >> > On Apr 1, 11:15 pm, "alex.d" <[email protected]> wrote: >> > >> >> Well, once set, the position of the popup doesn't change by itself >> > >> >> when the window is resized. Why should it? You have to listen to the >> > >> >> "resize of window"-event and set the position of the popup manually. >> > >> >> Don't remeber the exact code lines - but you'll find plenty of >> > >> >> examples in this user group - just use search ;-) >> >> > >> >> On 2 Apr., 01:04, WebDude <[email protected]> wrote: >> >> > >> >> > Is it possible to align a PopupPanel with the right side of the >> > >> >> > window >> > >> >> > or the right side of a panel? >> >> > >> >> > I know that it could be done by getting the size of the window and >> > >> >> > setting the position of the PopupPanel based on that. However, if >> > >> >> > window is re-sized, the popup won't move with the re-size. This >> > >> >> > would >> > >> >> > be a simple "align: right" style attribute in CSS, but it gets >> > >> >> > ignored >> > >> >> > every time that I try to use it with a PopupPanel. >> >> > >> >> > Thanks > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
