Here's the CSS (its actually a PHP file):
-- cut --
<?php
if (preg_match("/MSIE/", $_SERVER['HTTP_USER_AGENT']))
{
$browser = "IE";
}
elseif (preg_match("/Firefox/", $_SERVER['HTTP_USER_AGENT']))
{
$browser = "Firefox";
}
else
{
$browser = "Other";
} ?>
body {
margin: 2em;
}
pre, div, form {
margin: 0;
}
/* tab menu unordered list */
ul#tabMenu {
margin: 0 0.1em 0 0.1em;
padding: 0.2em 0.5em 0.2em 0.5em;
font: bold 14px Arial;
border-bottom: 1px solid #aaa;
list-style-type: none;
}
/* all tabs */
ul#tabMenu li {
display: inline;
}
/* active tab */
ul#tabMenu li.active {
color: black;
background-color: #f7f7f7;
margin: 0 0.3em 0 0.1em; /* ie only */
margin: 0 <?php echo (($browser == "IE") ? "0.3em" : "0.1em"); ?> 0 0;
border: 1px solid #aaa;
border-bottom: 1px solid #f7f7f7;
<?php
if ($browser == "Firefox") { ?>
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
<?php
} ?>
}
/* non-active tab */
ul#tabMenu li a, ul#tabMenu li a:visited {
color: #aaa;
background-color: #f7f7f7;
margin: 0 0.1em 0 0.1em;
padding: 0.2em 0.5em 0.2em 0.5em;
text-decoration: none;
border: 1px solid #aaa;
<?php
if ($browser == "Firefox") { ?>
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
<?php
} ?>
}
/* hovered-over tab */
ul#tabMenu li a:hover {
color: #f7f7f7;
background-color: #ccc;
text-decoration: none;
}
/* this makes the hovered-over tab appear to "pop out" */
ul#tabMenu li.active, ul#tabMenu li a:hover {
padding: 0.5em 0.5em 0.2em 0.5em;
}
/* tab content */
.tabContent {
background-color: #f7f7f7;
padding: 20px;
border: 1px solid #aaa;
border-top-style: none;
}
-- cut --