html5 - Controlling glyphicon spacing and text link within an unordered list -


how control vertical spacing between 2 items stacked, centered , vertically within unordered list item? glyphicon on top of text link within unordered list item in navigation menu.

what css rules such thing.

    <!doctype html>  <html lang="en-us">  <meta charset="utf-8" />  <link rel="stylesheet" type="text/css"   href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" title="style">   <head>  <style type="text/css">  /*  adding display: inline-block; style attribute display content horizontally. add nav's   <li> elements in css. i'm guessing every <li> may have glyph. add text-align:center on <li>'s within   nav in css align <li>'s content in middle.    */   *{ margin:0;  padding:0; }  /* target 1 icon, */  .glyphicon.glyphicon-globe {     padding:3px 0 0 0;     margin: 0 0 -15px 0;     font-size: 17px; }   nav { width: 100%;  height:50px; line-height:50px; text-align:center; background:#87e0fd; color:#f00;  }   nav ul { margin:0;  padding:0; width:100%; line-height:50px; height:auto; list-style:none; }   nav li { display: inline-block; width:110px; height:50px; text-align:center; text-decoration: none; padding:auto; margin:0;  border-left: solid 1px #999; }  /* puts border on right side of menu */  nav li:last-child { border-right: solid 1px #999; }    /* target hover action or active write css below. */  nav li:hover { text-decoration: none; background:#3f4c6b; color:#fff; cursor:pointer; }  nav li:active { text-decoration: none; margin: -15px 0 0 0;  }     </style>   <title>my glyphicon menu /title>  </head>  <body>    <nav>     <ul>        <li>         <link href="#" title="home">         <span class="glyphicon glyphicon-globe"></span><br>         <span class="glyphicon-class">home</span>        </link>       </li>         <li>         <link href="#" title="about">         <span class="glyphicon glyphicon-globe"></span><br>         <span class="glyphicon-class">about</span>        </link>       </li>         <li>         <link href="#" title="contact">         <span class="glyphicon glyphicon-globe"></span><br>         <span class="glyphicon-class">contact</span>        </link>       </li>       </ul>     </nav>     <p>hello world</p>   </body> </html> 


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -