Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How do I add shadow around every 3 cells in a table?

How do I add shadow around every 3 cells in a table?

Problem

I am using Bootstrap buttons as cells in a Table. I want to Add Shadow around every 3 cells, so that it makes a group of each 3 cells.

Code:

Thanks

Problem courtesy of: user2798227

Solution

Instead of one button in each cell I added 3 button in the same cell.

Here is the JSFiddle.

HTML:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

JavaScript:

var table = $('#Tableid');
var hostId = 1;
var count = 0;
var row = $('').addClass('test');
for(var i=0; i"+hostId+"";
        hostId++;
    }    

    var cell = $(''+hostId+'').addClass('test').html(button);
    row.append(cell);

    if(count').addClass('test');
    count = 0;
    }
}
Solution courtesy of: adolfotcar

Discussion

View additional discussion.



This post first appeared on CSS3 Recipes - The Solution To All Your Style Problems, please read the originial post: here

Share the post

How do I add shadow around every 3 cells in a table?

×

Subscribe to Css3 Recipes - The Solution To All Your Style Problems

Get updates delivered right to your inbox!

Thank you for your subscription

×