DHTML Example: Tabbed Interface
http://www.htmlgoodies.com/beyond/dhtml/article.php/3470511/DHTML-Example-Tabbed-Interface.htm (Back to article)
http://www.htmlgoodies.com/beyond/dhtml/article.php/3470511/DHTML-Example-Tabbed-Interface.htm (Back to article)
This is a great way to move people along from section to section. In addition, the text on the tags work just like any other HTML text. You can put in images, links, or just about anything you could put on a traditional HTML document. The sizzle in this is its ability to organize and present information, more so than its ability to change text.
Even better is that this script is not locked into shape. The tabs will grow as you need more room. But only the tab that needs to grow will grow. The other tabs will remain only as large as needed.
Go to Tab 3 to continue....
For more information on this DHTML script and answers to other of life's questions, go to Tab 4.
<DIV CLASS=conts ID=t1Contents>This text is on tab one</DIV>
<DIV CLASS=conts ID=t2Contents>This text is on tab two</DIV>
<DIV CLASS=conts ID=t3Contents>This text is on tab three</DIV>
<DIV CLASS=conts ID=t4Contents>This text is on tab four</DIV>
<DIV CLASS=conts ID=t5Contents>This text is on tab five</DIV>
<DIV CLASS=conts ID=t6Contents>This text is on tab six</DIV>
<DIV CLASS=conts ID=t7Contents>This text is on tab seven</DIV>
Those are the tabs. Note each one has the comment "This text is on...". That's where you put the text that will appear on the tab. As long as what you write stays between the DIV and the /DIV commands, then it will all appear on the tab. Easy. Take a look at the source code of this tutorial to see how I handled it, if you'd like.
On to Tab 5...
And then there's...
You can change the color of the background around the tabs by changing the bgcolor color code in the BODY command. The color of tabs themselves can be set by changing the bgcolor code in the table.
So, use this in good health. I think it's a great look for a Web page that has to offer a bunch of short, quick pieces of information.
Now off to Tab 7 and my recipe....