How to center a DockLayoutPanel in the page

83 views
Skip to first unread message

Sanjay

unread,
Sep 14, 2011, 1:41:39 PM9/14/11
to Google Web Toolkit
Hi All,

I want to have my DockLayoutPanel of width 1000px to get centered in
the page in stead of left aligned. Using UiBinder. Tried a lot but not
able to know how to have this. Need some help. Thanks.

- Sanjay

Ashwin Desikan

unread,
Sep 14, 2011, 10:00:03 PM9/14/11
to google-we...@googlegroups.com
Add additional CSS styling to the panel

.center {
Margin-left : auto;
Margin-right : auto;
}

.width {
Width: 1000px;
}

<DockLayoutPanel addStyleNames="{style.center} {style.width }">
</DockLayoutPanel>


Thanks
Ashwin
Sent from my iPhone

> --
> 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-we...@googlegroups.com.
> To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
>

Sanjay

unread,
Sep 15, 2011, 12:54:10 AM9/15/11
to google-we...@googlegroups.com
Exactly what I wanted. Thanks a lot!
Reply all
Reply to author
Forward
0 new messages