Css not applied to component added to CssLayout

I have a problem adding components to a CssLayout dynamicly in vaadin. The last one added does not get the css attachted wich is deliverd by the String getCss(Component c) method. I use vaadin 6.
Here is an example of my code:

[code]
final CssLayout layout = new CssLayout()

  {
 @Override
 protected String getCss(Component c)
 {
    return "display: inline-block";
 }
  };
  layout.setImmediate(true);
  Button buttonA = new Button("Click Me!");

  buttonA.addListener(new ClickListener()
  {
 @Override
 public void buttonClick(ClickEvent event)
 {
    Label label = new Label("Clicked " + i);
    label.setImmediate(true);
    label.setWidth("-1px");
    layout.addComponent(label);
    i = i + 1;
 }
  });
  layout.addComponent(buttonA);

[/code]Everytime i press the button the new label does not have the syle display: inline-block, but all the previous created ones have.

What am I doing wrong?

Regards

Daniel

I just tested it using Vaadin 7.2.3 and it seems to work totally fine. What Vaadin version are you using?
Maybe in your version there is a problem which requires another server round-trip to update the client css…