HTML/CSS Implementation

Hi there,

This may have been answered elsewhere, so apologies if it was, but I couldn’t find an answer. What version of HTML/CSS is implemented in the VASSAL engine? I’m thinking the version is module agnostic but, just in case, I’m working in the VASL module. I’m trying to enter some HTML through a label and everything in my code is implemented except the CSS box-shadow property. I simply can’t get that to work, and I’m wondering if it’s because the box-shadow property is a CSS3 property. For reference, below is my sample code that I can get to work in MSFT Edge and Google Chrome, but not in VASSAL (I’ve added the comment tags for this post, they aren’t in the actual code):

Thanks for the help!


Hi Stu,

HTML/CSS is not implemented by Vassal, it is what is implemented by Java Swing which Vassal is built on. I can’t remember which version that is off hand, but it is ancient.


PS. Ok the version supported by Swing is 3.2 from 1996 (no, I am not joking). Look at these links for details of what is supported: … L.Tag.html … l/CSS.html

Thanks for the information and links, Brent! Wow, that is old. Well, to be honest, the last time I actually really developed in HTML was the late 90s, so maybe I’ll just stick with what I know and not look up anything new :laughing:

I haven’t been following the non-java development of VASSAL, which I guess will be 4.0, but maybe I should dive into that a little more to see what, if any, HTML/CSS implementation will be forthcoming.

Thanks again!

We really need more from HTML in the Vassal. It is really hard to get a user experience in antique HTML. I know there are a lot of requests but this one would be top of the list especially if there were support for Javascript on those pages. You could do really easy calculators there. Easier than Java since I don’t know Java… lol

Sorry, No can do.

The limitation on the ancient version of HTML supported is not from Vassal, it’s from the Java Swing UI the game is built on. There is nothing we can do in V3. V4 will have full support for modern HTML and CSS.

Amen…:slight_smile: 20 years almost there

Hi All;
Hope you had a nice Xmas and New Year.

I also have a html question so will ask it here. Is it possible to use html for images in right-click menus? I can get to work in the Chat window for dice etc. but not in the right-click menu text. When using this example for an image…

<html><img src="Dice_Medical.png" width=14 height=14></html>

…I get this…


I can get it to work in the Chat window no prob and html also works in the right-click menu with text but not images. Might this be available at some point in the future or am I doing something wrong?



No idea if this will work, but have you tried img src="images/Dice_Medical.png" instead? The root directory may be different for the right-click menu (and all the module images are stored in the images subfolder).

1 Like

Hello Jonathan;
Thanks for the reply I will try your answer tomorrow after work. The Chat window uses the images folder but yeah I see what you mean. Thanks.


That’s unlikely to work anywhere except in the Chat Window and in Charts. We had to add special code to those features to get it to work. It’s not possible to add that as a generic feature in all places.

FWIW, this is an example of behavior I don’t think should be modifiable by designers.

Right click context menus should have standard behavior/appearance across modules and the only change should be the ability of players (not designers) to increase font sizes for accessibility.

I concur (in part). Context menus (and other UI elements) should be consistent with the theme the user has in their desktop environment. Whether there are icons in context menus (and other things, like the color and size of text in context menus) is a property of the user’s desktop environment and should not generally be set per-application.

In the event that you can set icons, text size, text color, etc. on context menu items, this is not an intentional feature. You should not rely on it, and it could cease to work at any time.

Ok thanks Brent

Ok will have to settle for this…
New Menu

when it could be this…


Thanks guys.


I strongly discourage you from doing that. You have no way of knowing how the colors you’re setting for the menu item backgrounds will contrast with the user’s desktop theme. The menu could end up totally illegible for some users.

Speaking as a Vassal user, module designer, and Trekkie :>, even if this did work, I would urge you to always use words in addition to the icons. Icons, especially small icons, are sometimes difficult to resolve for people w/ poor vision or certain cognitive issues…

Cool looking game, what is it?

1 Like


It is a free Solitaire Print & Play called “Star Trek - The Dice Game”, lots of fun and easy to learn. A module has already been created for it here. Mine will be a little different.


I will be using the more stable Text only it is a shame that Vassal does not support image html in this field IMO but no big deal. Other features that would be nice (but maybe impossible) are some of the those available in Browsers such as Fullscreen and customisable Window borders.