MyBB Community Forums

Full Version: Need a few CSS help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In my board_messages.css

.board_message {
	background: #333333 url(/images/bmessages/blue.gif);
	color: #333333;
	border-top: 2px solid #003366;
	border-bottom: 2px solid #003366;
	padding: 5px;
	margin-top: 10px;
}

.yellow_board_message {
	background: #333333 url(/images/bmessages/yellow.gif);
	color: #333333;
	border-top: 2px solid #CCC000;
	border-bottom: 2px solid #CCC000;
	padding: 5px;
	margin-top: 10px;
}

.green_board_message {
	background: #333333 url(/images/bmessages/green.gif);
	color: #333333;
	border-top: 2px solid #669900;
	border-bottom: 2px solid #669900;
	padding: 5px;
	margin-top: 10px;
}

.red_board_message {
	background: #333333 url(/images/bmessages/red.gif);
	color: #333333;
	border-top: 2px solid #993300;
	border-bottom: 2px solid #993300;
	padding: 5px;
	margin-top: 10px;
}


I tried to put the a:link codes in it because I want to change the colors of the links in the board messages to a custom color but when I tried to edit the a:link codes in that stylesheet, all links including those outside the boardmessages got changed. How am I able to change the color of the link in the boardmessages stylessheets and should only change those in the boardmessages. Let's say style 1

Blue background and blue link

Green Background and Green Link


Each "color_board_message" style will have different colored links

Help?
Try <div class="board_message" id="yellow">

div.board_message {} = only dimensions/padding in pixels

div#yellow a{}, div#blue a{}, etc. = set font color / border
What I want to change is the link font color
"Subclasses":
div.yellow_board_message a:link {
   color: #314159;
   ...
}

div.blue_board_message a:link {
   color: #466F78;
   ...
}

...