Hi,
I have a problem that makes no sense to me. I’m trying to dress up some links to look like tabs. I change the look of the link based on their class name “active, inactive”. I also group tabs into div elements, and group those div elements into another div element. That way I can apply the same style to every tab, and control the position of tab groups separately.
Everything works in Firefox, but IE 6 handles this strangely.
Here’s the source from an example of what I’d like to do.
[code=html]<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html>
<head>
<title>CSS tab test</title>
<style type=”text/css”>
#tabNavigation A {
color:#444;
text-decoration:none;
font-weight:bold;
background:#ddd;
padding-top:3px;
padding-bottom:2px;
padding-left:12px;
padding-right:12px;
}
#tabNavigation A.active{
border-top:1px solid #000;
border-left:1px solid #000;
border-right:1px solid #000;
border-bottom:1px solid #EEE;
background:#EEE;
color:#666;
}
#tabNavigation A.inactive{
border-top:1px solid #000;
border-left:1px solid #000;
border-right:1px solid #000;
border-bottom:1px solid #000;
background:#CCC;
}
#tabNavigation A:hover{
color:blue;
cursor:default;
}
#tabdiv{
position:absolute;
top:92px;
left:10px;
z-index:1;
}
</style>
</head>
<body>
<div id=”tabNavigation”>
<div id=”tabdiv”>
<a href=”#” class=”active” onclick=”javascript:return false;”>Tab1</a>
<a href=”#” class=”inactive” onclick=”javascript:return false;”>Tab2</a>
<a href=”#” class=”inactive” onclick=”javascript:return false;”>Tab3</a>
<a href=”#” class=”inactive” onclick=”javascript:return false;”>Tab4</a>
</div>
</div>
</body>
</html>
If you try to load this html in IE6 you will probably see that the tabs only take on some of the values set by CSS. in tabNavigation A it takes the padding-left and right settings, but ignores the top and bottom settings. It does the same thing for border. Can anyone help me out? Tell me how the tabs appear in their IE6? Maybe I should try another approach to making the tabs?