Simple and Stylish tab menu using css | Sanwebcorner

Simple and Stylish tab menu using css

This post helps you to create simple and stylish Horizontal tab menu using pure css without any jquery and scripts. This simple tabbed menu shows like a two horizontal lines with active state of the tabs. In this example i used three navigation  and i spited the 33.33% width of each menu for responsive purpose.

This is one of the best and simple tabs menu  with responsive, I used different colors for active text and detective text in tab menus. This tabmenu is very useful to designers to place the content in different manner in our websites.

Css code for stylish tab menu:

.tabs-stylish {
    max-width: 90%;
    float: none;
    list-style: none;
    padding: 0;
    margin: 75px auto;
   border-bottom: 4px solid #AB4E4E;
}
.tabs-stylish:after {
    content: '';
    display: table;
    clear: both;
}
.tabs-stylish input[type=radio] {
    display:none;
}
.tabs-stylish label {
    display: block;
    float: left;
    width: 33.3333%;
    color: #AB4E4E;
    font-size: 21px;
    font-weight: normal;
    text-decoration: none;
    text-align: center;
    line-height: 2;
    cursor: pointer;
    box-shadow: inset 0 4px #AB4E4E;
    border-bottom: 4px solid #AB4E4E;
    -webkit-transition: all 0.5s;
    transition: all 0.5s;
}
.tabs-stylish label span {
 
}
.tabs-stylish label i {
    padding: 5px;
    margin-right: 0;
}
.tabs-stylish label:hover {
    background: #FFF;
    box-shadow: inset 0 4px #FFC33B;
    border-bottom: 4px solid #FFC33B;
    color: #BF8A28;
}
.tab-content {
    display: none;
    width: 100%;
    float: left;
    padding: 15px;
    box-sizing: border-box;
    background-color:#ffffff;
min-height: 250px;
}

.tab-content * {
    -webkit-animation: scale 0.7s ease-in-out;
    -moz-animation: scale 0.7s ease-in-out;
    animation: scale 0.7s ease-in-out;
}
@keyframes scale {
  0% {
    transform: scale(0.9);
    opacity: 0;
    }
  50% {
    transform: scale(1.01);
    opacity: 0.5;
    }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.tabs-stylish [id^="tab"]:checked + label {
    background: #FFF;
    box-shadow: inset 0 4px #FFC33B;
    border-bottom: 4px solid #FFC33B;
    color: #BF8A28;
}
#tab1:checked ~ #tab-content1,
#tab2:checked ~ #tab-content2,
#tab3:checked ~ #tab-content3 {
    display: block;
}

@media (min-width: 768px) {
    .tabs-stylish i {
        padding: 5px;
        margin-right: 10px;
    }
    .tabs-stylish label span {
        display: inline-block;
    }
    .tabs-stylish {
    margin: 50px auto;
    }
}


Html code for stylish tab menu:

<div class="tabs-stylish">
    <input type="radio" name="tabs-stylish" id="tab1" checked >
    <label for="tab1">
        <span>Tab Menu -1 </span>
    </label>
    <input type="radio" name="tabs-stylish" id="tab2">
    <label for="tab2">
        <span>Tab Menu -2 </span>
    </label>
    <input type="radio" name="tabs-stylish" id="tab3">
    <label for="tab3">
        Tab Menu -3 </span>
    </label>
    <div id="tab-content1" class="tab-content">
        <p>Tab Menu-1 Content goes here.....</p>
    </div>
    <div id="tab-content2" class="tab-content">
        <p>Tab Menu-2 Content goes here.....</p>
    </div>
    <div id="tab-content3" class="tab-content">
        <p>
</div>

Post a Comment

Labels

360 degree view product image 3d rotate 3d text 3step-form Accordion menu ajax All Browsers Animated Background Gradient animation audio controller auto complete Best accordion menu bootstrap border bounce effect on hover Breadcrumb calculate age by dob calendar Captcha change image on mouse move color chooser countdown Counter on scroll create random number Css css animation css buttons css hover css3 customized upload Button Date picker delete data from table Different scroll speed email otp verification email verifier Embed eventlist Expanding Menu feedbck form flash news section close button full screen menu Google custom search Google Maps Google reCAPTCHA Google site search gradient hide menu Horizontal News ticker Hover Htm Html html dropdown html form html5 html5 form validation Iframe image hover increment decrement textbox value based on select box Javascript Jquery js Layered image effect on mouse hover lock & unlock page scroll marquee marquee with close button mobile number validation mobile otp login Multi-level-drop-down-menu multi-level-form Multi-Step-form mysql News ticker on hover change text to image our team page password generator password strength checker Photoshop PHP populate html selectbox Popup image on click the link pure css Question type form random number generate Random password Redirect page Based on the select box while submit the form responsive responsive menu responsive popup box Responsive Vertical Time line design rotate image selectbox based on select box simple coming soon page simple countdown based on end date simple typing effect slider sliding tab sms otp login statistic counter on scroll switch tag shape team member Time picker toggle toggle view transparent button underline animation up down slide validation vertical fixed sidebar Webtips Youtube