I am working on a project for a class. I have a navbar that I want in the middle of the screen (vertical and horizontally), and can't seem to find the right combo of CSS code to do so.
Anyone good with CSS?
Collapse
X
-
Anyone good with CSS?
Tags: None -
I'll assume you are on vB4.
Add to additional.css and adjust as needed:
Code:/* center navtabs */ .navbar {text-align:center;} .navtabs { padding-left:0; text-align:center; display:inline-block;}
Please don't PM or VM me for support - I only help out in the threads.
vBulletin Manual & vBulletin 4.0 Code Documentation (API)
Want help modifying your vbulletin forum? Head on over to vbulletin.org
If I post CSS and you don't know where it goes, throw it into the additional.css template.
W3Schools <- awesome site for html/css help -
Sorry meant to say that this was a non-vb related question.Community Multiplayer Gaming
www.osfhome.comComment
-
You need:
margin: 0 auto;
for horizontal centering.
Vertical centering is way more difficult. Mostly because some browsers hate the "vertical-align: middle;" property.
For example, for internet explorer, you have to do a "position: absolute;" along with a "top: 50%;" to get it to work.
If there's any way you can avoid vertical centering, you should.Comment
Related Topics
Collapse
-
by AScherffOn e.g. Ipad portrait format i get overlapping widgets and forum - which css is responsible ?1 Photo
-
Channel: Support Issues & Questions
-
Comment