Resize Chess Boards

The width and float attributes are optional attributes for the short tags. They can be used to override the default width of the chess views which is “matchParent”(100%). You can see an example of these attributes in use below:

This is an example of a dynamic sized board where I have set the width attribute and the float attribute. This is the tag

[chess game="2" tpl="1" width="60%" float="left"].

There is one thing that's important to know about these two attributes. They only applies to large screens. On Mobile devices, the width will always be "matchParent"(100%). If you which to override the width on all devices, an alternative is to put the chess short code inside a div element(text mode in the editor) and set it' style attributes width and height there. example:

<div style="width:70%;float:left">
 [chess game="2" tpl="1"]
 </div>

Share This:

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.