Hello
I am new to vaadin.I want to change the background color of horizontal layout. ? I m using custome chameleon theme in green color.
i figured it out by myself
Here the procedure for those who did not know
Under Wb Content make a directory like this VAADIN\themes\yourThemeName\style.css
then in style.css write @import …\currently using theme which is probably chameleon or runo or default i.e randier \style.css
then like css classes make a class say .backColor{ background: black;} and then
in your code where you wana use background color use as
yourComponent.setStyleName(“backColor”);
and dont forget to use setTheme(“yourThemeName”); in init function.
Thanks.
Mubasher,
Can you please share you class files.I am new to vaadin to if you share i will be grateful.
The way described here is for Vaadin 6 and isn’t really recommend anymore in 7.
If you create your project using ivy or maven the required files should already be there. For more information read through the corresponding chapters in the book starting with
https://vaadin.com/book/-/page/themes.html