MyBB Community Forums

Full Version: Buttons?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How do I edit my buttons in my header look like this :

[Image: 52o97.png]

?
The button HTML:
<span class="button"><img src="images/home.png" />&nbsp;Home</span>

The CSS:
.button {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #ffffff;
	padding: 6px 20px;
	background: -moz-linear-gradient(
		top,
		#212121 0%,
		#262626);
	background: -webkit-gradient(
		linear, left top, left bottom, 
		from(#212121),
		to(#262626));
	-moz-border-radius: 3px;
	-webkit-border-radius: 3px;
	border-radius: 3px;
	border: 1px solid #000000;
	-moz-box-shadow:
		0px 1px 3px rgba(255,255,255,0.5),
		inset 0px 0px 1px rgba(255,255,255,0.7);
	-webkit-box-shadow:
		0px 1px 3px rgba(255,255,255,0.5),
		inset 0px 0px 1px rgba(255,255,255,0.7);
	box-shadow:
		0px 1px 3px rgba(255,255,255,0.5),
		inset 0px 0px 1px rgba(255,255,255,0.7);
	text-shadow:
		0px -1px 0px rgba(000,000,000,0.4),
		0px 1px 0px rgba(255,255,255,0.3);
}

And place home icon 16x16 home.png in your image folder.
(2012-11-19, 11:25 AM)effone Wrote: [ -> ]The button HTML:
<span class="button"><img src="images/home.png" />&nbsp;Home</span>

The CSS:
.button {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #ffffff;
	padding: 6px 20px;
	background: -moz-linear-gradient(
		top,
		#212121 0%,
		#262626);
	background: -webkit-gradient(
		linear, left top, left bottom, 
		from(#212121),
		to(#262626));
	-moz-border-radius: 3px;
	-webkit-border-radius: 3px;
	border-radius: 3px;
	border: 1px solid #000000;
	-moz-box-shadow:
		0px 1px 3px rgba(255,255,255,0.5),
		inset 0px 0px 1px rgba(255,255,255,0.7);
	-webkit-box-shadow:
		0px 1px 3px rgba(255,255,255,0.5),
		inset 0px 0px 1px rgba(255,255,255,0.7);
	box-shadow:
		0px 1px 3px rgba(255,255,255,0.5),
		inset 0px 0px 1px rgba(255,255,255,0.7);
	text-shadow:
		0px -1px 0px rgba(000,000,000,0.4),
		0px 1px 0px rgba(255,255,255,0.3);
}

And place home icon 16x16 home.png in your image folder.

And in where do I place that HTML code?
HTML in Header template, with proper linking:

<span class="button"><a href="{$mybb->settings['bburl']}/index.php"><img src="images/home.png" />&nbsp;Home</a></span>

CSS in global.css