I'm trying to create a php navigation bar. I've come up with a nice looking scheme using the following code:
css:
a.navbar:link { color:#AAAAFF; text-shadow:none;
padding: 5px 12px; white-space:nowrap; font-size:15px;}
a.navbar:visited { color:#AAAAFF; text-shadow: #4444FF 0.0px 0.0px 2px}
a.navbar:hover { color:#CCCCCC; background:#444488; }
a.navbar:active { color:grey; }
a.navbar {padding:none; font-size:15px;}
span.leftbraces { font-size:25pt; padding: 0px 0px;
position:relative; right:-9px; bottom:-3.75px;}
span.rightbraces { font-size:25pt; padding: 0px 0px;
position:relative; left:-9px; bottom:-3.75px;}
php:
<?php
echo "<center>";
$links = array('Home'=>'index.htm', 'Site Map'=>'sitemap.htm');
$leftbrace = "<span class=leftbraces>[</span>";
$rightbrace = "<span class=rightbraces>]</span>";
foreach ($links as $key => $value) {
echo "$leftbrace<a class=navbar href=\"$value\">$key</a>$rightbrace";
}
echo "</center>";
?>
and html:
<html>
<link rel="stylesheet" type="text/css" href="style.css">
<?php include 'navbar.test.php';?>
</html>
How can I eliminate the space between the braces without giving up the nice tightly-fitting background padding? The <table>
tag I've included is not necessary, it was just my latest attempt to get this to work.
[ Home ] I want to get rid of this space [ Site Map ]
but I want to keep the tight fit of the highlighting