- You need create (or use existing) the custom css file (e.g: my-custom.css')
- Add your css classes.
- Save in wwwroot folder, e.g: 'customcss/my-custom.css'
- Load the saved css fle into project via ContentFiles.
delphi codeIWForm1.ContentFiles.Add('customcss/my-custom.css');
- Done, now you can use/add your custom css classes in components.
Another way, by using the ExtraHeader property of IWForm:
- Just put your css classes inside <style></style> tag:
delphi codewith ExtraHeader do
begin
Add('<style type="text/css">');
Add(' .my-css-class1 { color: #FFF; font-size: 12px; }');
Add(' .my-css-class2 { background-color: red; }');
Add(' .my-css-class3 { border: 1px solid #000; }');
Add('</style>');
end;
Useful links:
- CSS Tutorial: http://www.w3schools.com/css/DEFAULT.asp
- IW ContentFiles property: http://docs.atozed.com/docs.dll/classes/TIWBaseForm.html
Best Regards.