Remove horizontal spacing when using position:relative in navigation bar - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Relative Position

Description

Remove horizontal spacing when using position:relative in navigation bar

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
span.link {
   margin:-9px;
}

a.navbar:link {
   color:Chartreuse;
   text-shadow:none;<!--  w  ww  .  java  2s. c  o m-->
   padding:6px 13px;
   white-space:nowrap;
   font-size:16px;
}

a.navbar:visited {
   color:yellow;
   text-shadow:blue 0.0px 0.0px 3px
}

a.navbar:hover {
   color:pink;
   background:OrangeRed;
}

a.navbar:active {
   color:grey;
}

a.navbar {
   padding:none;
   font-size:16px;
}

span.leftbraces {
   font-size:26pt;
   padding:0px 0px;
   position:relative;
   right:-10px;
   bottom:-4.76px;
   color:BlueViolet;
}

span.rightbraces {
   font-size:26pt;
   padding:0px 0px;
   position:relative;
   left:-10px;
   bottom:-4.76px;
   color:Chartreuse;
}

center {
   background:yellow;
}
</style> 
 </head> 
 <body> 
  <center> 
   <span class="link"> <span class="leftbraces">L</span> <a class="navbar" href="index.htm">Lore</a> <span class="rightbraces">L</span> </span> 
   <span class="link"> <span class="leftbraces">L</span> <a class="navbar" href="sitemap.htm">Lorem ip</a> <span class="rightbraces">L</span> </span> 
  </center>  
 </body>
</html>

Related Tutorials