19 replies [Last post]
IronWill
Offline
newbie
Last seen: 13 years 27 weeks ago
Joined: 2007-05-19
Posts: 9
Points: 0

I've looked around and couldn't find an answer myself, so I'm hoping someone else here has heard of this...

Anyway, I've seen happen with other pages, and it is happening with mine. I have a sidebar on the right-hand side that I have fixed in place so it won't scroll, while the rest of the page DIV's are able to scroll. If I hover the mouse over other parts of the page, it scrolls as expected, but when I hover over the fixed DIV, instead of the rest of the page scrolling while the fixed DIV stays fixed, the whole page stays fixed in Firefox. In IE7, if I hover over the fixed DIV, the whole page scrolls like it should while the fixed DIV stays fixed, as expected (or at least as *I* would expect it to!). I take it this is a browser bug either in Firefox or IE7? Which way is it supposed to work, and how can I allow for page scrolling in both browsers even when the mouse pointer is over a fixed DIV?

Here's my test page so you can see what I mean. In Firefox, try scrolling the page while the cursor is not on the right-hand sidebar--it works, but when you do hover over that sidebar, scrolling fails. If you try both again in IE7, both work, AND my "back to top" link will work in IE7, but again, Firefox seems to be messing with that too because its in the "fixed" DIV.
http://www.greenwichlibrary.org/trainingcenter.asp

I'll happily post the CSS code involved if folks need it in order to see what's happening; I've refrained for now because I was hoping this was something unrelated to my particular code, plus I'm away from work so posting the CSS will take a few days.

Thank you in advance!

Ed Seedhouse
Ed Seedhouse's picture
Offline
Guru
Victoria British Columbia
Last seen: 48 weeks 4 days ago
Victoria British Columbia
Timezone: GMT-8
Joined: 2005-12-14
Posts: 3570
Points: 675

First things first. You

First things first. You have no basis for complaining about how any browser renders your page until you give them valid html or xhtml. You haven't done this so you have to do it before you try to fix what you see as a problem.

I can't gurarntee that this will make the page work "right" but I can guarantee that you are probably not going to get much help from us until you can provide us with valid html to look at for diagnosis. Diagnosing problems is hard enough without having to wade through reams of invalid xhtml.

The W3c validator reports 63 errors. Many of them are of the type that can and often do mess up browser rendering. Until I can at least know that this isn't the source of your problem I'm not going to try further.

Someone else might possibly be more generous and they're all better at diagnosing than I am, but valid html is not an option for CSS design, it is a necessity and the equivalent of the foundation of a house.

Ed Seedhouse

Posting Guidelines

Watch out! I am carrying irony, sarcasm and satire, and know how to use them.

IronWill
Offline
newbie
Last seen: 13 years 27 weeks ago
Joined: 2007-05-19
Posts: 9
Points: 0

Well, that gives me a starting point

I'll try to get the page to validate first.

Interestingly (to me), the first 12 errors, then 30 through 37, as reported by the W3's validator (http://validator.w3.org/check?uri=http%3A%2F%2Fwww.greenwichlibrary.org%2Ftrainingcenter.asp) are all reference criteria being passed via URL to our Evanced calendar database; I'll try to encode the "&"'s, so hopefully that will fix those... The rest I'll work on and see if that does anything to help my scrolling issues.

In the meantime, I take it you've never heard of any issues in Firefox with scrolling pages that have fixed DIV's on them...?

Thanks!

Ed Seedhouse
Ed Seedhouse's picture
Offline
Guru
Victoria British Columbia
Last seen: 48 weeks 4 days ago
Victoria British Columbia
Timezone: GMT-8
Joined: 2005-12-14
Posts: 3570
Points: 675

You can validate variables

You can validate variables passed via url by using the html entity codes in the url, i.e. & instead of just the ampersand. You really do have to do this to expect html and CSS to work properly together.

If you can't provide valid html or xhtml you are not alone, in fact I work with a system that does that and it's a nightmare, but they pay me money and I believe in the organization (a public library) so I live with it. But all I can then do is cut and try things and some things just aren't possible since the source, over which I have no control, is just not valid html.

If that's your situation I sympathize, but I won't try to do that outside of work - I get sick enough of it there.

However there's really no excuse outside of the insular little Library World to put up with that sort of thing. If your vendor's database can't put out valid html then get another vendor. Smile Or at least threaten them with that, maybe they can be bluffed.

Ed Seedhouse

Posting Guidelines

Watch out! I am carrying irony, sarcasm and satire, and know how to use them.

IronWill
Offline
newbie
Last seen: 13 years 27 weeks ago
Joined: 2007-05-19
Posts: 9
Points: 0

Insular Library World

Heh, tell me about it! At my library job, I only get to work on the Web site part-time (it's one of the many "hats" I wear), and I usually get interrupted from what I am doing with it every 10 minutes or so throughout the day (tech questions, receiving shipments, running statistics, ILS questions/issues, paying invoices, shelving...); I often find my most productive time is either at the end of the day when everyone else has gone home, or coming up with solutions on my own time from home. Otherwise I'm so scattered so often during a normal day that it's often hard to pick up where I left off. I feel like if I was anywhere else, I'd at least be given the solitude I need to focus on this type of work, if not being given the chance to devote my entire work day to it. But I hope this situation will be resolved for me soon, but until then, arrgh.

Our vendor in this case (with the URLs) has been good about responding to our requests, so I'm fairly confident that if I end up needing something more from them, they'll make the attempt to deliver. I'll try your suggestions first and see if that fixes things. I appreciate the help!

Ed Seedhouse
Ed Seedhouse's picture
Offline
Guru
Victoria British Columbia
Last seen: 48 weeks 4 days ago
Victoria British Columbia
Timezone: GMT-8
Joined: 2005-12-14
Posts: 3570
Points: 675

I have observed the same

I have observed the same behaviour as you between Firefox and IE on your site, but I am not sure what the specifications say about how it should actually behave. Since FF is still quite a lot more standards compliant than IE7 (don't even ask about IE6) it is probable that FF is the one showing it how it "should" be, according to the standard.

But if you have to support anyone with IE6 be aware that position fixed just won't work with that version of the browser. I'm not sure if 7 has a big enough market share yet to justify using fixed positioning on a public site.

Ed Seedhouse

Posting Guidelines

Watch out! I am carrying irony, sarcasm and satire, and know how to use them.

IronWill
Offline
newbie
Last seen: 13 years 27 weeks ago
Joined: 2007-05-19
Posts: 9
Points: 0

Arrgh. One of the URL's I'm

Arrgh. One of the URL's I'm pulling in is through an ASP include, and the file it points to in turn has "replace" commands for the ampersand, but when I edit the statements in that page to not perform the replace (so the "&" remains as-is instead of being turned into an "&"), it messes up my database query results. Of course, I've had all of 5 minutes to work with it so far today because of all the other crap I have to do too, so maybe this afternoon will yield more promising results...
Someone else tried Mozilla (not Firefox) and Opera, and apparently my page works fine in those like it does in IE7, so it seems FF is sensitive to something. But maybe the validation will clear that up... (if I can get it to work).

Ed Seedhouse
Ed Seedhouse's picture
Offline
Guru
Victoria British Columbia
Last seen: 48 weeks 4 days ago
Victoria British Columbia
Timezone: GMT-8
Joined: 2005-12-14
Posts: 3570
Points: 675

IronWill wrote: Someone else

IronWill wrote:

Someone else tried Mozilla (not Firefox)

Mozilla is a browser but is now called SeaMonkey. Firefox, being a product of the Mozilla Foundation, uses the same rendering engine, called "Geko", so they will generally look the same if you have the latest version of each. Earlier versions of Geko had more bugs than later versions, but they all have bugs of course, being large computer programs.

Quote:
and Opera, and apparently my page works fine in those like it does in IE7, so it seems FF is sensitive to something. But maybe the validation will clear that up... (if I can get it to work).

Well the only way you can be sure is to check the actual standard. Whichever one follows the written standard is correct, and if there is no written standard then they are all "correct". That happens more than you might think.

Ed Seedhouse

Posting Guidelines

Watch out! I am carrying irony, sarcasm and satire, and know how to use them.

IronWill
Offline
newbie
Last seen: 13 years 27 weeks ago
Joined: 2007-05-19
Posts: 9
Points: 0

Well, I'm happy to say I at

Well, I'm happy to say I at least seem to have gotten the URL issue sorted out with the ampersands.

Of course, now my "target=blank" that I have on many links is throwing off the validator. If it isn't one thing, it's always gotta be something else. This stuff is tricky enough without being less than adequate time to work on it (I was able to grab a whole 10 minutes to work on the Web site today in between all the other *crap* foisted on me). Two steps forward, one step back...

Ed Seedhouse
Ed Seedhouse's picture
Offline
Guru
Victoria British Columbia
Last seen: 48 weeks 4 days ago
Victoria British Columbia
Timezone: GMT-8
Joined: 2005-12-14
Posts: 3570
Points: 675

IronWill wrote:Of course,

IronWill wrote:
Of course, now my "target=blank" that I have on many links is throwing off the validator

It's not throwing off the validator at all - the validator is telling, quite correctly, that target="_blank" is not allowed in xhtml 1.0 strict. You shouldn't use it anyway because opening new windows on clicking a link is a bad thing and among the list of "top 10 web design mistakes". It breaks the back button and is a bad practice.

The studies show that it annoys users and makes it more likely they will leave your site and not return, so it's also against your interests to use it. The studies and arguments against it were so convincing that, in designing xhtml 1.0 strict, the W3C designers removed it from the language. That should be enough of a hint. Smile

Ed Seedhouse

Posting Guidelines

Watch out! I am carrying irony, sarcasm and satire, and know how to use them.

IronWill
Offline
newbie
Last seen: 13 years 27 weeks ago
Joined: 2007-05-19
Posts: 9
Points: 0

I wish I could follow that

I wish I could follow that advice. But we have a number of existing links (databases, sister libraries, etc) that link out of the site that do not provide links back to us, and there's the consensus that we don't want them taken away from our site completely; granted, they can hit their back button, or their bookmark or whatever, but we also have a number of "throw-away" pop-up pages from our Evanced calendar with more information on various programs that don't have navigation on them, so we don't want those providing a "dead-end" in terms of users easily finding their way back again (some of whom are staff at public desks). I guess I *could* provide navigation on those pages, which would require either a re-design or using our general template, and then stuffing them in a different directory for order's sake... (*gears turning*)

Ed Seedhouse
Ed Seedhouse's picture
Offline
Guru
Victoria British Columbia
Last seen: 48 weeks 4 days ago
Victoria British Columbia
Timezone: GMT-8
Joined: 2005-12-14
Posts: 3570
Points: 675

Well, if you must you can

Well, if you must you can easily add a bit of javascript that will do that and not require invalid html. That would be the "proper" way to do it since it's a behaviour and behaviours are supposed to be done by a script.

On the other hand if you have legacy code to consider you might be able to justify dropping back to xhtml transitional, which allows target="_blank", if I recall right.

Ed Seedhouse

Posting Guidelines

Watch out! I am carrying irony, sarcasm and satire, and know how to use them.

IronWill
Offline
newbie
Last seen: 13 years 27 weeks ago
Joined: 2007-05-19
Posts: 9
Points: 0

Yeah, I think I'm just going

Yeah, I think I'm just going to remove all the "target=blank" references in my code. After reading up on this a bit, I'm now convinced most people won't miss them at all. Plus it will make validating my page a bit easier; I did actually try xhtml 1.1 doctype and the target module, but the w3c validator kept spitting out some kind of MIME error, even though it technically worked.

Also, I got the "back to top" link working in FF; turns out the anchor tag was missing (though I had it in there previously...so strange), so I added it back in and now it works fine, though scrolling over the fixed div still doesn't work in FF, but that's now a minor-ish issue for me since the scroll wheel works elsewhere on the page, works everywhere in IE and other browsers, and an actual middle-button click (mighty scroll) actually does work in FF when over the fixed div, so... Turns out in the case of the missing anchor tag, btw, that IE apparently recognizes the "#top" reference as meaning the top of the page, even if the tag isn't there--according to someone else, anyway. Seemed to be the case.

Now just to get the validation going...

Ed Seedhouse
Ed Seedhouse's picture
Offline
Guru
Victoria British Columbia
Last seen: 48 weeks 4 days ago
Victoria British Columbia
Timezone: GMT-8
Joined: 2005-12-14
Posts: 3570
Points: 675

IronWill wrote:Yeah, I think

IronWill wrote:
Yeah, I think I'm just going to remove all the "target=blank" references in my code. After reading up on this a bit, I'm now convinced most people won't miss them at all. Plus it will make validating my page a bit easier; I did actually try xhtml 1.1 doctype and the target module, but the w3c validator kept spitting out some kind of MIME error, even though it technically worked.

That would make it worse, not better. IE can't handle xhtml 1.1 anyway so just stay away from it. If you are going to want a looser DTD use xhtml 1.0 transitional, or even possibly html 4.01 transitional would be preferable to that.

Ed Seedhouse

Posting Guidelines

Watch out! I am carrying irony, sarcasm and satire, and know how to use them.

IronWill
Offline
newbie
Last seen: 13 years 27 weeks ago
Joined: 2007-05-19
Posts: 9
Points: 0

But is xhtml 1.0 strict

But is xhtml 1.0 strict okay? That was what I began with recently, and my CSS menu pretty much won't work without it. I'm fine with fixing my legacy (ie, most of my pages) pages to conform to that. What I hate is when I keep running into these little "surprises" of things that used to or should work that have somehow been deprecated or abandoned or found to be buggy, etc. And one thing I absolutely want to stay away from, or minimize the greatest degree possible, is use of javascript, for various reasons. My preference actually is to learn C# and ASP and use those for most everything if I can. But I'm getting ahead of myself here...

Ed Seedhouse
Ed Seedhouse's picture
Offline
Guru
Victoria British Columbia
Last seen: 48 weeks 4 days ago
Victoria British Columbia
Timezone: GMT-8
Joined: 2005-12-14
Posts: 3570
Points: 675

IronWill wrote:But is xhtml

IronWill wrote:
But is xhtml 1.0 strict okay? That was what I began with recently, and my CSS menu pretty much won't work without it. I'm fine with fixing my legacy (ie, most of my pages) pages to conform to that. What I hate is when I keep running into these little "surprises" of things that used to or should work that have somehow been deprecated or abandoned or found to be buggy, etc. And one thing I absolutely want to stay away from, or minimize the greatest degree possible, is use of javascript, for various reasons. My preference actually is to learn C# and ASP and use those for most everything if I can. But I'm getting ahead of myself here...

Well I don't want you to think I'm a dictator here or a guru either. It sounds like xhtml 1.0 strict is justified and indeed preferable as you're willing to do the work to make it validate.

Personally I now prefer html 4.01 strict, but really either is fine so far as practicalities are concerned.

Ed Seedhouse

Posting Guidelines

Watch out! I am carrying irony, sarcasm and satire, and know how to use them.

IronWill
Offline
newbie
Last seen: 13 years 27 weeks ago
Joined: 2007-05-19
Posts: 9
Points: 0

Success!

I just got my page to validate. yay!

Now I just have 100+ other pages to apply the new template to. Sad

heh If I ever get the time.

bdonohoe (not verified)
Anonymous's picture
Guru

Same problem here. No solution?

I recently noticed the same problem in a few of my web pages. At first I just thought Firefox had scroll wheel issues and was just unresponsive, but then I realized it was only when the mouse was over certain parts of the page... the position:fixed parts, of course.

So I built a simple test case. It's nothing but two divs: one fixed, one tall, forcing the page to show a scrollbar. It validates as HTML 4.01 strict. If the mouse is anywhere in the page *except* over the position:fixed div, the mouse-wheel scrolls the page. If the mouse is over the position:fixed div, the mouse-wheel does nothing.

I believe this is a bug in Firefox. It's fixed in Firefox 3 (Gran Paradiso), but has anyone found a work-around in the meantime?

Here's the code from my test page:


untitled


Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Any ideas would be most appreciated.

Cheers,
Brendan

Ed Seedhouse
Ed Seedhouse's picture
Offline
Guru
Victoria British Columbia
Last seen: 48 weeks 4 days ago
Victoria British Columbia
Timezone: GMT-8
Joined: 2005-12-14
Posts: 3570
Points: 675

Please don't hijack other

Please don't hijack other folk's threads. Start your own if you want help.

Firefox follows the standards correctly regarding position:fixed and most other things. IE7 is still distinctly less standards compliant than FF, so if I had to be I'd bet on it being IE7 that's doing it wrong, no matter how "right" you may think it is.

Anyway, start your own thread please. Also if you want fast effective help post a link to the site the exhibits the problem.

Ed Seedhouse

Posting Guidelines

Watch out! I am carrying irony, sarcasm and satire, and know how to use them.

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 22 hours 43 min ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9774
Points: 3856

To my knowledge, the

To my knowledge, the scrolling mechanism is not a part of the specs, and is left to the UA vendor. For example, Lynx does not scroll at all; it pages. I could see that the Gecko programmers might have said to themselves, "selves, since fixed elements don't scroll, maybe the wheel shouldn't work when over a fixed element". If that's changed in FF3, well, they changed their minds.

Of course, I've never bothered to configure the wheel on my Linux box, and forget about it on the Winbox—it's not an issue with me. Smile

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.