Jump to content

horizonatl navbar problem


MediaSvcsUnlimited

Recommended Posts

Hi, can someone help me understand why the navar isn't horizontal? 

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Bootstrap 3.3.6 Starter</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<style type="text/css">
	nav {
		background-color:#000000; 
		padding-top:2%; 
		width:34%; 
		/*height:27px;*/
		margin-top:2%; 
		margin-left:auto;
		margin-right:auto; 
		padding-left:3%; 
	}
	
	nav ul li  {
		list-style-type:none;
		display:inline; 
		width: 400px; 
		position:relative; 
	}
	nav a {
		background-color:#000000; 
		display:block;
		text-decoration:none;
		color:red;
	}
	nav ul ul { /*submenus under nav */
		display:none; 
	}
	nav li:hover .submenu {
		display:block; 
	}
</style>
</head>
<body>
<nav>
	<ul>
    	<li><a href="#">Home</a></li>
	  	<li><a href="#">About Us</a>
        	<ul class="submenu">
       	    	<li><a href="#">Agents</a></li>
		    	<li><a href="#">Locations</a></li>                
			</ul>
      </li><!--end of about us menu list -->   
    	<li><a href="#">Services</a></li>               
    	<li><a href="quote.php" tabindex="4" accesskey="Q">Get A Quote</a></li>
    	<li><a href="contact.php" tabindex="5" accesskey="C">Contact</a></li>
	 
   </ul>
</nav>  
</body>
</html>

Edited by MediaSvcsUnlimited
Link to comment
Share on other sites

Hi, on http://www.mediaservicesunlimited.com/bixler/homepage.php I'm trying to adjust the spacing on the submenu class but neither padding-top or margin-top works. if I can get some help I would really appreciate

function headerInfo() {
return <<<HEREDOC
<header>
<nav>
	<ul>
    	<li><a href="#">Home</a></li>
    	<li><a href="#">About Us</a>
        	<ul>
       	    	<li class="submenu"><a href="#">Agents</a></li>
		    	<li class="submenu"><a href="#">Locations</a></li>                
			</ul>
      <li><!--end of about us menu list -->   
    	<li><a href="#">Services</a></li>               
    	<li><a href="quote.php" tabindex="4" accesskey="Q">Get A Quote</a></li>
    	<li><a href="#">Contact</a>
			<ul>
				<li class="submenu"><a href="pay-my-bill.php">Pay My Bill</a></li>
		    	<li class="submenu"><a href="contact.php">Cotasct Us</a></li>    
		   </ul>
   
</nav>  
	<figure id="logo">
   		<img src="assets/bixlerlogo.png" width="304" height="88" alt=""/>
    </figure>
    <h3>Service Beyond The Contract </h3>
</header>
HEREDOC;
}
	nav {
		background-color:#000000; 
		padding-top:2%; 
		width:40%; 
		height:27px;
		margin-top:2%; 
		margin-left:auto;
		margin-right:auto; 
		padding-left:3%; 
	}
	nav a {
		color:red;
	}
		
	nav ul {
		list-style-type:none; 
	}
	nav > ul > li {
	
	}
	nav > ul li a {
		background-color:#000000; 
	}
	
	nav li {
		
		float:left; 
		margin-right:3%; 
	}
	nav > ul > li > ul {
		display:none; 
		position:absolute; 
	}
	nav > ul > li:hover > ul {
		display:block; 
	}
	nav ul ul li {
		display:block;
		width:60px;
	}
	.submenu {
		width:200px;
	}
	.submenu a {
		padding-top:2%;
	}
	.submenu a:hover {
		background-color:red; 
		color:#000000; 
	}
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.