Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Please do refer to the following fiddler:<b> <a href="http://jsfiddle.net/webdevkumar/55jkv/1" rel="noreferrer">Here</a></b></p> <p><b>HTML</b></p> <pre><code>&lt;div id="l-primary-nav"&gt; &lt;ul class="l-inline"&gt; &lt;li&gt;&lt;a href="#"&gt;Home&lt;/a&gt; &lt;/li&gt; &lt;li class="active"&gt;&lt;a href="#"&gt;About&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Articles&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Calendar&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; </code></pre> <p> <b>CSS</b></p> <pre><code>l-primary-nav { width: 600px; margin: 0 auto; } .l-inline li { display: inline-block; } l-primary-nav ul { width: 99.8%; margin: 0; padding: 0; border: 1px solid #c2c2c2; float: left; display: table; } l-primary-nav li { text-align: center; display: table-cell; float: left; } l-primary-nav li a{ line-height: 40px; height: 41px; padding: 0 30px; border-top: 1px transparent; display: block; background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0.18, #FBFBFB), color-stop(1, #D1D1D1)); background-image: -o-linear-gradient(bottom, #FBFBFB 0%, #D1D1D1 100%); background-image: -moz-linear-gradient(bottom, #FBFBFB 0%, #D1D1D1 100%); background-image: -webkit-linear-gradient(bottom, #FBFBFB 0%, #D1D1D1 100%); background-image: -ms-linear-gradient(bottom, #FBFBFB 0%, #D1D1D1 100%); background-image: linear-gradient(to bottom, #FBFBFB 0%, #D1D1D1 100%); } l-primary-nav li a:hover { background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #E1E3E6), color-stop(1, #BABCBF)); background-image: -o-linear-gradient(bottom, #E1E3E6 0%, #BABCBF 100%); background-image: -moz-linear-gradient(bottom, #E1E3E6 0%, #BABCBF 100%); background-image: -webkit-linear-gradient(bottom, #E1E3E6 0%, #BABCBF 100%); background-image: -ms-linear-gradient(bottom, #E1E3E6 0%, #BABCBF 100%); background-image: linear-gradient(to bottom, #E1E3E6 0%, #BABCBF 100%); } l-primary-nav li.active a{ margin-top: -5px; height: 45px; position: relative; background: #fff; border-left: 1px solid #c2c2c2; border-right: 1px solid #c2c2c2; border-top: 1px solid #c2c2c2; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload