Forum:Styles dependent on namespace

Is there a way to change the layout of pages in a single namespace? I'm thinking about giving talk and forum pages a slightly different layout, e.g. a different background color, than articles. Many inexperienced users seem to have problems to differentiate between articles (allowed to change all content, no signatures) and talk/forum pages (not allowed to alter others' comments, signature required). -- Weas-El  Talk|Contribs  08:44, April 27, 2011 (UTC)


 * Yes, through CSS and using the number that is assigned to each namespace.  needs to be added at the beginning of the line. For example:   would change the colour of all text on user pages to white. (Numbers: the main article space is 0, article talk pages 1, user pages 2, user talk 3, project 4, project talk 5 etc. etc.)  The 888th Avatar   (talk)  09:05, April 27, 2011 (UTC)


 * Thank you :-) -- Weas-El  Talk|Contribs  09:20, April 27, 2011 (UTC)


 * I added the following section to MediaWiki:Wikia.css:

 .ns-1 #WikiaMainContent, .ns-110 #WikiaMainContent { background-color: #dbf0dd; }

.ns-1 #WikiaPageHeader details, .ns-110 #WikiaPageHeader details { background-color: #bbe0bd; background-image: none; }
 * I get a green background on talk and forum pages in Firefox 3.6.16, but not in IE7 or Opera 11.10. See this page for example. Any ideas? -- Weas-El  Talk|Contribs  11:49, April 27, 2011 (UTC)
 * IE7 is so old, it doesn't even have DOM Exceptions or full CSS2 compatibility - you might want to use something a bit more up-to-date. Not really sure what to do about Opera, though.
 * So does it work with newer versions? I can't test it, I have no authorization to install new software on this computer. And to tell the truth, I don't care much about Opera... ;-) I was just testing all available browsers. -- Weas-El  Talk|Contribs  13:52, April 27, 2011 (UTC)


 * It works in IE9 and Safari. Your code is valid CSS, so if a browser can't interpret it correctly it would be the fault of the outmoded browser. ~ Gardimuer { ʈalk } 14:21, April 27, 2011 (UTC)


 * Thanks for testing. -- Weas-El  Talk|Contribs  14:36, April 27, 2011 (UTC)


 * Also, all talk pages share the "ns-talk" class.--AB 14:43, April 27, 2011 (UTC)