Forum Moderators: open
I see that there are horizontal scrolling issues with CSS, but I haven't seen anything on vertical. I am using CSS and divs, all divs are using absolute positioning. I'd really appriciate any tips that could help me to identify and correct this issue. I believe that this page will exibit the behavior:
<sorry, no personal URLs>
Thanks in advance for the assistance.
- Mac
[edited by: tedster at 5:31 am (utc) on Nov. 2, 2003]
I use absolution positioning on divs, and also have a page layout function that's invoked with onLoad and onResize events for the body element. One thing I plan to change is that my main div element has the height set explicitly to 464px. I don't use the overflow attribute.
Again, if anyone has heard or seen this problem of pages scrolling back to the top automatically on IE 5.1 with Mac OS X. Please let me know. Thanks,
Mac
...page layout function that's invoked with onLoad and onResize events for the body element
I'd take a close look at that -- and I hope you can have the browser and OS at hand for debug testing. Sometimes it takes quite a few changes just to isolate the offending element in the code. That's hard to do if you don't have the software right there - can takes weeks.
Another issue may be using abolute positioning - especially if you have any nested divs. If you can achieve at least most of your layout objectives using a normal document flow -- that is, without asking the browser to remove divs from the normal flow through position:absolute; -- I've found you often get better cross-browser compatibility.
And while I'm at it - I neglected to ask about the obvious, first thing to check. Does this HTML and CSS validate?
Haven't fixed the prob yet, but there are a number of validation issues. At one point all pages validated, but it seems that over the life of my site some incorrect doctype tags have gotten into my templates.
I'm trying to validate XHTML markup against an HTML doctype tag - doesn't work very well. :{
Anyway, Looks like I got my work cut out for quite a while. I'll get this back in shape and post again if there's still a problem.
- Mac
1) removed the height tag from the overflowing div element. I suspect that scrolling below the "bottom" of the div (as defined by top + height) might have caused the page to scroll up.
2) I set the overflow element to "auto". (Previously I didn't set the overflow element at all.