Create Tabs Tables On PHP or HTML

If you’r making website with php only, not cms, and than you want to put some tabs effect simple tabs on your php code.

i have some tutorial for you,

like this picture

1. you must creat style.css and put this code on style.css

.TabbedPanels {
margin: 0px;
padding: 0px;
clear: both;
width: 100%; /* IE Hack to force proper layout when preceded by a paragraph. (hasLayout Bug)*/
}
.TabbedPanelsTabGroup {
margin: 0px;
padding: 0px;
}
.TabbedPanelsTab {
position: relative;
top: 1px;
float: left;
padding: 4px 10px;
margin: 0px 1px 0px 0px;
font: bold 14px sans-serif;
background-color: none;
list-style: none;
border-left: solid 0px #0EA0B2;
border-bottom: solid 0px #0EA0B2;
border-top: solid 0px #0EA0B2;
border-right: solid 0px #0EA0B2;
-moz-user-select: none;
-khtml-user-select: none;
cursor: pointer;
}
.TabbedPanelsTabHover {
background-color: #CCC;
}
.TabbedPanelsTabSelected {
background-color: #EEE;
border-bottom: 1px solid #EEE;
}
.TabbedPanelsTab a {
color: black;
text-decoration: none;
}
.TabbedPanelsContentGroup {
clear: both;
background-color: none;
}
.TabbedPanelsContent {
padding: 4px;
}
.TabbedPanelsContentVisible {
}
/* Vertical Tabbed Panels */
.VTabbedPanels .TabbedPanelsTabGroup {
float: left;
width: 10px;
height: 10px;
background-color: blue;
position: relative;
border-top: solid 1px #999;
border-right: solid 1px #999;
border-left: solid 1px #CCC;
border-bottom: solid 1px #CCC;
}
.VTabbedPanels .TabbedPanelsTab {
float: none;
margin: 0px;
border-top: none;
border-left: none;
border-right: none;
}
.VTabbedPanels .TabbedPanelsTabSelected {
background-color: #EEE;
border-bottom: solid 0px #999;
}
.VTabbedPanels .TabbedPanelsContentGroup {
clear: none;
float: left;
padding: 0px;
width: 30em;
height: 20em;
}

 

2. creat php or html, write this code to your html or php scripts

<div class="TabbedPanels" id="TabbedPanels1">
        <ul class="TabbedPanelsTabGroup">
            <li class="TabbedPanelsTab">Tab 1</li>
            <li class="TabbedPanelsTab">Tab 2</li>
            <li class="TabbedPanelsTab">Tab 3</li>

        </ul>
         <div class="TabbedPanelsContentGroup">
            <div class="TabbedPanelsContent"> Html Code Table What you want </div>
            <div class="TabbedPanelsContent"> Html Code Table What you want </div>
            <div class="TabbedPanelsContent"> Html Code Table What you want </div>
         </div>
</div>

 

3. Write this script under script table

<script type="text/javascript">
    var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
</script>

4. Last Call Js on header with script like this

<script type="text/javascript" src="js/SpryTabbedPanels.js"></script>

 

Done.

Now you can get the SpryTabbedPanels.js code in this link

 

Finish :D you can look my phpcode with the tabletabs

on here

Enter your email address:

 

Baguzajja[dot]Info

↑ Grab this Headline Animator

free website stats program

Web Reference - Business Directory - Related Articles - Sitemap