tipsy / j2html

Java to HTML generator. Enjoy typesafe HTML generation.

Home Page:https://j2html.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding style to html element

fpeluso opened this issue · comments

Hi guys, I was trying to add style to a single HTML element but it seems the style is completely ignored. Maybe I'm missing something?

The code I'm using:

table(
                tbody(
                        tr(attrs("#theader"),
                                td(
                                        b("someVariable")
                                ),
                                td(""),
                                td(
                                        "anotherVariable")
                        )
                ),
                tr(
                        td(
                                b("aVariable")
                        ),
                        td(""),
                        td(""),
                        style("#theader {margin-bottom: 100px;}")
                ),
                tr(
                        td("anInformation"),
                        td("anotherInfo"),
                        td("someRecap")
                )
        ).renderFormatted();

Hope this question is compliant with policies, thanks a lot if you could help

sorry guys, maybe I've found a solution