When you’re displaying variations in a grid view, you might want to make the table headers ‘sticky’ – so that when users scroll up or across, the attribute names remain visible. This makes it easier for the user to read them.
You can do this with some CSS:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.wcbvp-scrollable { | |
height: 500px; | |
} | |
.woocommerce div.product form.cart table { | |
border-width: 0 0 1px; | |
position: relative; | |
} | |
.wcbvp-table-wrapper thead th { | |
position: sticky; | |
top: 0; | |
background: #E0E0E0; | |
} | |
.wcbvp-table-wrapper tbody th { | |
position: sticky; | |
left: 0; | |
background: E0E0E0; | |
} |
Here’s how to add CSS to your site.