Vertical align this hyperlink button - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:a

Description

Vertical align this hyperlink button

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">

#nav a {<!--  www  .j  a v a  2 s  .  c  o m-->
   text-decoration:none;
   display:block;
   background-color:#99ccff;
   border: 1px solid #000000;
   list-style-type: none;
   margin:0;
   padding:0;
   width: 125px;
   height: 25px;
   text-align: center;
   line-height: 25px;
   margin-top: auto
}
#nav a:link {
   color:black;
}
#nav a:visited {
   color:#000000;
}
#nav a:hover {
   color:#000000;
   background-color:#EAEAEA;
}
a {
   text-align: center;
}


      </style> 
 </head> 
 <body> 
  <table> 
   <tbody> 
    <tr> 
     <td id="nav"> <a href="">1</a> </td> 
     <td id="nav"> <a href="">2</a> </td> 
     <td id="nav"> <a href="">3</a> </td> 
    </tr> 
    <tr> 
     <td id="nav"> <a href="">4</a> </td> 
     <td id="nav"> <a href="">5</a> </td> 
     <td id="nav"> <a href="">6</a> </td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials