Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Use of CSS for formatting - problem

Deleted User
1 decade ago Mar 03, 2012 12:28am
Deleted User
1 decade ago Mar 03, 2012 4:18pm

Risto Yrjänä: Hi. http://vaadin.com/book/-/page/themes.html has a good picture about this. Then:

1) Create the directory "MyProject/WebContent/VAADIN/themes/mytheme"
2) Create the file "styles.css" in the directory created above
3) In your styles.css file import a default theme. For example to import the reindeer theme, write

@import "../reindeer/styles.css";

With this you can leverage from the ready made theme, and don't have to do everything yourself.
4)Use setTheme("mytheme") in your application

You can find lots of good CSS tutorials by just googling, for example W3Schools

When I do this steps all my layout is simple gone with the error messages shown in my post before, please help me, I dont know what to do

Jean-François Lamy
1 decade ago Mar 03, 2012 7:49pm

Are you using Eclipse and its built-in support for running on a Server ? The WebContent part is specific to Eclipse and its Web support (WTP).

The VAADIN folder needs to be immediately NEXT to your WEB-INF folder *in the deployed application*. You need to know that the files in your develpment environment are not, usually, the ones that actually are used to run your application. Many development environments assemble the various pieces and COPY them to the web server (this is called application deployment).

So you need to find where your application is actually running, and check that AT THAT LOCATION, there are the WEB-INF and VAADIN folders side-by-side, at the top-level of your application.

Jean-François Lamy
1 decade ago Mar 03, 2012 7:54pm
Deleted User
1 decade ago Mar 03, 2012 7:57pm
Marko Grönroos
1 decade ago Mar 12, 2012 12:15pm
Lucas Genzelis
1 decade ago Apr 03, 2012 3:38am
Jouni Koivuviita
1 decade ago Apr 03, 2012 7:16am