Solved

How to cover browser scroll bar with an overlay

Posted on 2011-03-10
7
578 Views
Last Modified: 2012-05-11

Hi Experts!

I would like to be able to cover the browser scroll bar when I use an overlay. It should work from IE6 +. How one can do this?

Thanks
0
Comment
Question by:dlcnet
  • 4
  • 3
7 Comments
 
LVL 7

Expert Comment

by:Gene_Cyp
ID: 35094029
Hmm, not fully sure what you are trying to achieve?

You have a page that has a VERTICAL scrollbar and you wish to hide that scrollbar using an overlay?
0
 

Author Comment

by:dlcnet
ID: 35094209
@Gene_Cyp:

yes
0
 
LVL 7

Expert Comment

by:Gene_Cyp
ID: 35094325
Is this scrollbar in an iframe or the actual main page?
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 

Author Comment

by:dlcnet
ID: 35094338
@Gene_Cyp:

is the actual page. I would like to block the browser view-port including scroll bars
0
 
LVL 7

Accepted Solution

by:
Gene_Cyp earned 500 total points
ID: 35094448
Add this to your CSS file:

html, body { overflow: hidden; }


Or if you are putting your CSS as a script text inside the html page:

<style type="text/css">
html, body { overflow:auto }
</style>

But you are aware that hiding your scrollbar means you'll be unable to view parts of the page, right?
0
 

Author Comment

by:dlcnet
ID: 35094497
@Gene_Cyp:

right. I would like to block the user when an ajax request needs to update a bigger part of the page. He will not be able to use the Y scroll-bar as long as the update takes place.  
0
 
LVL 7

Expert Comment

by:Gene_Cyp
ID: 35094597
OK, well, above is the code to hide the Scrollbar. Good luck. :)

(Just keep in mind whenever you design something that users have expectations)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question