I just need to show my plain html table in which it shows only lines of rows and hide columns in 开发者_运维问答it, so that the another person seeing it, thinks it as a table with one column, but actually it has multiple columns...I cant use colspan, as I need columns as itself...
Please help thanks..
Turn the border off on your: <table border="0" class="thisTable">
, and give it a class like the example. Then add the following lines to your CSS:
table.thisTable {
border-bottom:1px #000 solid;
// edit:
border-spacing:none; // you need this to take away spacing you still see
border-collapse:collapse; // you need this to take away spacing you still see
}
table.thisTable td {
border-top:1px #000 solid;
}
This will add a border at the top for each td and end the table off with a bottom border.
Hope this helps.
//edit:
Add a class to the first and last <td>
of each <tr>
and define the following in your CSS as well:
table.thisTable td.first {
border-left:1px #000 solid;
}
table.thisTable td.last {
border-right:1px #000 solid;
}
This will round the borders off nicely along the edges of the table.
Use CSS to style your table:
td {
border-bottom: 1px;
border-top: 1px; /* optional, you will have to play with the formatting */
border-left: none;
border-right: none;
}
This will give a top and bottom border to each data cell, which should do what you need it to. Play a little with the formatting to make sure you get it right.
精彩评论