Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FIREFOX, Opera CSS DIV no scroll

Status
Not open for further replies.

sciencer

Technical User
Jan 7, 2004
17
NL
Hi all

I've got a webiste that contains several div's.

One of my div's may scroll. This works in IE.

But in Firefox and Oprea i can only scroll by useing the scrollbar.

I've created a CSS what contains

body{
width: 100%;
height: 100%;
overflow: hidden;
}

#menu {
overflow: hidden;
position: absolute;
z-index: 1;
width: 134px;
height: 100%;
}

#top{
overflow: hidden;
position: absolute;
z-index: 3;
width: 100%;
height: 92px;
}

#content
{
position: absolute;
z-index: 2;
left: 180px;
top: 110px;
width: 82%;
height: 80%;
overflow: auto;
}

Can anyone tell me what i'm doing wrong?
 
I don't understand. If you can scroll with the scrollbar, what seems to be the problem?
 
I can't scroll with a scrollwheel or universal scroll in Firefox and opera. This works fine in IE.


 
I think the problem comes because you have choosen to hide anything(overfow) on the body element. This being the parent element influences most of its children i.e you would have to set overflow to auto,scrollX,scrollY for the individual child elements.

do u get what im im saying?

---------------------------
WORD OR VOTE TO THE WISE IS ENUFF...;)
 
If you want to have your DIVs scrollable cross-browser, use:

Code:
yourDivSelector {
   overflow: scroll;
}

You should make sure you have set a width / height, too.

Hope this helps,
Dan


[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
BillyRayPreachersSon

Do you mean the i've to write in my css
body{
width: 100%;
height: 100%;
overflow: hidden;
}

#menu {
overflow: hidden;
position: absolute;
z-index: 1;
width: 134px;
height: 100%;
}

#top{
overflow: hidden;
position: absolute;
z-index: 3;
width: 100%;
height: 92px;
}

#content
{
position: absolute;
z-index: 2;
left: 180px;
top: 110px;
width: 82%;
height: 80%;
overflow: scroll;
}
 
If I do that it still doesn't work.

And I get a hor. scrollbar.

The only way i can scroll in Firefox and oprea is wtih the scrollbar.

 
FF does not support scrolling in overflowing divs with the scrollwheel as Chris pointed out. One has to use the supplied scrollbars.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top