Ok, here is one for you. I want to have a table with 4 columns total. I only want to view 3 of these columns even when resizing my browser leaving the 4th column always hidden from view. However, I still need to keep my scrollbar so I can scroll to the 4th column if necessary. Essentially 3 columns take 100% of viewport.
I want to use jQuery for this without any plugins.
Ok folks. Here’s how you do it, create a function that you can call onResize in the body tag. Create a table with a header row that colspans over 3 of the columns that will be unused, make it nowrap (important). Get the size of the total width viewport and set the first td width to that, it was actually easier than I thought:
I hope this helps someone out in the future.