Reputation: 1
How can I add new line after each iteration in thymeleaf? th:each generated content is rendered on a single line.
<div th:each="table: ${mapEntry.value}">
<div>
<span th:text="${table}"></span>
</div>
</div>
Upvotes: 0
Views: 2684
Reputation: 5396
mrtasln is correct. Even you can add one more <div> </div>
or set some stylesheet with adding padding / margins for bottom
.
<div th:each="table: ${mapEntry.value}">
<div>
<span th:text="${table}"></span>
</div>
<div>
</div>
</div>
Upvotes: 0
Reputation: 614
You can do it with using <br>
or <hr>
tag before each statement finish.
<div th:each="table: ${mapEntry.value}">
<div>
<span th:text="${table}"></span>
</div>
<br/>
</div>
Upvotes: 1