PDA

View Full Version : Center and resize notices


aj8690
04-17-2010, 03:59 PM
Hi everyone,

I hope you can help me out...I'm trying to center and resize the notices block in vB4. I have resized it to 782px by adding width:782px; to the notices section of the vbulletin-chrome.css template, but now that it's resized, the entire notices block is all the way to the left of the page. I want to center it. I'm not very good with CSS so I'm hoping someone can tell me how to do it. text-position:center doesn't do anything. I've tried position:relative; left:50% which does move it, but not centered. Sorry...I'm terrible with CSS.

Thanks for the help.

Here's what I have right now (what I added is in red):

.notices {
background: {vb:stylevar body_background.backgroundColor};
margin-bottom: {vb:math {vb:stylevar padding}/2};
width:782px;
}

.notices li {
background: {vb:stylevar notices_background};
font-size: {vb:math {vb:stylevar font.fontSize}-1}px;
color: {vb:stylevar body_color};
padding:{vb:math {vb:stylevar padding}/2} {vb:stylevar padding};
margin-bottom:{vb:math {vb:stylevar padding}/2};
-moz-box-shadow: -2px 2px 2px {vb:stylevar notices_shadow_color};
-webkit-box-shadow: -2px 2px 2px {vb:stylevar notices_shadow_color};
text-align: left;
clear:both;
}

Falcon Capt
04-21-2010, 11:37 PM
.notices {
background: {vb:stylevar body_background.backgroundColor};
margin-bottom: {vb:math {vb:stylevar padding}/2};
width:782px;
margin-left: auto;
margin-right: auto;
}

:)

aj8690
04-21-2010, 11:42 PM
Thank you very much! :D