Current time: 04-19-2014, 07:36 AM Hello There, Guest! (LoginRegister)

Post Reply 
Freeze panes at top of table like Excel
03-20-2008, 09:28 PM
Post: #21
Freeze panes at top of table like Excel
As promised, here's my blog post describing what's going on with scrolling tables in IE7. For those who don't want to read through it all, here's a direct link to the implementation.

In addition to making it work in IE7 I've tried to clean the original source up a little bit, so hopefully it'll be easier to understand if anyone, thread starter included, ever needs to take a peek at how it works Smile
Visit this user's website Find all posts by this user
Quote this message in a reply
03-20-2008, 11:14 PM
Post: #22
Freeze panes at top of table like Excel
That works in IE7 but has a horizontal scroll bar.

The header columns break into two rows in Firefox and there's also something screwy with the height, as the table border goes all the way down the page, as if the full table was shown.

I see the last column as being bigger in both browsers, but didn't know if that's how it was supposed to be.

--------------------------------------------------------
Tongue Maximum savings promo code: MaxSavingsAtDH
Visit this user's website Find all posts by this user
Quote this message in a reply
03-20-2008, 11:28 PM
Post: #23
Freeze panes at top of table like Excel
... haha. I actually knew about those bugs and fixed them locally, but forgot to upload the file! Thanks for pointing it out. It should be fixed now.

And yeah, the last column is supposed to be bigger. The second column is actually slightly larger than the first as well, but the difference isn't as pronounced.
Visit this user's website Find all posts by this user
Quote this message in a reply
03-20-2008, 11:42 PM
Post: #24
Freeze panes at top of table like Excel
That fixed the header columns, but in Firefox v2.0.0.12, the border is still all the way down the page, basically the same size as the table would be without the scrolling.

If it was the last thing on a page, then it would look right without a border, but in the middle of a page it would push everything below it to the bottom.

I also still see the horizontal scroll bar in IE7. Is that gone in your browser? My version is 7.0.5730.11, if that makes a difference.

--------------------------------------------------------
Tongue Maximum savings promo code: MaxSavingsAtDH
Visit this user's website Find all posts by this user
Quote this message in a reply
03-21-2008, 01:59 AM
Post: #25
Freeze panes at top of table like Excel
Ok, I fixed the Firefox thing, so that should be taken care of.

I think I've fixed the IE7 issue as well, but about that, are you using the "classic" or "XP" Windows theme?

From the looks of things, when Microsoft added the new XP theme, they increased the width of the scroll bar by a pixel. This code relies on subtracting out the width of the scroll bar from the width of the table. Those grey scrollers, it seems, are a uniform 16px in width, which is a fact that the original author relied on in performing the calculation and which I carried over to the revision. Unfortunately, the XP theme has scrollbars 17px wide, which is why you were seeing a 1 pixel side-scroller. I, on the other hand, was writing this on a computer running the Classic theme, with 16px scrollbars, causing there to be no side-scroller. The "fix" I've applied is to simply force the side-scroll to disappear, and it is gone now in IE7 no matter which theme I use.

That said, if anyone has IE6 running in Windows XP using the XP theme, I would be very interested in knowing if you see a side-scroller. I do all my IE6 testing in Linux, so I don't have a particularly good way to check this on my own.
Visit this user's website Find all posts by this user
Quote this message in a reply
03-21-2008, 02:52 AM
Post: #26
Freeze panes at top of table like Excel
I have the XP theme - and it seems to be fixed now in both browsers. I would guess that pretty much makes it safe for use... at least until MS breaks it again. Wink

--------------------------------------------------------
Tongue Maximum savings promo code: MaxSavingsAtDH
Visit this user's website Find all posts by this user
Quote this message in a reply
03-24-2008, 11:37 AM
Post: #27
Freeze panes at top of table like Excel
I've tried your styles on my table through a few different iterations, but I still have some things I can't fix. What am I missing? http://ykfp.org/php/lyletrap/tabletotalscss5.php

When I included your h styles, my header columns no longer align with the body columns. Without your h styles the scroll bar disappeared.

I tried to increase the height: in both places. I get more lines displayed on the screen, but my table outline still goes off the page.

When I look at this on Windows XP with IE 7.0.5730, it blows up. I get very tall lines, no scroll bar. My current Windows theme is a modified XP.

This signature line intentionally blank.
Visit this user's website Find all posts by this user
Quote this message in a reply
04-01-2008, 01:25 PM
Post: #28
Freeze panes at top of table like Excel
I finally got this table to look like I want without frames: http://ykfp.org/php/lyletrap/tabletotalscss7.php. I finally caught that for the last 6 iterations of this table, I missed putting a <div id="tableContainer" class="tableContainer"> tag around my table after defining it. Now it's working like I had hoped, in both Thunderbird and IE 7. Well, I learned something. Thanks for your help.

This signature line intentionally blank.
Visit this user's website Find all posts by this user
Quote this message in a reply
04-01-2008, 09:50 PM
Post: #29
Freeze panes at top of table like Excel
Fixed link (there was a period on the end).

Not really a big deal, but I'm not sure if you noticed that in IE7, there's a 1 or 2 pixel gap above the header cells. If you scroll up and down while looking at it, you can see it moving past. I don't see it in Firefox though - looks good!

The one annoying thing about the frozen pane effect is that depending on how people browse, or use a scroll wheel, you have to horizontal scroll to get the table's scrollbar... at least that table size with my settings.

--------------------------------------------------------
Tongue Maximum savings promo code: MaxSavingsAtDH
Visit this user's website Find all posts by this user
Quote this message in a reply
04-02-2008, 11:33 AM
Post: #30
Freeze panes at top of table like Excel
I've noticed that 1 or 2 pixel gap in IE as well. Is that something I did? Is there a fix?

Here's a mystery. Some people using IE7 have reported that the header bar is placed a couple rows down in the table. They even sent a screen shot: http://ykfp.org/images/shot.jpg Another guy told me he saw that effect once but then the problem "fixed itself". http://corky.net/scripts/brazil.html

Why can't MS follow standards? Can I get the EU to sue them for another billion over this?

Now there's a new problem. The "customer" now asks if I can make the table smaller, like 680px, so it will fit within his frames. I tried some simple things, but the header columns got out of line with the body columns. Then I changed some other things, and the table's gone real wacky in both browsers. http://ykfp.org/php/lyletrap/tabletotalscss8.php Maybe I'll go back a step and try again.

This signature line intentionally blank.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: