...

View Full Version : HTML+CSS div class active by default



valezija
05-20-2012, 11:57 AM
Hello really need help.
How make one of .
My code HTML:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />

<link rel="stylesheet" href="css/taby.css" type="text/css" media="screen">
</head>
<body>
<div class="tabsLink">
<a href="#tab1">A</a>
<a href="#tab2">B</a>
</div>

<br>
<a class="tabs" id="tab1"></a>
<div class="tab">
<a href="http://www.google.lt">Google</a><br>
<br>
</div>

<a class="tabs" id="tab2"></a>
<div class="tab">
<a href="http://www.nigma.ru">Nigma</FONT></a><br>
</div>


</body>
</html>


CSS code is:

.tabs {
opacity: 0;
visibility: hidden;
}
.tab{
position:absolute;
visibility: hidden;
z-index: 10;

}
.tabs:target+.tab {
opacity: 1;
visibility: visible;
}
.tabsLink a{
background-color:#478CFB;
padding:5px;
font: bold 12pt "Trebuchet MS", tahoma, verdana, arial narrow, arial;
color:#fff;
text-decoration:none;

-webkit-border-top-left-radius: 1px;
-webkit-border-top-right-radius: 1px;
-moz-border-radius-topleft: 1px;
-moz-border-radius-topright: 1px;
border-top-left-radius: 1px;
border-top-right-radius:1px;

}

dan-dan
05-20-2012, 02:15 PM
Can you explain your problem bit better.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum