MyBB Community Forums

Full Version: Centering This
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
<style>
.tipoftheday{
	display: block;
	top:10px;
	left:10px;
	width:90%;
	border:3px solid #0AC92B;
	background:#00611C top center no-repeat;
	padding:8px 8px 8px;
	font-size:11px;
	-moz-border-radius: 10px;
	-webkit-border-radius: 10px;
	border-radius: 10px;
	-moz-box-shadow: 0px 0px 10px #777777;
	-webkit-box-shadow: 0px 0px 10px #777777;
	box-shadow: 0px 0px 10px #777777;
}
</style>

<span class="tipoftheday"><center>
<strong>{$tip['tiptle']}</strong><br />
{$tip['tip']}
</center></span>
<br/>

I'm trying to center this plugin, but when I attempt to center the style of it, the entire style goes away. Any help?
Try this:
<style>
div.tipoftheday1{
	margin:0px;
	padding:0px;
	text-align:center;
}
div.tipoftheday2{
	width:90%;
	padding:8px;
	font-size:11px;
	border:3px solid #0AC92B;
	background:#00611C top center no-repeat;
	-moz-box-shadow: 0px 0px 10px #777777;
	-webkit-box-shadow: 0px 0px 10px #777777;
	box-shadow: 0px 0px 10px #777777;
	-moz-border-radius: 10px;
	-webkit-border-radius: 10px;
	border-radius: 10px;
}
</style>
<div class="tipoftheday1"><div class="tipoftheday2">
<strong>{$tip['tiptle']}</strong><br />
{$tip['tip']}
</div></div>
It only centered the text. I want the background and the text moved to the middle of the top
Ups, I forget that part ^^U

I edited my last post, please try again.
Didnt work :\
Add:

margin: auto auto;
(2011-08-20, 11:45 PM)Jason L. Wrote: [ -> ]Add:

margin: auto auto;

That fixed it Smile Thanks guys
Lol, I forget that part, sorry.