akottr / dragtable

re-order table columns by using drag'n'drop
http://akottr.github.io/dragtable
MIT License
203 stars 166 forks source link

Table border #38

Open scriby opened 9 years ago

scriby commented 9 years ago

The tables in the application I'm working on have a border around the entire table, but not between the cells. When dragging a column, because it creates a new table for each header, the border gets replicated.

Here's an example: http://screencast.com/t/ehwLYAlyAiji

In my application, it's more than just a cosmetic thing, because the width of the additional borders causes the last column header to get bumped down to the next line, which throws everything off.

I think I could solve this with some css if I had a good way of targeting the tables. I could do ul table, but I'd prefer something more specific. Maybe you could add a class on to the auto-generated tables so I could style them specifically?

Mottie commented 9 years ago

Try adding this css to the dragtable.css file:

.dragtable-sortable table {
    margin: 0;
    border-left: 0;
    border-right: 0;
}

I included a margin set to zero in case the table has any margins - see issue #40.