Working in Visualforce, is there any way to set a class on the <body>
of my generated HTML page?
As a work-around, I could probably do something like the following, but would prefer to do this without any scripting:
<script>
$('body').addClass('{!VisualforceExpression}');
</script>
document.body.className += ' {!JSENCODE(var)}';
would save you loading jQuery ;-)apex:page
you can add atabStyle
attribute which will append a 'Tab' suffixed lowercase class of the same name. Of course, this is limited to the names of objects in the org and affects the theme!