Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Button doesn't sets margin

    Hello,

    I am trying to apply a custom css style to one of my buttons (Button class). I am doing this by calling myButton.setBaseStyle("myStyle"). The problem is that all css attributes are applied except margin-left.

    I am using SmartGWT v. 2.5 and GWT 2.4.0. This problem is consistent on all the browsers i tried: Firefox, Chrome and IE. I also checked with fireBug and the styled is applied correctly except the margin.

    Here is the code sample that i used:

    JAVA
    Code:
    Button button = new Button("test");
    button.setBaseStyle("cancelBtnBox");
    	
    contentVLayout = new VLayout();
    contentVLayout.addMember(button);
    contentVLayout.addMember(new Button("test2"));
    and CSS
    Code:
    .cancelBtnBox {
    	margin-left: 16px;
    	-webkit-border-radius: 3px 3px 3px 3px;
    	-moz-border-radius: 3px 3px 3px 3px;
    	-ms-border-radius: 3px 3px 3px 3px;
    	-o-border-radius: 3px 3px 3px 3px;
    	border-radius: 3px 3px 3px 3px;
    	cursor: default;
    	font-size: 11px;
    	font-weight: bold;
    	margin-right: 16px;
    	min-width: 54px;
    	height: 27px;
    	background-color: #F5F5F5;
    	background-image: -webkit-linear-gradient(center top , #F5F5F5, #F1F1F1);
    	background-image: -moz-linear-gradient(center top , #F5F5F5, #F1F1F1);
    	background-image: -ms-linear-gradient(center top , #F5F5F5, #F1F1F1);
    	background-image: -o-linear-gradient(center top , #F5F5F5, #F1F1F1);
    	background-image: linear-gradient(center top , #F5F5F5, #F1F1F1);
    	border: 1px solid rgba(0, 0, 0, 0.1);
    	color: #444444;
    }
    Please help me
    Thank you
Working...
X