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

Combine two rows to make it a single row

Tags: row table combine

Combine two rows to make it a single row

Problem

I need to Combine two rows in a Table into a single Row so that I can apply a style (background with a gradient) on that row.

I tried to use rowspan on a table cell with colspan = number of total columns but that does not work.

Tried to use a nested table inside the main table header, but in that case the table background does not have the desired style.

Demo: http://jsfiddle.net/Debarupa/EyxkJ/3/

If you look at the demo, I need to have "Additional Info" and the column headers merged to a single row so that the style 'gridheader' can be applied to them as one row.

Ideas anyone? Thanks for any assistance in advance.

Problem courtesy of: WhatsInAName

Solution

Try using two different classes for top two rows you want to combine. Then break gradient onto two, for each of these rows with color changing 0-50% for the first one and 50-100% for the second one.

Here is the example: http://jsfiddle.net/EyxkJ/5/

Not sure if this is the most elegant solution though.

Solution courtesy of: gkond

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

Combine two rows to make it a single row

×

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

Get updates delivered right to your inbox!

Thank you for your subscription

×