html - CSS - can't put menu horizontaly - inline doesn't work -


i can't put menu horizontaly do. doing wrong? supose problem inline option, not sure. if can corect code appreciate much. thank you.

html code

<nav>     <ul>          <li class = "current-item"> <a href = "index.php"> home </a> </li>          <li> <a href = "profile.php"> profile </a> </li>          <li> <a href = "contact.php"> contact </a> </li>     </ul>  </nav> 

css code

nav{      position:absolute;     margin-top: 288px;     margin-left: 0px;     width: 25px;     height:25px;     z-index: 2; }   nav > ul > li {       font-size:20px;     color:white;         padding:10px 40px;     display:inline-block;     text-shadow:0px 1px 0px rgba(0,0,0,0.4);     z-index: 2; }     nav > ul > li> {     text-decoration:none;     color:#000000;     transition:all linear 0.15s;  }   nav > ul >.current-item > a{      background-color:rgba(0,0,0,0.35);     text-align: center;     color: white;     padding: 3px 22px;     border-radius:10px;     border:none;     cursor: pointer;     width: 50px;     height: 28px;     z-index:2;     text-decoration:none;  } nav> ul > li:hover> a{      background-color:rgba(0,0,0,0.35);     text-align: center;     color: white;     padding: 3px 22px;     border-radius:10px;     border:none;     cursor: pointer;     width: 50px;     height: 28px;     z-index:2;   } 

remove width nav.

nav{ position:absolute; margin-top: 288px; margin-left: 0px; height:25px; z-index: 2; } 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -