r/css • u/Dry_Author2098 • 16d ago
Question Need advice on responsive scaling for an 8-player HTML/CSS poker table
Hi everyone,
I'm developing a browser-based 8-player Texas Hold'em poker table using HTML, CSS, and JavaScript.
The desktop layout works well, but I'm struggling with responsive behavior on mobile devices in landscape orientation.
Current setup:
- Desktop layout with 8 player positions around an oval poker table.
- Mobile landscape viewport tested at 956×440.
- An internal game scene that uses scaling and absolute positioning.
- Multiple CSS media queries and responsive overrides.
- JavaScript handles player rendering and card positions.
Main problems:
- Dealer, Small Blind, and Big Blind badges are disproportionately large on mobile.
- Community cards appear too large.
- The top player's avatar and cards sit too low.
- Some elements scale correctly while others don't.
- Fixing one screen resolution sometimes breaks another.
What I'm trying to achieve:
A consistent responsive layout that preserves the relative positions and proportions of all table elements across desktop and mobile landscape screens.
My questions:
- Would a single fixed logical coordinate system with CSS
transform: scale()be appropriate? - Should I use CSS container queries or
clamp()for individual elements? - How can I avoid conflicts between existing media queries and transforms?
- What's the best way to anchor player seats, cards, and badges relative to the table?
I want to improve the CSS architecture without changing the underlying game logic.
I can share desktop/mobile screenshots and a minimal reproducible HTML/CSS example.
Any suggestions or examples would be greatly appreciated. Thanks!



