html - How To Make The Nav MenuBar Not Go Across The Whole Page -


i built nav menu bar, background color going across whole page, not want. css:

body {     padding: 0;     margin: 0;     font-family: arial;     font-size: 19px; } #nav {     background-color: #222;     } #nav_wrapper {     width: 960px;     margin: 0 auto;     text-align: left; } #nav ul {     list-style-type: none;     padding: 0;     margin: 0;     position: relative;     min-width: 200px; } #nav ul li {     display: inline-block;     } #nav ul li:hover {     background-color: #333; } #nav ul li a, visited {     color: #ccc;     display: block;     padding: 15px;     text-decoration: none; } #nav ul li:hover ul {     display: block; } #nav ul ul {     display: none;     position: absolute;     background-color: #333;     border: 5px solid #222;     border-top: 0;     margin-left: -5px; } #nav ul ul li {     display: block; } #nav ul ul li a:hover {     color: #699; } 

#nav { background-color: #222; } 

in here can adjust width , height of navbar, or else should post html sample see structure


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -