I am trying to accomplish this in haml:
How do I adjust the following to have merged cell headers to accomplish the same as the excel picture:
%table
%tbody
%tr
%th Name
%th Sunday
%th Monday
%th Tuesday
%th Wednesday
%th Thursday
%th Friday
%th Saturday
%tr
%th 1
%th 2
%th 3
%th 4
%th 5
Looks like you want the colspan
and rowspan
attributes. Here's a demo.
%table
%tbody
%tr
%th{:rowspan => 2} Name
%th{:colspan => 5} Sunday
%th{:colspan => 5} Monday
%th{:colspan => 5} Tuesday
%th{:colspan => 5} Wednesday
%th{:colspan => 5} Thursday
%th{:colspan => 5} Friday
%th{:colspan => 5} Saturday
%tr
- 7.times do
%th 1
%th 2
%th 3
%th 4
%th 5
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With