B4J Question CSS File Not Working.

XbNnX_507

Active Member
Licensed User
Longtime User
Hi All,

I have a little issue here.
In Extra CSS Property of TextField in the Designer this code works fine:
B4X:
-fx-border-width: 0 0 2 0;
-fx-border-color: red;
-fx-background-color: transparent;

When i put the above code in a css file and add it to MainForm.StyleSheets.add("mycss.css")
it just don't work. Why?

mycss.css is file is like this:
B4X:
.text-field {
-fx-border-width: 0 0 2 0;
-fx-border-color: red;
-fx-background-color: transparent;
-fx-text-fill: red;    '<- this is the only thing that takes effect
}
 
Top