Return to Snippet

Revision: 63027
at April 1, 2013 11:13 by codingforever99


Initial Code
/*=====================  CSS Code ================== */
ul.tabs
{
    padding: 7px 0;
    font-size: 0;
    margin:0;
    list-style-type: none;
    text-align: left;
}
        
ul.tabs li
{
    display: inline;
    margin: 0;
    margin-right:3px;
}
        
ul.tabs li a
{
    font: normal 12px Verdana;
    text-decoration: none;
    position: relative;
    z-index: 1;
    padding: 7px 16px;
    border: 1px solid #CCC;
    border-bottom-color:#B7B7B7;
    color: #000;
    background: #F0F0F0;
    border-radius: 6px 6px 0px 0px;
 -moz-border-radius: 6px 6px 0px 0px;
    outline:none;
}

ul.tabs li a:hover
{
    border: 1px solid #B7B7B7;
    background:#E0E0E0;
}
        
ul.tabs li.selected a
{
    position: relative;
    top: 0px;
    font-weight:bold;
    background: white;
    border: 1px solid #B7B7B7;
    border-bottom-color: white;
}

/*============================= HTML Code ================== */
<ul id="tab_ul" class="tabs">
        <li class="selected"><a rel="tab_div1" href="#">Tab 1</a></li>
        <li class=""><a rel="tab_div2" href="#">Tab 2</a></li>
        <li class=""><a rel="tab_div3" href="#">Tab 3</a></li>
        <li class=""><a rel="tab_div4" href="#">Tab 4</a></li>
</ul>

Initial URL
http://function-code.blogspot.com/2013/03/horizontal-tabs-in-html-with-css.html

Initial Description
designing a simple horizontal tab menu by using ul and il elements with css.

Initial Title
horizontal tabs in html with css

Initial Tags
css, html

Initial Language
CSS