6 replies [Last post]
subversive_element
Offline
newbie
Last seen: 10 years 38 weeks ago
Timezone: GMT+1
Joined: 2008-06-18
Posts: 4
Points: 0

Hi all,

I've been looking for a fix for days, but I can't find a substitute for overflow-y: hidden; that would work in Opera. Does it exist? My code is really simple:

<style type="text/css">
html {
overflow-y: hidden;
}
</style>

I would definitely appreciate any help. I just don't want the vertical scrollbar to appear at all. How would you do this with Opera?

Many thanks

S_E

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 37 weeks 1 day ago
Joined: 2004-06-30
Posts: 9668
Points: 801

Why don't you want it to

Why don't you want it to appear?

Verschwindende wrote:
  • CSS doesn't make pies

subversive_element
Offline
newbie
Last seen: 10 years 38 weeks ago
Timezone: GMT+1
Joined: 2008-06-18
Posts: 4
Points: 0

What I gave you is a simple

What I gave you is a simple example of what I want to achieve. Basically, any kind of overflow seems to mess up with Opera. This is the site I'm working on : http://www.musique-chroniques.ch/

I have a container with a scrollbar. I only want the container to scroll, not the browser scrollbar. Hence:

<div class="main2">
    <div class="body">The content of the container
    </div>
   </div>

Where:

.main2 {
margin-left:0px;
position: absolute;
background-image: url(img/new_design.jpg);
background-repeat: no-repeat;
width: 100%;
height: 100%;
}
.body {
position: absolute;
width:825px;
height: 393 px;
margin-top: 165px;
margin-left: 159px;
overflow-x: hidden;
overflow-y: scroll;
background-color:FFFFFF;
}

In Opera, the content within the .body element breaks out of its bounds, and scrolls with the navigation scrollbar. Ugly.

I've looked everywhere for a fix but no luck. I thought there was a simple solution but obviously not :shrug: Any ideas would be greatly appreciated.

MikePixel
MikePixel's picture
Offline
Enthusiast
Everett, WA
Last seen: 6 years 24 weeks ago
Everett, WA
Timezone: GMT-7
Joined: 2008-06-20
Posts: 91
Points: 8

Checked IE, FF, and Opera

I checked your site with IE7, Firefox 3, and Opera, and they all look exactly the same. Well except Opera gives your scrollbar a interesting teal color.

They all have the scrollbar to scroll vertically.

I also noticed that your height for the .body was being overwritten by script at the beginning of the index.php page.

if (screen.height == 720)
document.write("<style>.body{width:825px;height:68%;}</style>"); 
if (screen.height == 768)
document.write("<style>.body{width:825px;height:69%;}</style>"); 
if (screen.height == 800)
document.write("<style>.body{width:825px;height:70%;}</style>"); 
if (screen.height == 864)
document.write("<style>.body{width:825px;height:71%;}</style>"); 
if (screen.height == 900)
document.write("<style>.body{width:825px;height:73%;}</style>"); 
if (screen.height == 960)
document.write("<style>.body{width:825px;height:74%;}</style>");
if (screen.height == 1024)
document.write("<style>.body{width:825px;height:76%;}</style>"); 
if (screen.height == 1050)
document.write("<style>.body{width:825px;height:76%;}</style>"); 
if (screen.height == 1200)
document.write("<style>.body{width:825px;height:78%;}</style>"); 
if (screen.width == 800)
document.write("<style>.body{width:60%;height:230px;}</style>");

I am not sure if you added that after you posted to make things work.

subversive_element
Offline
newbie
Last seen: 10 years 38 weeks ago
Timezone: GMT+1
Joined: 2008-06-18
Posts: 4
Points: 0

Hi Mike,

Hi Mike,

Thanks for checking out my site.

Actually, with Opera 9.x it doesn't work, here's a screenshot (scrollbar missing):

I'm surprised to hear it's working on your end!

The javascript you posted is unrelated, it's actually a (clumsy) way to stretch the vertical space according to the height of the user's screen. It simply overwrites some of .body's properties.

EDIT: I realize my first post may have sounded confusing. I meant to say the inner scrollbar SHOULD have appeared, versus the browser scrollbar. Sorry about that.

What I meant is I can either have the browser's scrollbar or no scrollbar at all when I manipulate the overflow elements.

MikePixel
MikePixel's picture
Offline
Enthusiast
Everett, WA
Last seen: 6 years 24 weeks ago
Everett, WA
Timezone: GMT-7
Joined: 2008-06-20
Posts: 91
Points: 8

Hmmm I am using Opera 9.5

Hmmm I am using Opera 9.5 and I have a scroll bar.

I just downloaded the newest Opera this week. I wonder if it has to do with all the other browsers installed on my computer. Is Opera getting some settings from one of them? Not sure. All in all the site looks great in my Opera.

Sorry I haven't been much help. I also can NOT get the screenshot to display in this reply, so I will attach it.

AttachmentSize
css_creator_01.jpg 22.67 KB
subversive_element
Offline
newbie
Last seen: 10 years 38 weeks ago
Timezone: GMT+1
Joined: 2008-06-18
Posts: 4
Points: 0

Well it seems Opera fixed

Well it seems Opera fixed this bug starting v. 9.5. I had Opera 9.2.xx.

Au contraire, you've been of much help! Thank you Cool