vote up 2 vote down
star

How do I set the color of the font in the welcome box?

I have changed my background color thanks to the following page: http://meta.stackexchange.com/questions/83/how-do-i-change-the-color-of-the-background-of-the-welcome-box

But now I still have a white font (the default setup), and wish to change that to my own chosen color.

I checked a page that does it with firebug but can't figure out the css bit I am looking for.

flag

2 Answers

vote up 1 vote down
check

If you want to target the Welcome module only, you can do this if you make sure your selectors are more specific than the ones in the default CSS.

For example the CSS below will set only the background of the contained element below the sidebar with both the module and newuser classes.

Similarly the second selector matches a, p or h1 elements within that element, so should match all the text. You may need to add other selectors with comma delimiters if you have other text elements to match (h2, h3 etc.).

#sidebar .module.newuser  {
	background: #FFFF00;
}

#sidebar .module.newuser a, #sidebar .module.newuser h1, #sidebar .module.newuser p{
	color: #FF0000;
}

Update: Note that this will also style the Question help section. If you want to only match the Welcome module, you can follow this answer, and add an inner div with an id (e.g. <div id="welcome">...</div>). Then set the CSS to match the nested elements of that div, e.g. #welcome a, #welcome h1, #welcome p { color: #FF0000; }

link|flag
hey rich, are you having trouble with the top bar links wrapping? Ever since the extra boot-strap links were added, it wraps.. thanks – debug Feb 4 at 18:19
I've not activated bootstrap, so not seen any related issues. Will have a look though – Rich Seller Feb 4 at 18:31
@Rich Seller Thank you! It works. – tucson Feb 4 at 18:43
vote up 0 vote down

I did this on my site, but it also changes anything else with newuser class.. which is what i wanted.. customize for your own site

.newuser {
background-color:#code;
color:#code;
link|flag
@debug, thanks but the line 'color:#code;' does not seem to change the color of the font... – tucson Feb 4 at 11:40
i know.. you need to add the color code you want.. – debug Feb 4 at 18:56
i assumed you had some experience. – debug Feb 4 at 18:57

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.