html - Can't get navigation menu links to display inline and not one after the other -


with snipit of html i'm trying menu display @ top of page each link following right of prev one. @ moment display 1 after other. i've tried style shown css.

can tell me whats wrong this?

<nav class="grid_4 topmenu">     <ul>         <li><a href="#">about us</a>         </li>         <li><a href="#">our cheeses</a>         </li>         <li><a href="#">contact us</a>         </li>     </ul> </nav>    .topmenu {     display:inline;      margin: 2% 0;         padding: 1% 0;     text-align: right; } 

since added class nav wont work, because display: inline; not excute in li tags, excute display in nav tag.

so had add .topmenu li element instead .topmenu, that:

.topmenu li {     display:inline;      margin: 2% 0;     padding: 1% 0;     text-align: right; } 

fiddle


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -