
Have you ever asked how to make a tabbed page like one shown by the picture above? If you want to know how to do that, here is a short explanation:
- First you need to download jquery.js?and idtabs.js. Thanks to the creator of jquery.js and idtabs.js.
- Inside <head> tag call? jquery.js and idtabs.js. Remember you must call jquery.js first then idtabs.js.
- Use <ul> and <li> tags to create the tabs.
- Use css style for the tabs to appear as we want.
?The complete code is here:
HTML:
-
<script type="text/javascript" src="idtabs.js"></script>
-
#container {
-
padding-top: 0px;
-
width: 380px;
-
position: relative;
-
border:1px solid black;
-
background-color:#CCCCCC;
-
}
-
.idTabs {
-
margin: 0px;
-
padding: 0px;
-
float: left;
-
width: 350px;
-
list-style-type: none;
-
}
-
.idTabs li {
-
display: inline;
-
margin: 0px;
-
padding: 0px;
-
float: left;
-
color: #000000;
-
text-align: center;
-
font-size: 11px;
-
}
-
.idTabs li a {
-
color: #FFFFFF;
-
text-decoration: none;
-
margin: 0px;
-
padding: 5px 8px;
-
background: #ffa900;
-
line-height: 30px;
-
height: 30px;
-
border-right: 1px solid #625F55;
-
display: block;
-
float: left;
-
}
-
.idTabs li a.selected {
-
background: #FFFFFF;
-
font-weight: bold;
-
color: #000000;
-
text-decoration: none;
-
line-height: 30px;
-
padding: 5px 8px;
-
height: 30px;
-
border-right: 1px solid #CCCCCC;
-
display: block;
-
float: left;
-
}
-
#recententries {
-
float: left;
-
width: 350px;
-
background: #FFFFFF;
-
padding: 10px;
-
display: block;
-
}
-
#recentcomments {
-
float: left;
-
width: 350px;
-
background: #FFFFFF;
-
padding: 10px;
-
display: none;
-
}
-
#mostcomments {
-
float: left;
-
width: 350px;
-
background: #FFFFFF;
-
padding: 10px;
-
display: none;
-
}
-
-
</style>
-
</head>
-
<div id="container">
-
<ul class="idTabs">
-
</ul>
-
<div id="recententries">
-
Recent Entries
-
</div>
-
-
<div id="recentcomments">
-
Recent Comment
-
</div>
-
-
<div id="mostcomments">
-
Most Comment
-
</div>
-
</div>
-
</body>
-
</html>
Be First To Comment
Related Post
Leave Your Comments Below