>From what I know a Label and SimplePanel both translate to a div on compilation, so what you are trying to achieve is centering a div within a div. What I think is happening is by default the inner div should take up the whole interior width so centering cannot occur.
Try giving the inner div an arbitrary width (say 50%) and auto margin eg. width: 50%; margin: auto; If you need the width of the label to be more dynamic and fit the text in a more dynamic using something that will translate to a table (horizontal / vertical panel) should work out better and only need margin:auto (although I'm not sure if its the best widget to use but it should achieve what you want) On May 6, 9:39 pm, Magnus <[email protected]> wrote: > Hi, > > how can I center a Label within a SimplePanel so that it works in IE7? > > I tried nearly every combination of: > > getStyle().setVerticalAlignment > getStyle.setProperty("display","table-cell"); > and others > > It always does not work in IE7. > > Magnus -- 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.
