View Full Version : How to center my navabar
goshalim
08-04-2009, 06:01 PM
Hi recently i have uploaded a new template.
But the navabar is not in the center.( see picture )
How can i center it please
Thanks
goshalim
08-05-2009, 01:51 AM
Please any one ?? do you need the code as well of this navbar ??
<!-- Top Menu -->
<div id="MainMenu">
<div id="tab">
<ul>
<li class="item_active">
<li "text-align: center">
<a href="$vboptions[homeurl]"><span>Home</span></a></li>
<li><a href="index.php"><span>Forum</span></a></li>
<if condition="$show['member']">
<li><a href="usercp.php$session[sessionurl_q]"><span>User CP</span></a></li></if>
<li><a href="memberlist.php$session[sessionurl_q]"><span>Λίστα Μελών</span></a></li>
<li><a href="calendar.php$session[sessionurl_q]"><span>Ημερολόγιο</span></a></li>
<li><a href="search.php?$session[sessionurl]do=getnew" accesskey="2"><span>Μυνήματα</span></a></li>
<li id="navbar_search"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow"><span>Search</span></a><script type="text/javascript"> vbmenu_register("navbar_search" ,1); </script></li>
<if condition="$show['registerbutton']">
<li><a href="register.php$session[sessionurl_q]" rel="nofollow"><span>Register FREE!</span></a></li>
<else />
<li id="usercptools"><a href="$show[nojs_link]#usercptools"><span>Quick Links</span></a><script type="text/javascript"> vbmenu_register("usercptools" ,1); </script></li></if>
<if condition="$show['member']">
<li class="vbmenu_control"><a href="login.php?$session[sessionurl]do=logout&logouthash=$bbuserinfo[logouthash]" onclick="return log_out('$vbphrase[sure_you_want_to_log_out]')"><span>Έξοδος</span></a></li></if></li>
<li><a href="private.php$session[sessionurl_q]"><span>Προσωπικά Μηνύματα</span></a></li>
</div>
</ul>
</div>
</div>
</div>
valdet
08-05-2009, 05:29 AM
#tab li
{
display:inline;
float:left;
margin:0;
padding:0;
}
#tab a
{
background:#000000 url("forum/bright_066w.gif") no-repeat right top;
margin:0;
padding:0;
text-decoration:none;
border:0;
display:block;
float:left;
Those are most likely causing you problems.
I know there is a limitation in CSS because there is no float:center property, so my bet is that, in order to have that menu centered, you need to have the whole div inside a table.
goshalim
08-05-2009, 06:10 AM
How can i do that , what should be the code , because first time i see this code < li
see how it is on my attachemnet , aslo is this white line on the right side , strange why is that there
goshalim
08-05-2009, 07:00 AM
in order to have that menu centered, you need to have the whole div inside a table.
when you say the whole div inside a table , where you mean , in CCS or in the common template / header place ?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.