0
  <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
   <title></title>
    <style type="text/css">
   li {
      display:inline;
      list-style-type:none; 
      padding-left:1em;
      margin-left:1em;
      border-left:1px solid #ccc;
      }
   li:first-child {
     border-left:none
   }


  </style>
 </head>
 <body>

<table  cellspacing="0px;" style="border-top-width:0.1px; 
 border-top-style:solid;border-top-color:#ccc; border-bottom-color:#ccc; 
  border-bottom-style:solid; border-bottom-width:0.1px;">
 <tr>
    <td>
          <ul>
           <li><a href="#">Item one</a></li>
            <li><a href="#">Item two</a></li>
            <li><a href="#">Item three</a></li>
             <li><a href="#">Item four</a></li>
          </ul>
    </td>
    </tr>
</table>
</body>

When i am runnning the code in google chrome top and bottom borders are not displayed while in IE they are. I also want to increase the line seperator height between li tags Am I following the right approach.Can anyone help

coder25
  • 2,363
  • 12
  • 57
  • 104

4 Answers4

1

Change 0.1px to 1px One pixel is the smallest screen unit, you can't show .5 or .1 of a pixel :) In IE the border is shown because it rounds up to 1px and other browsers floor it down to 0px

Zoltan Toth
  • 46,981
  • 12
  • 120
  • 134
1

Use

border-top-width:1px;

and not

border-top-width:0.1px;

Your measurement is pixels, but your syntax is as if you are using em's.

This issue is also evident in your cellspacing tag.

mmcglynn
  • 7,668
  • 16
  • 52
  • 76
  • It is not increasing the height – coder25 Feb 09 '12 at 16:18
  • prerna, maybe post the height issue above to a new question? – mmcglynn Feb 09 '12 at 16:44