HTML
<div id="wizard"> <!-- tabs --> <ul class="tabs"> <li><a href="#" class="w2">Personal info</a></li> <li><a href="#" class="w2">Shopping basket</a></li> <li><a href="#" class="w2">Review order</a></li> </ul> <!-- panes --> <div class="panes"> <div> <label>Username <br /> <input name="username"/> </label> <label> Email<br /> <input name="email"/> </label> <label> <input id="terms" type="checkbox" /> I accept <a href="#">these</a> terms and conditions </label> <p><button class="next">Next »</button></p> </div> <div> <h2>An imaginary basket is here...</h2> <p><button class="prev">« Prev</button> <button class="next">Next »</button> </p> </div> <div> <h2>An imaginary order is here...</h2> <p><button class="prev">« Prev</button></p> </div> </div> </div>
CSS
.panes div {
display:none;
padding:15px 10px;
border:1px solid #999;
border-top:0;
height:100px;
font-size:14px;
background-color:#fff;
}
div.panes div {
background:#fff url(../images/h300.png) repeat-x 0 5px;
-background:#fff;
height:172px;
}
div.panes label {
margin-bottom:15px;
display:block;
}
label.error {
color:red;
}
TAB - CSS
/* root element for tabs */
.tabs {
list-style:none;
margin:0 !important;
padding:0;
height:30px;
border-bottom:1px solid #666;
}
/* single tab */
.tabs li {
float:left;
text-indent:0;
padding:0;
margin:0 !important;
list-style-image:none !important;
}
/* link inside the tab. uses a background image */
.tabs a {
background: url(../images/tabs.png) no-repeat -652px 0;
font-size:11px;
display:block;
height: 30px;
line-height:30px;
width: 111px;
text-align:center;
text-decoration:none;
color:#000;
padding:0px;
margin:0px;
position:relative;
top:1px;
}
.tabs a:active {
outline:none;
}
/* when mouse enters the tab move the background image */
.tabs a:hover {
background-position: -652px -31px;
color:#fff;
}
/* active tab uses a class name "current". it's highlight is also done by moving the background image. */
.tabs .current, .tabs .current:hover, .tabs li.current a {
background-position: -652px -62px;
cursor:default !important;
color:#ff9833 !important;
}
/* Different widths for tabs: use a class name: w1, w2, w3 or w2 */
/* width 1 */
.tabs .w1 { background-position: -519px 0; width:134px; }
.tabs .w1:hover { background-position: -519px -31px; }
.tabs .w1.current { background-position: -519px -62px; }
/* width 2 */
.tabs .w2 { background-position: -366px -0px; width:154px; font-size:18px; }
.tabs .w2:hover { background-position: -366px -31px; font-size:18px; }
.tabs .w2.current { background-position: -366px -62px; font-size:18px; }
/* width 3 */
.tabs .w3 { background-position: -193px -0px; width:174px; }
.tabs .w3:hover { background-position: -193px -31px; }
.tabs .w3.current { background-position: -193px -62px; }
/* width 4 */
.tabs .w4 { background-position: -0px -0px; width:194px; }
.tabs .w4:hover { background-position: -0px -31px; }
.tabs .w4.current { background-position: -0px -62px; }
/* initially all panes are hidden */
.panes .pane {
display:none;
}
jquery.tools.min.js
Click to Download
jquery.tools.min.js
Click to Download
Example
Click to DEMO











0 comments:
Post a Comment