tags:

views:

86

answers:

1

Hello,

I have a single div element in a page styled as follow:

div {position: absolute; width: 340px; height: 480px; overflow-y:scroll}

I use a simple jquery script to center it in the available width and height on window.resize event.

The div is displayed and works perfectly on Safari 5 for Mac.

On Safari 5 for Windows it works perfectly (i can scroll the content using the mouse wheel) but the vertical scrollbar is not rendered.

Any idea? Thanks in advance.

+1  A: 

There's no need to use jquery to center, just use the following:

div {
    position: absolute; 
    width: 340px; 
    height: 480px; 
    overflow-y: scroll; 

    top: 50%;
    left: 50%; 
    margin-top: -240px; 
    margin-left: -170px;
}

Maybe the scrollbar is not rendered because it's disabled (there's no more content), otherwise try with overflow-y:auto

cesarnicola
I'll try...there's always enough content to have a scroll...tnx
compriots
Still no scrollbar...that's crazy
compriots
Umm... crazy :/ I'll try it at home
cesarnicola