Below css working for me whick display horizontal as well as vertical line.
 
<style type="text/css">
    .MyStyle td
{
    border-bottom: solid 1px silver;
    border-collapse: collapse;
    padding-bottom:15px;
    padding-top:15px;    
    border-right: solid 1px silver;
    border: solid 1px silver;
}
</style>
 
And I use this css in my datalist which is having repeat column=4:
 
<asp:DataList CssClass="MyStyle"  ID="dl_featured" runat="server" CellPadding="1" CellSpacing="1" RepeatColumns="4"
                        RepeatDirection="Horizontal" OnItemDataBound="dl_featured_ItemDataBound" Width="100%"
                        OnItemCommand="dl_featured_ItemCommand" EnableViewState="false">
 
Above code display the desired output