Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Aug 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Center Wordpress Menu? [URGENT]

    Dear users,

    I need help centering my navbar/menu...I'm using theme, however, help me out!

    Code:
    /*-------------------------------------*/
    /*-------MAIN NAVIGATION STUFF--------*/
    /*-----------------------------------*/
    #navigation {float: right; margin: -10px 35px 0 0;}
    #dropmenu {list-style:none; position:relative; width:100%; z-index: 400;}
    #dropmenu li {list-style:none;   position:relative; float: left; line-height: 60px;}
    #dropmenu li a { display: block; line-height:45px; font-size: 11px; border-bottom: 0px solid transparent; text-transform: uppercase; position: relative;
    	padding: 0 10px;
    	color: #fff;
    	opacity: .45;
    	font-weight: bold;
    	
    	-moz-transition-property:opacity;  
     	-moz-transition-duration:0.20s;  
     	-moz-transition-timing-function:linear;
     	
     	-webkit-transition-property:opacity;  
     	-webkit-transition-duration:0.20s;  
     	-webkit-transition-timing-function:linear; 
     	
     	-o-transition-property:opacity;  
     	-o-transition-duration:0.20s;  
     	-o-transition-timing-function:linear;
    }
    #dropmenu li a:hover {text-decoration: none; opacity: 1;}
    #dropmenu li ul {
    	list-style:none; 
    	display:block;
    	visibility:hidden; 
    	opacity:0;  
    	position:absolute; 
    	width:190px; 
    	padding:10px 0; 
    	z-index:300; 
    	top:45px; 
    	right: 0; 
    	background: #111;
    	background: rgba(0,0,0,.5);
    }
    #dropmenu > li > ul:before {
    	content: "";
    	height:0;
    	width: 0;
    	position: absolute;
    	right: 20px;
    	z-index: 1000;
    	display: block;	
    	border-width: 10px;
    	border-style: solid;
    	top: -20px;
    	border-color: transparent transparent #111;
    	border-color: transparent transparent rgba(0,0,0,.5);
    }
    #dropmenu li ul li {position:relative; z-index: 2; display: block; text-align: left;}
    #dropmenu li ul li a {line-height: 1.5em; text-transform: none; display: block; padding:8px 20px; width: 150px;}
    #dropmenu li ul li ul {position:absolute;top:-10px; right:190px; border-width: 1px;}
    #dropmenu li:hover ul ul, 
    #dropmenu li:hover ul ul ul, 
    #dropmenu li:hover ul ul ul ul {visibility:hidden; opacity:0;}
    #dropmenu li:hover ul, 
    #dropmenu li li:hover ul, 
    #dropmenu li li li:hover ul, 
    #dropmenu li li li li:hover ul {display:block; visibility:visible; opacity:1;
    	-moz-transition-property:opacity;  
     	-moz-transition-duration:0.15s;  
     	-moz-transition-timing-function:linear;
     	
     	-webkit-transition-property:opacity;  
     	-webkit-transition-duration:0.15s;  
     	-webkit-transition-timing-function:linear; 
     	
     	-o-transition-property:opacity;  
     	-o-transition-duration:0.15s;  
     	-o-transition-timing-function:linear;  
    }
    #dropmenu > li > a:hover,
    #dropmenu li.current-menu-parent > a,
    #dropmenu li.current-menu-item > a,
    #dropmenu li.current-menu-ancestor > a {
    	color: #fff;
    	border-bottom-color: #fff;
    	opacity: 1;
    	background: none;
    }
    
    #selectMenu {
    	display:none; 
    	position:absolute; 
    	z-index:1000; 
    	right:25px; 
    	bottom:16px; 
    	width:150px;
    	background: #191919; 
    	color: #fafafa; 
    	border: 1px solid #1f1f1f;
    	padding: 10px; 
    	height: 37px; 
    	line-height: 37px; 
    	margin: 0;
    }
    I don't want to ''play'' with px...I need it to be automated, because it'll work for mobiles aswell and smaller screens.
    Last edited by VIPStephan; 08-13-2013 at 02:56 PM. Reason: fixed code BB tags

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,918
    Thanks
    6
    Thanked 1,040 Times in 1,013 Posts
    CSS alone doesn’t tell us anything about the context in which the menu is used (and the CSS is applied).


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •