开发者

how to assign borders for the elements inside the TD in html

i have table unser it i have one开发者_C百科 td

with elemets inside the menu are coming dynamically from database that is .cs(c#) file i am assging the values ex: i have admin, user, manager like these now i need to assign vertical boder b/w them inside the td like this

|admin| user |manager| as the elements are cmg dynamicallly how to assign border in between them any solution on this would be great thank you


you can use jQuery (for example if you have table with id 'your_table_cell_id_here'), type in your html:

<script type="text/javascript">
  $(document).ready(function() {
    $('#your_table_cell_id_here').css({'border-left' : '1px solid #000000', 'border-right' : '1px solid #000000'});
  });
</script>

or just make a new css style in your .css file:

.table_class td{
  border-left: 1px solid #000000;
  border-right: 1px solid #000000;
}

and don't forget to five your table a class 'table_class'.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜