Thanks for your answer.
"Now by can't be configured from the backend, do you mean that you can't CHOOSE which css file to attach?"
Never mind what I said. I could change the CSS if I wanted to (although I put it in the project rather than in the backend), and yeah, I'd actually have a lot of flexibility. So it doesn't really matter.
If the client wants something different later on, then it'll just take a new build and deployment, which is fine.
For the record, this is my code in the MasterPage, which works fine (not sure if it's the best way to do it though):
sender, EventArgs e)
/// Sets a body CSS class depending on the current section.
SiteMapNode currentNode = SiteMapBase.GetCurrentProvider().CurrentNode;
SiteMapNode root = currentNode.RootNode;
(currentNode == root)
SiteMapNode section = currentNode;
(section.ParentNode != root)
section = section.ParentNode;
Guid id =
PageNode page = PageManager.GetManager().GetPageNode(id);
keywords = page.Page.Keywords;
cssClass = !keywords.Contains(
keywords : keywords.Substring(0, keywords.IndexOf(
A little hack: I use the first keyword to define the wanted CSS class. My site is multilingual, so I can't use the Title, UrlName, or anything else. I *could* use the Guid (and prefix it, 'cause a CSS class can't start with a number), but that'd lead to dirty CSS class names.