You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Sascha Djuric <Sa...@gmx.de> on 2007/01/03 17:27:57 UTC

changing styles in tobago

Hello people 

Im fairly new to MyFaces/Tobago. I just finished doing my first application with Tobago and everything seems fine, just I should change its appearance according to company rules. Now I dont want to create my own theme, but Tobago offers no style or styleClass attributes. What is the easiest way to change css parameters in tobago?

Thanks in advance
  Sasa

Re: changing styles in tobago

Posted by Volker Weber <we...@googlemail.com>.
Hi Sascha,

you can add (and configure in the tobago-config.xml) a resource
directory for tobago to your application.

in this directory you need to create the tobago resource directroy
structure and there you can put a file "style.css" to overwrite the
styles.

e.g. to change the background color of the box in speyside theme to yellow:

1. create a directory "tobago-resource" in your webapp.
2. configure this directory as tobago resource directory in tobago-config.xml
     <resource-dir>tobago-resource</resource-dir>
3. create the tobago resource directory stucture in this directory
    "html/speyside/standard/style"
4. create a file with name "style.css" here with this content:
  .tobago-box-content {
    background: yellow;
  }

thats all.

But be carefull changing any other than colors! You may destroy the
layout, because layout calculation depends on the "known" sizes,
borders, margins etc.

Regards,
  Volker


2007/1/3, Sascha Djuric <Sa...@gmx.de>:
> Hello people
>
> Im fairly new to MyFaces/Tobago. I just finished doing my first application with Tobago and everything seems fine, just I should change its appearance according to company rules. Now I dont want to create my own theme, but Tobago offers no style or styleClass attributes. What is the easiest way to change css parameters in tobago?
>
> Thanks in advance
>   Sasa
>