How should I set a custom style on a object that is a gwt component?
I am using Java (Eclipse) and for the web development I use gwt. The object that I want to change (
loader) has a default font-size. It also has a method named
setHtml(String). I have almst no knowledge on on HTML and CSS and how should I integrate such files in java code. I've been told that I should write something like:
loader.setHTML("<span class = 'something>'" +.... ) What this something should be? Does it have to be an .css file and just the path to it?
There are two ways to do that.
First, you can define the rule in CSS. You do need to learn HTML and CSS for web development - no way around that.
Second, you can set a particular CSS property directly in your code: