
Javascript splitter pane
Technical ·Saturday March 14, 2009 @ 01:13 EDT (link)
Regarding my CSS splitter pane issues: I posted two questions to stackoverflow.com; one helped a little, and the other netted a suggestion to use a table, which sort of worked, but when the splitter moved too far to the right, whatever calculations were being done blew up and the thumbnail pane jumped below the main page (as in, below the viewport, causing a new top-level scrollbar to appear; the scrollbar's not the problem: overflow: hidden would get rid of it, but it'd also get rid of my content ). What I need is to be able to set width: 100% - 3px, and I finally had to go with a Javascript hack to calculate it (I also tried calcualting a percentage width, but like the tables, when the splitter was moved over too far it broke down). Setting the width in pixels rather than as a percentage (I had been using a width: 99.5% hack) meant that I had to update it when the splitter bar moves. I hope CSS 3 has better solutions to this problem.