MyBB Community Forums

Full Version: Center my nav bar please Help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Ok so look. Please no one respond with <center></center> or anything like that. I accidentley uploaded an old xml file and reverted back to original code. I found a code on the web that worked the first time but now i cant find it.... So im trying to center my navbar. Heres my current code..

<!-- begin navbar -->
	
		<div id="navbar">
                 <ul id="nav">

			
                        <li><a href="{$mybb->settings['bburl']}/About.php" >About</a></li>
                        <li><a href="{$mybb->settings['bburl']}/Artists.php" >Artists</a></li>
                       
			<li><a href="{$mybb->settings['bburl']}/Beats.php">Beats</a></li>
                        <li><a href="{$mybb->settings['bburl']}/DrumKits.php">Drum Kits</a></li> 
                        <li><a href="{$mybb->settings['bburl']}/shops.php">Store</a></li>
                        <li><a href="{$mybb->settings['bburl']}/Videos.php">Videos</a></li> 


	</div></br>
	<!-- end navbar -->




Ok so the code that worked looked something like this Below

<ul id="nav" left:150px; right:50px; text-allign:center;>



Can someone post the correct code for this please. i cant find it on the internet. it worked for me the first time i just adjusted the numbers to 400px etc...

anyone have any answers please ? 41 views and not one reply Sad
did you try....

<div id="navbar" style="text-align: center;">
(2014-05-22, 11:56 AM)mmadhankumar Wrote: [ -> ]did you try....

<div id="navbar" style="text-align: center;">

Bro, I have been already tried that code. I said i need the code for the UL. That one doesnt work the only one that worked was messing with the digits for the left padding . 150px.

<ul id="nav" > not <div id="navbar">

it was something like

<ul id="nav" left:150px; right:50px; text-allign:center;>