Re: Centering an image in a SimplePanel
Don't forget also to set "display: block;" if you use the auto margins on the image. -- 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-tool...@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.
Re: Centering an image in a SimplePanel
If you were using pure css to do this your outer container, a div, would have a width and the inner element, in this case an image, would set its left and right margins to auto causing the image to be vertically centered within its outer container. Try implementing the above using GWT semantics and it will work. If you are using UiBinder this is easy because you can attach the styles directly to your HTML tags either as styles or classes. On Thu, Dec 23, 2010 at 7:03 AM, UseTheFork wrote: > I found a workaround, I used an horizontal panel containing one > element and played with setVerticalAlignment/setHorizontalAlignment in > the code. It works, but it is not 'clean'. If anyone knows a better > solution, let me know. Thanks. > > On Dec 22, 11:41 pm, UseTheFork wrote: > > I forgot to mention: I use Uibinder. > > -- > 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-tool...@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. > > -- *Jeff Schwartz* -- 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-tool...@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.
Re: Centering an image in a SimplePanel
I found a workaround, I used an horizontal panel containing one element and played with setVerticalAlignment/setHorizontalAlignment in the code. It works, but it is not 'clean'. If anyone knows a better solution, let me know. Thanks. On Dec 22, 11:41 pm, UseTheFork wrote: > I forgot to mention: I use Uibinder. -- 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-tool...@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.
Re: Centering an image in a SimplePanel
I forgot to mention: I use Uibinder. -- 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-tool...@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.
Centering an image in a SimplePanel
Hi, What is the best way to put an image at the center of a SimplePanel? I am looking for a code example. Should I try to use a HTMLPanel instead of a SimplePanel? If yes how? 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 google-web-tool...@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.