parvez
10-31-2006, 07:39 PM
Hi
I have been trying to create this simple tab made by css, but it's just not working perfectly in FF. If you look at it in IE, you'll see the difference. In FF, it has a gap of 1px between the bottom border of the UL element and the LI element. If I change the bottom border's width of the active tab to 2px, then it looks fine but still I couldn't figure out what to do with the inactive tab since that leaves 1px gap. I have pasted the entire html code below. If you have a minute, please try the following html code and you'll be able to see the difference in FF and IE. I'm not sure why it's not working in FF. Not using anything special either. Just a plain simple css tab. Thanks in advance for your help.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>CSS TAB TEST</title>
<style type="text/css" media="screen" title="Default">
/*.groupTabContainer
{
padding: 0 0 0 5px ;
margin: 5px 0 0 0 ;
list-style-type: none ;
border-bottom: 1px solid #6699CC ;
}
.activeTab
{
border-bottom: 1px solid white !important ;
background: #fff ;
}
.inactiveTab
{
background: #def ;
}
.activeTab, .inactiveTab
{
display: inline ;
margin-left: 5px ;
padding: 3px 5px 2px 5px ;
border: 1px solid #6699CC ;
border-bottom: none ;
font-family: Arial, Helvetica, sans-serif ;
font-size: 9pt ;
font-weight: bold ;
color: #444 ;
cursor: pointer ;
}
*/
.groupTabContainer
{
margin: 10px 0 0 0 ;
padding: 0 0 0 5px ;
border-bottom: 1px solid blue ;
}
.activeTab, .inactiveTab
{
margin: 0 2px 0 2px ;
padding: 3px 3px 0 3px ;
list-style: none ;
display: inline ;
background: #def ;
border: 1px solid blue ;
border-bottom: 0 ;
}
.activeTab
{
background: #fff ;
border-bottom: 1px solid #fff ;
}
</style>
</head>
<body>
<ul id="campusBuildingGroup" class="groupTabContainer">
<li id="buildingClassroom" class="activeTab" onclick="displayTabContent(this)">Classroom</li>
<li id="buildingOthers" class="inactiveTab" onclick="displayTabContent(this)">Other</li>
</ul>
</body>
</html>
I have been trying to create this simple tab made by css, but it's just not working perfectly in FF. If you look at it in IE, you'll see the difference. In FF, it has a gap of 1px between the bottom border of the UL element and the LI element. If I change the bottom border's width of the active tab to 2px, then it looks fine but still I couldn't figure out what to do with the inactive tab since that leaves 1px gap. I have pasted the entire html code below. If you have a minute, please try the following html code and you'll be able to see the difference in FF and IE. I'm not sure why it's not working in FF. Not using anything special either. Just a plain simple css tab. Thanks in advance for your help.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>CSS TAB TEST</title>
<style type="text/css" media="screen" title="Default">
/*.groupTabContainer
{
padding: 0 0 0 5px ;
margin: 5px 0 0 0 ;
list-style-type: none ;
border-bottom: 1px solid #6699CC ;
}
.activeTab
{
border-bottom: 1px solid white !important ;
background: #fff ;
}
.inactiveTab
{
background: #def ;
}
.activeTab, .inactiveTab
{
display: inline ;
margin-left: 5px ;
padding: 3px 5px 2px 5px ;
border: 1px solid #6699CC ;
border-bottom: none ;
font-family: Arial, Helvetica, sans-serif ;
font-size: 9pt ;
font-weight: bold ;
color: #444 ;
cursor: pointer ;
}
*/
.groupTabContainer
{
margin: 10px 0 0 0 ;
padding: 0 0 0 5px ;
border-bottom: 1px solid blue ;
}
.activeTab, .inactiveTab
{
margin: 0 2px 0 2px ;
padding: 3px 3px 0 3px ;
list-style: none ;
display: inline ;
background: #def ;
border: 1px solid blue ;
border-bottom: 0 ;
}
.activeTab
{
background: #fff ;
border-bottom: 1px solid #fff ;
}
</style>
</head>
<body>
<ul id="campusBuildingGroup" class="groupTabContainer">
<li id="buildingClassroom" class="activeTab" onclick="displayTabContent(this)">Classroom</li>
<li id="buildingOthers" class="inactiveTab" onclick="displayTabContent(this)">Other</li>
</ul>
</body>
</html>