[CustomLayout, PopupView, float] problem with positioning

Hi,

i’ve recently started to make some modification in our company project, it’s made with Vaadn and it’s making me mad…

Here’s the deal:

I’ve used CustomLayout to display some information inline. My html file looks like that:

<div class="metric_header_tekst_div" style="">
	<span class="header_metric_left" style="">
		<span class="bold header_tekst_metric" location="metric_title"></span> 
		<span class="bold header_tekst_metric" location="metric_date_intro"></span> 
		<span class="bold header_tekst_metric" location="metric_data"></span> 
	</span>
	<span class="header_metric_right" style="">
		<span class="header_tekst_metric" location="metric_wpis"></span> | 
		<span class="header_tekst_metric" location="metric_publicator"></span> | 
		<span class="header_tekst_metric" location="metric_raport_zbiorczy"></span>
		<div class="header_tekst_metric" location="metric_buttons" style="display: inline; "></div> |
		<span class="header_tekst_metric" location="metric_print"></span>
	</span>
<div class="c_l">&nbsp;</div>	
</div>

This displays single line of text with some links as PopupView. Those popups are in location=“metric_buttons”.

Method used for creation of this popup links is:

private SpgPopupView generatePopupView(final String type, String caption, Messages messages) {
		CssLayout layout = new CssLayout();
		final SpgPopupView pv = new SpgPopupView(caption, layout);
		HorizontalLayout hl = new HorizontalLayout();
		hl.setSpacing(true);
		layout.setMargin(true);
		layout.setWidth("330px");
		Label availableCount = new Label(messages.get("metric.report.available", new Object[] {reportCounterService.getAvailableReports()}));
		pv.setAvailableCount(availableCount);
		layout.addComponent(availableCount);
		layout.addComponent(hl);
		hl.setWidth("100%");
		
		Button generate = new Button(messages.get("metric.button.generate"));
		hl.addComponent(generate);
		hl.setComponentAlignment(generate, Alignment.MIDDLE_RIGHT);
		Button cancel = new Button(messages.get("metric.button.cancel"));
		hl.addComponent(cancel);
		
		generate.addListener(new ClickListener() {
			private static final long serialVersionUID = 1L;

			@Override
			public void buttonClick(ClickEvent event) {
				generateReport(type, krs);
				pv.setPopupVisible(false);
			}
		});
		
		cancel.addListener(new ClickListener() {
			private static final long serialVersionUID = 1L;

			@Override
			public void buttonClick(ClickEvent event) {
				pv.setPopupVisible(false);
				
			}
		});
		pv.addStyleName("link-no-underline");
		pv.addStyleName("label-with-underline");
		pv.setHideOnMouseOut(false);
		return pv;
	}

Solution: CSS directive (?)
!important
in my styles.