| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| DesignersTalk > Variable width scrolling table with fixed header |
|
LinkBack | Thread Tools | Search this Thread |
|
|
#1 (permalink) |
|
Registered User
Join Date: Jan 2008
Posts: 17
|
Variable width scrolling table with fixed header
OK, this is a toughy that I've been wrestling with for a while now. If anyone could help I would EXTREMELY grateful! here's the link to the static version of what I have right now: my1Password Right now it's just a static page temporarily held on my own site until I finish getting everything to work. Once done it will be put into rails and all the interactivity will be added (mostly JS). The problem is the table you see in the top right. I found how a tutorial that helped me get this far here ( Pure CSS Scrollable Table with Fixed Header ) ... the problem is that I need the table to resize with the window (at least horizontally if not vertically)! I can not for the life of me figure out how to make that work and still keep the thead columns lined up with the tbody while having the tbody scrollable. Preferably the first column should be 45%, the second 30%, and the third 25%. If necessary the second and third columns could be fixed width while the first takes up whatever space is left. Also I'm trying to get the text to not wrap if it's wider than the column and to truncate (maybe just overflow:hidden) but that doesn't want to work right either. Anyone have any ideas? I've been trying everything I can think of for over a month now (giving up and coming back). I have a crappy workaround in place on the live site right now but I'm really not satisfied with it. |
|
|
|
|
|
#2 (permalink) |
|
Registered User
Join Date: Jan 2008
Posts: 17
|
Well if anyone attempted to help on this but couldn't get anywhere, thanks! I ended up going a different route that isn't exactly what I wanted but looks good and works in all tested browsers so far. It's a fairly major hack but whatever ... damn browsers. The thing that really gave me a hard time was Firefox's stupid scrollbars (at least on the Mac version). They really don't like absolute and/or fixed positioning, especially with overlapping elements. Took me a lot of hours to figure all this out based off a general idea that popped in my head a couple nights ago. I ended up using this html: Code:
and this CSS Code:
More than a bit convoluted but for now I'm just happy it works and is pretty (I'm more of a designer than coder)! I'll be getting rid of the .truncateText spans and just end up limiting the number of characters via JS and adding an ellipses. Not ideal but the only thing I can get to consistently work across browsers and since the full info will be in the below details pain I think it's good enough. You can check out the static page here if you'd like: my1Password It's almost all done being put into Rails now and should go live on their site pretty soon! I'm excited |
|
![]() |