gwt - How to set a 5% margin when using RootLayoutPanel and DockPanel -


I am playing with GWT 2 and I find it very difficult to get the original page layout. Actually I am using a DocLayoutPanel where I am adding a reply (header), south (footer), west (navigation), and content area. I want to take a 90% page of the doctor panel and centered it will give a good 5% margin, however, due to the GWT, using this my general strategies (margin: auto) using the top, left, right, and bottom styles Is the center

How do I complete the GWT route?

By reading your question it is not clear what you are asking, but I think you Want the whole dock to have 5% margin in the panel?

All new * layout paneals in Gwt 2.0 use full position of CSS, which is why you are looking at the styles of top / left / right / bottom, this is the reason that you have a strategy for margin : Auto are not working.

DockLayoutPanel is really just for layout, I would suggest adjusting the margins of the widgets given inside the DockLightPanel to get you the desired effect.

I took a shot on it, and I came close to an answer but it is not correct I have put the label in the 10px margin in each dock panel, but the right and lower boundaries do not show that margin Are there.

  & lt ;! DOCTYPE UI: UiBinder SYSTEM "http: // dl .google.com / gwt / DTD / xhtml.ent" & gt; & Lt; Ui: UiBinder xmlns: ui = "kalash: ui: com.google.gwt.uibinder" xmlns: g = "blur: import: com.google.gwt.user.client.ui" & gt; & Lt; Ui: style & gt; .label {background: # 666; Color: #fff; Font size: 14pt; Padding: 5px; Margins: 10px; Height: 100%; Width: 100%; } Of the & lt; / Ui: style & gt; & Lt; G: dockLayoutPanel unit = 'PCT' & gt; & Lt; G: answer size = '10' & gt; & Lt; G: label addStyleNames = "{style.label}" & gt; Top & lt; / G: Label & gt; & Lt; / H: Answer & gt; & Lt; Six: Center & gt; & Lt; G: label addStyleNames = "{style.label}" & gt; Body & lt; / G: Label & gt; & Lt; / G: center & gt; & Lt; G: west size = '10' & gt; & Lt; G: label addStyleNames = "{style.label}" & gt; West & lt; / G: Labels & gt; & Lt; / Six: West & gt; & Lt; G: south size = "10" & gt; & Lt; G: label addStyleNames = "{style.label}" & gt; South & lt; / G: Labels & gt; & Lt; / H: South & gt; & Lt; / G: DockLayoutPanel & gt;  


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -