chessboardjs
chessboardjs copied to clipboard
Chessboard does not resize with css "media" rule
I am trying to to resize my chessboard with the user screen like this:
@media only screen and (max-width: 600px) {
.chessboard {
width: 300;
}
}
This does not work though. After resizing the screen they will need to refresh the page, and my chess algorithm counts the player who "disconnected" the loser. Is there a way to resize the chessboard without refresh?
After a resize you need to make the js-call: board.resize(). See: https://chessboardjs.com/examples/3007