New Revised CSS Library Forums Web Tools
FAQs Awards Usage Terms Contact
Other Sections
Sweet Ads
Bookmark online:

FF1+ IE5+ Opr7+

Tabbed Document Viewer

Author: Dynamic Drive

Description: Using a tabbed interface, this DHTML script lets you display external web pages inline on your page, with the help of the IFRAME tag. We threw in a feature that allows the user to also load the webpage in the entire browser window when desired. This script works in IE5+ and NS6+, and degrades well with the rest (as tabs are simply regular links). Cool!


Open tab links in browser window instead.

Directions Developer's View

Step 1: Add the below CSS and DHTML script to the <HEAD> section of your page:

Select All

To customize the look of the tabs (ie: color), edit the CSS. There is no need to modify the script at all.

Step 2: Add the below code to the <BODY> section of your page:

Select All

The above HTML code renders the tab links and IFRAME tag used to contain the external documents. Change the URLs to your own.

Now, if you have lots of tab links, you can get them to appear on separate lines, by adding a divider:

<ul id="tablist">
<li><a class="current" href="#">Google</a></li>
<li><a href="#">Yahoo</a></li>
<li><a href="#">MSN</a></li>
<div style="margin-bottom: 8px"></div>
<li><a href="#"></a></li>
<li><a href="#">Dynamic Drive</a></li>