Inserted margin 12px around content in portlet (Liferay 6.1.0)


The outer components in a portlet of mine is [code]

private final VerticalLayout viewContent = new VerticalLayout();

mainWindow = new Window();


What I get in the page is this:

<div style="" id="v-ipseassetspublisher_WAR_IPSEAssetsportlet_INSTANCE_owcH2A9G7bUx_LAYOUT_16504" class="v-app v-theme-liferay v-app-IPSEAssetsPublisher">
	<div id="aui_3_4_0_1_9874" style="" tabindex="1" class="v-view">
		<div class="v-loading-indicator-wait" style="position: absolute; display: none;"></div>
		<div id="aui_3_4_0_1_9873" class="v-verticallayout" style="overflow: hidden; width: 634px; height: 344px;">
			<div id="aui_3_4_0_1_9872" style="overflow: hidden; margin: 12px; width: 610px; height: 320px;">
				<div id="aui_3_4_0_1_9871" style="height: 320px; width: 610px; overflow: hidden; padding-left: 0px; padding-top: 0px;">
					<div id="aui_3_4_0_1_9870" style="float: left; margin-left: 0px;">
						<div id="aui_3_4_0_1_9869" class="v-verticallayout ...

where it seems class v-view is for main Window. The last line is the viewContent vertical layout, I’m absolutely sure.

In line 5 there is
style="overflow: hidden; margin: 12px;
. That is a 12px margin I don’t know who put it there. The other portlets in the same portal don’t have that margin, but all my Vaadin portlets include it. How to erase it?


This margin came from the Theme as far as I remember. Unfortunately (in this case, because actually I’m pretty happy about it) we made Vaadin Ltd to create us a new theme, so I don’t know where to look for the margin. But maybe a simple grep for “margin: 12px” might already do it?!?

I wasn’t worried about that margin until I had to build a Vaadin based Asset Publisher, category navigation, a truly useful related content portlet and text filter. When an article is rendered, there is a non acceptable margin of 12px around it; and that is specially important when real estate is not too big. For instance, related content portlet is assigned usually a small real estate.

I’ve been searching for 12px in liferay theme, in styles.css and window/window.css. There are a lot of 12px strings but I don’t think any of them is the right one.

Even, I prefer that setting may be done dynamically, not by altering the theme.



The margin is most likely coming from the main VerticalLayout inside the applications main window. So a simple ((VerticalLayout) mainWindow.getContent()).setMargin(false); should cure the issue.

Currently have the same problem using Liferay 6.2.0 out of the box. The current ideas are not working. Any idea?