Skip to content Skip to sidebar Skip to footer

Spring Boot + Thymeleaf Show Database Records In Custom Fragments

I have database records, which I want to show on the page in a certain way. For this reason I've created a thymeleaf fragment, which should be used as a template for all of the rec

Solution 1:

You can definitely achieve this without js and with just html and css because this is a styling challenge, so all you need is the correct css.

The reason that all your cards are stacked right now is that you're positioning every card at the exact same point in space (the middle of the screen) with these lines:

.officerWrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  ... }

You can achieve what you want by using flexbox or css grid. Neither is better than the other so you'll have to see what works for you. I'll leave you some references to check out.


References

Post a Comment for "Spring Boot + Thymeleaf Show Database Records In Custom Fragments"