Tab Basic

On/HtmlCss 2011.05.26 13:10


<style type="text/css">

.contentab ul{
margin: 4px;
padding: 3px 0;
margin-left: 0;
font: bold 12px Verdana;
border-bottom: 1px solid gray;
list-style-type: none;
text-align: left; /*set to left, center, or right to align the menu as desired*/

.contentab li{
display: inline;
margin: 0;

.contentab li a{
text-decoration: none;
padding: 3px 7px;
margin-right: 3px;
border: 0px solid gray;
border-bottom: none;
background-color: #fff;
color: #2d2b2b;

.contentab li a:visited{
color: #2d2b2b;

.contentab li a.current{
background-color: #fff;
color: black;
border: 1px solid gray;
border-bottom: 1px solid #FFF;

.contentab li a:hover, .contentab li a.current{
background-color: #fff;
color: black;
border: 1px solid gray;
border-bottom: 1px solid #FFF;

.contentab li a:active{
color: black;

width:95%; /*width of 2nd level content*/
height:1.5em; /*height of 2nd level content. Set to largest's content height to avoid jittering.*/



<script type="text/javascript">

* DD Tab Menu script- ⓒ Dynamic Drive DHTML code library (
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at for full source code

//Set tab to intially be selected when page loads:
//[which tab (1=first tab), ID of tab content to display (or "" if no corresponding tab content)]:
var initialtab=[1, "content1"]

//Turn menu into single level image tabs (completely hides 2nd level)?
var turntosingle=0 //0 for no (default), 1 for yes

//Disable hyperlinks in 1st level tab images?
var disabletablinks=0 //0 for no (default), 1 for yes

////////Stop editting////////////////

var previoustab=""

if (turntosingle==1)
document.write('<style type="text/css">\n#tabcontentcontainer{display: none;}\n</style>')

function expandcontent(cid, aobject){
if (disabletablinks==1)
aobject.onclick=new Function("return false")
if (document.getElementById && turntosingle==0){
if (previoustab!="")
if (cid!=""){

function highlighttab(aobject){
if (typeof tabobjlinks=="undefined")
for (i=0; i<tabobjlinks.length; i++)

function collectddtabs(){
var tabobj=document.getElementById("origintabs")

function do_onload(){
expandcontent(initialtab[1], tabobjlinks[initialtab[0]-1])

if (window.addEventListener)
window.addEventListener("load", do_onload, false)
else if (window.attachEvent)
window.attachEvent("onload", do_onload)
else if (document.getElementById)

</script> </HEAD>

  <div id="origintabs" class="contentab">
<li><a href="#" onMouseover="expandcontent('content1', this)">Article</a></li>
<li><a href="#" onMouseover="expandcontent('content2', this)">Comment</a></li>
<li><a href="#" onMouseover="expandcontent('content3', this)">Trackback</a></li>
<li><a href="#">by dedo</a></li>

<DIV id="contentabox">

<div id="content1" class="boxcontent">
Return to the <a href="">frontpage</a> of Dynamic Drive.

<div id="content2" class="boxcontent">
See the new scripts recently added to Dynamic Drive. <a href="">Click here</a>.

<div id="content3" class="boxcontent">
Original, practical <a href="">CSS codes and examples</a> such as CSS menus for your site.

</DIV> </BODY>


posted by 大道
tab - access denied error

Personal/Delegated 2011.03.10 11:28

일반 테스트 환경에서는 잘되는데
티스토리에 올리니 튕긴다. - 당장 해결하기에는 시간이 걸린다.
posted by 大道