CSS border styles do not work

I have a html area to show the timetable. In the I use a definition. Using for example:

  • border: 1px solid red;
    → does not work

  • border-width: 1px 1px 1px 4px;

  • border-color: red, green, blue, yellow;
    → creates a 2px black border around the cell

  • border-top-width: 2px;

  • border-top-color: red;
    → see attached screenshot (behaves very strange)

adding border-right-width, border-right-color, border-bottom-width etc. creates the same rendering as above, regardless of the defined color(s)

To my experience the border tags don’t work at all or not as expected (in this setting). Can someone confirm this behavior?

Regards,

Maybe it’s easier to use a Java FX panel for this (see https://github.com/Servoy/svyJFXWebView)? Then you can do almost anything. I also had a lot of issues like that the other day with the normal Java html renderer…

Thanks for the hint Patrick. But as these are CSS styles supported according to the documentation in Servoy 7 → https://wiki.servoy.com/display/Serv7/S … properties, I still would expect them to work. Otherwise it make no sense to define them as “supported styles”.

patrick:
Maybe it’s easier to use a Java FX panel for this (see https://github.com/Servoy/svyJFXWebView)? Then you can do almost anything. I also had a lot of issues like that the other day with the normal Java html renderer…

The CSS classes mentioned apply to Servoy elements, not stuff you do in a HTML area. The border you complain about is not rendered by Servoy, it is rendered by the Java renderer of the HTML area component (and that is terrible). The only border Servoy controls in your setup is the one around the whole calendar (HTML area).

And I think as soon as you use inline styles, your borders will be fine even with that renderer…

Thanks for the explanation, Patrick.

patrick:
The CSS classes mentioned apply to Servoy elements, not stuff you do in a HTML area. The border you complain about is not rendered by Servoy, it is rendered by the Java renderer of the HTML area component (and that is terrible). The only border Servoy controls in your setup is the one around the whole calendar (HTML area).

This inline code does not work:

timetableForClass += '<td style = "border-left-width: 2px; border-left-color: #ff0000; border-left-style: solid; background-color: #b5d5ff;">' + lessonInfo*[j] + '</td>';*
*```*
*This does work:*
*```*
_timetableForClass += '<td style = "border-width: 2px 2px 2px 2px; border-color: #ff0000; border-style: solid; background-color: #b5d5ff;">' + lessonInfo*[j] + '</td>';*_
_*```*_
_*This does not work (only border-width changed):*_
_*```*_
<em>_timetableForClass += '<td style = "border-width: 0px 0px 0px 2px; border-color: #ff0000; border-style: solid; background-color: #b5d5ff;">' + lessonInfo*[j] + '</td>';*_</em>
<em>_*```*_</em>
<em>_*> patrick:*_</em>
<em>_*> And I think as soon as you use inline styles, your borders will be fine even with that renderer...*_</em>

So now you can either fiddle around until you find old school html that the renderer can handle or use the FX bean to show any html you want.

How will “old school” HTML be affected with the arrival of the NGClient? Will it have the same issues or will it differently, better support CSS and HTML?

patrick:
So now you can either fiddle around until you find old school html that the renderer can handle or use the FX bean to show any html you want.