aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/terminal/gwt/client/VCaption.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/vaadin/terminal/gwt/client/VCaption.java')
-rw-r--r--src/com/vaadin/terminal/gwt/client/VCaption.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/VCaption.java b/src/com/vaadin/terminal/gwt/client/VCaption.java
index 25c1d34ea4..a8a694b9eb 100644
--- a/src/com/vaadin/terminal/gwt/client/VCaption.java
+++ b/src/com/vaadin/terminal/gwt/client/VCaption.java
@@ -40,6 +40,8 @@ public class VCaption extends HTML {
protected static final String ATTRIBUTE_ERROR = "error";
protected static final String ATTRIBUTE_HIDEERRORS = "hideErrors";
+ private static final String CLASSNAME_CLEAR = CLASSNAME + "-clearelem";
+
/**
*
* @param component
@@ -192,17 +194,14 @@ public class VCaption extends HTML {
}
} else if (errorIndicatorElement != null) {
// Remove existing
- DOM.removeChild(getElement(), errorIndicatorElement);
+ getElement().removeChild(errorIndicatorElement);
errorIndicatorElement = null;
}
if (clearElement == null) {
clearElement = DOM.createDiv();
- DOM.setStyleAttribute(clearElement, "clear", "both");
- DOM.setStyleAttribute(clearElement, "width", "0");
- DOM.setStyleAttribute(clearElement, "height", "0");
- DOM.setStyleAttribute(clearElement, "overflow", "hidden");
- DOM.appendChild(getElement(), clearElement);
+ clearElement.setClassName(CLASSNAME_CLEAR);
+ getElement().appendChild(clearElement);
}
return (wasPlacedAfterComponent != placedAfterComponent);