FANDOM


This Forum has been archived

Visit the new Forums
Forums: Index Help desk Editing div class user message
FANDOM's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.

50px-Replacement filing cabinet.svg

Note: This topic has been unedited for 3404 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.

I have another coding query. I want to change the backgound colour of w:c:psychology:Template:expert from the yellow to #ccccff; and it looks as though I have to edit <div class="usermessage"> but I dont know where to find it. Will I have to add code to Common.css? what should it be? All help appreciatedDr Joe Kiff 11:04, 15 July 2007 (UTC)

If you only want to change the color for Template:Expert, I'm not sure what to do, but if you want to change the background color of the entire usermessage class, add the following to Monobook.css:
.usermessage {
	background-color: #ccccff;
	border: 1px solid #ccffff;
	color: black;
	font-weight: bold;
	margin: 2em 0 1em;
	padding: .5em 1em;
	vertical-align: middle;
}
That should do it, but if you wait a little while Splarka probably has a bettar way to do it. --GPT(talk)(eating) 11:15, 15 July 2007 (UTC)
Delete class="usermessage" and add instead: style="background-color: #ffce7b; border: 1px solid #ffa500; color: black; font-weight: bold; margin: 2em 0 1em; padding: .5em 1em; vertical-align: middle;", changing "#ffce7b" for the background color you want. --Ciencia Al Poder (talk) -@WikiDex 14:05, 15 July 2007 (UTC)
By using<div class="usermessage"> you are totally depending on the class type usermessage configuration and that is work out from your monobook (all monobook users) or your common (for all the skins). By altering the usermessage following GPT advice you will modify all all the msg you recieve eg some one just edited your talk page, then you get a msg with the same color you just change. If you follow Ciencia al poder you will only have to modify the template instead of tampering with the monobook and affecting everything that uses class "usermessage" --Cizagna (Talk) 15:05, 15 July 2007 (UTC)
Yah, what they said. Easiest is to create your own new class, use it in that template, and add it to MediaWiki:Common.css --Splarka (talk)