You can try using a RGBa color in the css. The "a" is for alpha channel where 0 is fully transparent.
As far as I see in my tests here, it seems like FileMaker always draws white behind the webviewer. even if you use transparent background in HTML, set web view to not draw background via plugin and make it transparent fill color in FM.
Just for testing this I added a function to MBS plugin to tell webviewer to draw transparent.
But it seems that works only for FM 11, but not for FM 13.
If you are looking for a transparent web viewer to display through to the underlying filemaker layout, I wouldn't expect this to be possible in any kind of reliable way. As you mention, if no color background is set in the html, it gets a default background color, which is typically white in most browsers.
Something you might be able to do is to match the background with the FM layout so it looks like it is transparent. I have done that before and it works OK, but can be a little bit of a pain to get just right with gradients.
+1 here. I have dealt with the issue of making the backgrounds match.
I actually ended up making the Web Viewer a darker hue than my background to make it stand out as a separate piece. I was using it as an interactive table, so it made sense to attract the user's eye there.
This may not work for your circumstances, but making the Web Viewer conform to the theme color you have while having a variation to stand out may work nicely.
I believe there are already better and easier method to add java or and html to your filemaker layout than using a limited webviewer. Scriptmaster from 360works lets you use Groovy on your layout. 360Works ScriptMaster: Free FileMaker Modular Plugin (all modules were created in Groovy) and with FMP 13 you can use fmpurl to pass data to filemaker from html, such as www.FMEasySignature.com. or FMEasyHTML | An Open Source HTML / Text Editor for the FileMaker Platform.
I'm exploring the possibility of using the dialog popover method that I linked to in the original post, but combining it with dynamic and flexible web-based dialogs, like the ones shown here:5 jQuery UI Dialog Examples | Salman's Web Development Blog
For this to work, though, the web viewer would have to be truly transparent, so the user could move the dialog around and see what's under it if necessary.
You are one very talented dude.
For those interested in this topic, I'd suggest taking a look at the sample file that user14047 posted.
While it may not go as far as Chris might have hoped for, it understands the motivating idea behind the post and does a super admirable job on OSX.
Thank you for sharing your idea and your code. I always enjoy seeing your code samples.