I am trying to "center" a panel of text in the North DockLayoutPanel.
I get the following to work on firefox but not IE6.  On IE, it looks
like the widths are being ignored (or resized) and the position:
absolute causes problems.

Any suggestions on how I can "center" a panel?

public class Application implements EntryPoint{

   public void onModuleLoad(){
      DockLayoutPanel dock = new DockLayoutPanel(Unit.PX);

      Widget w = new HTML("Text To Center Goes Here!<br/><hr/>");

      LayoutPanel inner = new LayoutPanel();
      inner.add(w);
      inner.setWidth("960px");
      inner.addStyleName("centerstyle");

      dock.addNorth(inner, 50);

      RootLayoutPanel.get().add(dock);
   }

}

The style is:
.centerstyle{
  margin: 0 auto;
}

and in firefox this will center the "inner" panel.

TIA,
Chris....

-- 
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.

Reply via email to