I'm asking for help because I did some testing today with div scrollbars using CSS, and something very strange happened.
The reason I was doing the test was the div scrollbar for my staff page wasn't working in IE7, but that's not the topic of this discussion (not the main one)
I made two divs in the test: an outer div and an inner div. No matter what I tried, in any browser I tried, I couldn't get the scrollbar to work in the test. I sat there, trying to come up with some possible solution as to what I was doing wrong, when a strange thought occurred to me. I was trying to add a scrollbar to the INNER div. For experimentation purposes, I removed the scrollbar styling from the inner div and instead tried it on the outer div. It worked in BOTH IE7 and FF. For some reason, it wouldn't work on the inner div, but it would work on the outer div.
Now, here's where the weirdness occurs. The scrollbar for the div on my staff page doesn't work in IE7, and the page is set up with an outer div and an inner div. The inner div scrollbar on my staff page WORKS in everything but IE7, yet when I was testing on my test page, the scrollbar wouldn't work at all except on the outer div.
People, what's going on:confused:
gomisute
02-22-2008, 01:33 AM
Sorry...what?
:confused:
Read your own post...it's hard to follow...
post some code and may be we'll get it and help you.
coothead
02-22-2008, 06:13 AM
Hi there Joseph Witchard,
I assumed, as I read your post, that you had just stubbed out your spliff. ;)
So before igniting my hubble bubble I knocked up this code for you...
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<div id="inner">
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras volutpat, purus ac pellentesque
adipiscing, mauris ligula convallis metus, vitae scelerisque nibh orci quis mi. *** sociis natoque
penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur porttitor aliquam
libero. Quisque molestie ornare sem. Nam euismod sem lacinia ipsum. In pharetra metus ut dolor
cursus aliquam. Maecenas eu ante quis enim tincidunt laoreet. Pellentesque varius nunc in ipsum
pulvinar sollicitudin. Nunc et mi. Donec auctor dignissim orci. Aliquam sed magna. Pellentesque
in dui. In eget elit. Praesent eu lorem.
</p><p>
Cras cursus varius pede. Cras dolor lorem, convallis sed, venenatis ac, aliquam vitae, orci.
Duis diam massa, adipiscing quis, aliquam eget, ornare eu, lectus. Sed rutrum augue non purus.
Integer vel mauris. Nam suscipit molestie lectus. Fusce laoreet interdum eros. Pellentesque sit
amet enim id nunc adipiscing ultricies. Quisque lobortis eleifend elit. Sed eu augue sed felis
vulputate iaculis. Cras lorem felis, lobortis id, accumsan vel, facilisis quis, dolor. Curabitur
aliquet. Nulla facilisi. Proin nunc velit, posuere sit amet, porttitor et, volutpat a, massa.
Maecenas elementum volutpat justo. Pellentesque magna neque, dictum id, rhoncus a, fringilla et,
nulla. Phasellus placerat gravida purus. Pellentesque odio. Sed volutpat vehicula nulla. Quisque
metus urna, semper eget, aliquam ac, feugiat nec, massa.
</p><p>
</div>
</div>
</body>
</html>
:cool:
coothead
Joseph Witchard
02-22-2008, 04:21 PM
Hi there Joseph Witchard,
I assumed, as I read your post, that you had just stubbed out your spliff. ;)
So before igniting my hubble bubble I knocked up this code for you...
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<div id="inner">
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras volutpat, purus ac pellentesque
adipiscing, mauris ligula convallis metus, vitae scelerisque nibh orci quis mi. *** sociis natoque
penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur porttitor aliquam
libero. Quisque molestie ornare sem. Nam euismod sem lacinia ipsum. In pharetra metus ut dolor
cursus aliquam. Maecenas eu ante quis enim tincidunt laoreet. Pellentesque varius nunc in ipsum
pulvinar sollicitudin. Nunc et mi. Donec auctor dignissim orci. Aliquam sed magna. Pellentesque
in dui. In eget elit. Praesent eu lorem.
</p><p>
Cras cursus varius pede. Cras dolor lorem, convallis sed, venenatis ac, aliquam vitae, orci.
Duis diam massa, adipiscing quis, aliquam eget, ornare eu, lectus. Sed rutrum augue non purus.
Integer vel mauris. Nam suscipit molestie lectus. Fusce laoreet interdum eros. Pellentesque sit
amet enim id nunc adipiscing ultricies. Quisque lobortis eleifend elit. Sed eu augue sed felis
vulputate iaculis. Cras lorem felis, lobortis id, accumsan vel, facilisis quis, dolor. Curabitur
aliquet. Nulla facilisi. Proin nunc velit, posuere sit amet, porttitor et, volutpat a, massa.
Maecenas elementum volutpat justo. Pellentesque magna neque, dictum id, rhoncus a, fringilla et,
nulla. Phasellus placerat gravida purus. Pellentesque odio. Sed volutpat vehicula nulla. Quisque
metus urna, semper eget, aliquam ac, feugiat nec, massa.
</p><p>
</div>
</div>
</body>
</html>
:cool:
coothead
The problem with that is I don't need the outer div to have a scrollbar:(
gomisute, what I'm basically saying is this: on two different pages, I have two divs (two on each page), like this:
On one of my pages, I can't get a scrollbar to work for the inner div; I can only get it to work for the outer div. However, on another page, the scrollbar for the inner div works just fine. Both pages are set up exactly the same.
coothead
02-22-2008, 04:59 PM
Hi there Joseph Witchard,
Post a link to the site rather than a snip or meaningless code. ;)
How on earth to you expect us look at...
<div id="outerDiv">
<div id="innerDiv">
content...
</div>
</div>
...and be able to make constructive comment on scrollbars or their absence. ;)
Alternatively you could try this code....
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<div id="inner">
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras volutpat, purus ac pellentesque
adipiscing, mauris ligula convallis metus, vitae scelerisque nibh orci quis mi. *** sociis natoque
penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur porttitor aliquam
libero. Quisque molestie ornare sem. Nam euismod sem lacinia ipsum. In pharetra metus ut dolor
cursus aliquam. Maecenas eu ante quis enim tincidunt laoreet. Pellentesque varius nunc in ipsum
pulvinar sollicitudin. Nunc et mi. Donec auctor dignissim orci. Aliquam sed magna. Pellentesque
in dui. In eget elit. Praesent eu lorem.
</p><p>
Cras cursus varius pede. Cras dolor lorem, convallis sed, venenatis ac, aliquam vitae, orci.
Duis diam massa, adipiscing quis, aliquam eget, ornare eu, lectus. Sed rutrum augue non purus.
Integer vel mauris. Nam suscipit molestie lectus. Fusce laoreet interdum eros. Pellentesque sit
amet enim id nunc adipiscing ultricies. Quisque lobortis eleifend elit. Sed eu augue sed felis
vulputate iaculis. Cras lorem felis, lobortis id, accumsan vel, facilisis quis, dolor. Curabitur
aliquet. Nulla facilisi. Proin nunc velit, posuere sit amet, porttitor et, volutpat a, massa.
Maecenas elementum volutpat justo. Pellentesque magna neque, dictum id, rhoncus a, fringilla et,
nulla. Phasellus placerat gravida purus. Pellentesque odio. Sed volutpat vehicula nulla. Quisque
metus urna, semper eget, aliquam ac, feugiat nec, massa.
</p><p>
</div>
The top link is the page where the scrollbar doesn't render in the inner div. The bottom link will take you to the page where the scrollbar on the inner div works just fine.
Centauri
02-23-2008, 01:08 AM
On the first link, the content of the inner #test div is not high enough to invoke the scrollbars, but the extra <br>s, div and ad content that comes after the inner div is high enough to invoke the scrollbars on the outer #center div. If there is more content within #test, then it will have scrollbars.
How on earth do you expect any of this to render similar crossbrowser without a valid doctype and encodng specified?
Joseph Witchard
02-23-2008, 12:56 PM
On the first link, the content of the inner #test div is not high enough to invoke the scrollbars, but the extra <br>s, div and ad content that comes after the inner div is high enough to invoke the scrollbars on the outer #center div. If there is more content within #test, then it will have scrollbars.
How on earth do you expect any of this to render similar crossbrowser without a valid doctype and encodng specified?
I use the non-standard scrolling marquee tag on my site. Up until a few days ago, I didn't know you could use non-standard HTML with a doctype and still have it work. I just haven't gotten a chance yet to add a doctype to all of my pages;)
webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved.