Adding button with background as transparent in CSS file.

Hi,

I want to add a button with its background as “transparent” in the CSS file as follow.

.button-style {
display: block;
width: 65px;
height: 40px;
background: transparent;
background-color:transparent;
border: activeborder;
}

It works for vaadin 6.2 but it doesn’t works for vaadin 6.4.
Please help me to solve this problem.

Thanks.
Udaynga

If having text-only button is what you are trying to achieve, I suggest adding style “link” to button and eventually then modifying its CSS to better suit your needs. Required code:

button.addStyleName(BaseTheme.BUTTON_LINK);

Which theme are you using, Reindeer or Runo? There were some changes in 6.4 for Runo buttons.

If it is Runo, then you need to set the background of the .v-button-wrap element to transparent as well:

.button-style .v-button-wrap {
   background: transparent;
}

You may need to override other properties as well, such as borders and paddings.