Jump to content

Archived

This topic is now archived and is closed to further replies.

Jinfiltration

need to center the menu and the drop downbox

Recommended Posts

Jinfiltration

Hi,

 

I need to center the words in the menu bar and the dropdown box, may i know where should i edit in CSS?

 

i did some edit on the css file, i finally moved the dropdown box to almost center, but i couldnt move the word in the menu to the center.

 

h3EumyB.jpg

Share this post


Link to post
Share on other sites
Jake

Hi Jinfiltration - Is that the navbar you're using for your menu? If so, try adding the following to center the dropdown items:

 

body .dropdown-menu li > a, body .dropdown-menu li > span {text-align: center;}


Have you searched the forums yet or checked out the DMS user docs?

PageLines geek, blogging at MyUntangledLife.com

Share this post


Link to post
Share on other sites
Jinfiltration

Hi Jinfiltration - Is that the navbar you're using for your menu? If so, try adding the following to center the dropdown items:

 

body .dropdown-menu li > a, body .dropdown-menu li > span {text-align: center;}

 

sorry, i dont get it, i just started learning css, may i know from the code below where should i edit or add to make all the words in the bar and the dropdown box to be center.

/* @ Main Nav */
		.main_nav {			
			line-height: 1.1em;
			text-align: left;
			margin-top: 0px;
			z-index:28;  /* Fancybox Uses 30 */
			position:relative;
		}
		
		.main_nav .content-pad{
			padding-top: 6px;
		}
			.main_nav ul{
				list-style: none;
				display: block;
				margin: 0px 0px 0px 180px;
				padding: 0px;
				float: left;
			}
			.main_nav li{position:relative;}
			.main_nav ul li{
				margin: 0px 0px 0px 20px;
				padding: 0px;
				float: left;
				text-align: right;
			}
			.main_nav li a{		
				
				padding: 10px 15px 10px;
				text-decoration: none;
				display: block;
				border: 1px solid transparent;
				border-bottom:none;
					
			}
			
			.main-nav li a{
				font-size: 1.2em; 
			}
			
			/*IE6 border color (transparent border fix)*/
			*html .main_nav li a{ border-color: white; }
	
			/* Drop Down */
			.main_nav ul ul {display: none;}
			.main_nav ul ul li {text-align: left;}
		
			/* @ SubNav Area */
			#secondnav {
				line-height: 1.1;
				font-size: .7em; 
			}
				#secondnav ul{
					line-height: .95em;
					list-style:none;
					margin:0;
					
				}
				#secondnav .secondnav_menu { margin:0 0 0 0px; }
				#secondnav ul li{float: left;}
				#secondnav li a{
					display: block;
					padding: 10px 10px; 
					border:none;
				}

Share this post


Link to post
Share on other sites
Jake
Hi Jinfiltration - I think you've posted in the wrong forum so I'm sorry for the confusion with the code I provided. But looking at your code, I'd advise you try tweaking the following under /* Drop Down */ where it currently says "left": .main_nav ul ul li {text-align: center;} If that doesn't do the trick, could you provide a link to the site?

Have you searched the forums yet or checked out the DMS user docs?

PageLines geek, blogging at MyUntangledLife.com

Share this post


Link to post
Share on other sites
Jinfiltration

Hi Jinfiltration - I think you've posted in the wrong forum so I'm sorry for the confusion with the code I provided. But looking at your code, I'd advise you try tweaking the following under /* Drop Down */ where it currently says "left": .main_nav ul ul li {text-align: center;} If that doesn't do the trick, could you provide a link to the site?

 

yes, sure. my website is http://69.195.124.132/~myownlo1/

Share this post


Link to post
Share on other sites
Jake
Hi Jinfiltration - Thanks for the link. I believe the code I provided should do the trick with centering the text in the dropdown menu. .main_nav ul ul li {text-align: center;}

Have you searched the forums yet or checked out the DMS user docs?

PageLines geek, blogging at MyUntangledLife.com

Share this post


Link to post
Share on other sites
Jinfiltration

Hi Jinfiltration - Is that the navbar you're using for your menu? If so, try adding the following to center the dropdown items:

 

body .dropdown-menu li > a, body .dropdown-menu li > span {text-align: center;}

 

Sorry 1 more question,

 

5YjFoTN.png

Share this post


Link to post
Share on other sites
Jake
Try adding this custom code to move the menu over a bit: #primary-nav ul.main-nav {margin-left: 225px;}

Have you searched the forums yet or checked out the DMS user docs?

PageLines geek, blogging at MyUntangledLife.com

Share this post


Link to post
Share on other sites

  • Similar Content

    • Liv Kundalini
      By Liv Kundalini+
      Hi -
      Pulling my hair out over here, and would love an assist!
      Site I am building, http://www.livkundalini.com/home, has a problem with the submenu items in the nav not appearing. 
      If anyone wants to see what the Nav should look like, feel free to look in the footer on the left hand side.
      Have tried disabling Pagelines and using the twentyseventeen theme, but problem persists.
      Saw this error (pasted at the bottom of this post) displaying in the inspector, and saw discussion of Jetpack potentially being a culprit. Disabled Jetpack, but the problem persists.
      Had the hosting company even flush the server-side cache, but no avail.
      Any thoughts? Please? It's the only thing keeping me from launching this site!
      Many Thanks,
      Todd
       
      WebSocket connection to 'wss://public-api.wordpress.com/pinghub/wpcom/me/newest-note-data' failed: Error during WebSocket handshake: Unexpected response code: 403   O @ (index):7
    • Paul
      By Paul+
      I was surprised to see I had no menu today - out of the blue - its actually moved to the bottom of the page!  After hours of fiddling and disabling every single plugin, leaving just plagelines the issue is still present.  See video for a basic text box - I moved it into the head and it jumps to the bottom and shows just above the footer but below the main content.  I have a temp fix by placing the menu into the first row on the main content but it does mean other than my home page, all other pages have no menu.  A quick fix is very urgent for this bug.
      https://thelaptopfixers.com
       
       
    • russe-intensif
      By russe-intensif+
      Hi team,
      checking my site today, i'm surprised to see my MegaNav all in bottom of the pages, while it's in header.
      After getting to change it in couple of pages onto Template part (too time consuming !), i'm desperate and ask you for help :-)
      apprendre-le-russe-avec-ania.fr
      Thank you in advance !

    • Borries
      By Borries+
      I know this is not an easy problem. Maybe there is a easy solution.
      I have tryed to uses the existing solution, that I have found in the forum
      I changed the colours of my nav (simple nav) and the hover effect (a. hover).
      I really tryed to highlight the active/used link in the nav but I cant figure it out.
      I want it to be black when active.
      Any help would be appreciated. Thanks.
      http://www.marcborries.de  nav link: "Sinn & Selbst" 
×