rhishi20 Posted December 13, 2013 Share Posted December 13, 2013 i am currently working on asp.net project and I want to hide vertical and horizontal scrollbar on body but i can't use overflow:hidden or any other overflow value. please suggest me any other method which hides scrollbars. Link to comment Share on other sites More sharing options...
Ingolme Posted December 13, 2013 Share Posted December 13, 2013 Overflow: hidden is the way it's done. The only other way to prevent scroll bars is to make sure your content isn't too long. Why isn't the overflow property an option? There are many ways to do it: In the stylesheet: body { overflow: hidden; } In the HTML document: <style type="text/css">body { overflow: hidden; }</style> On the element itself: <body style="overflow: hidden;"> Using Javascript: <script>document.body.style.overflow = "hidden";</script> Link to comment Share on other sites More sharing options...
rhishi20 Posted December 13, 2013 Author Share Posted December 13, 2013 (edited) basically my problem is after running my project, at right side there is Blurred vertical scrollbar after doing overflow:hidden on body. this problem arises in IE only and because of that my datagrid alignment is disturbing. and that's why i am searching for alternative method for overflow property. in all other browsers it's working excellent but IE created problems. and there is no chance of reducing size of content. Edited December 13, 2013 by rhishi20 Link to comment Share on other sites More sharing options...
Ingolme Posted December 13, 2013 Share Posted December 13, 2013 How does Internet Explorer's bar interfere? If your page is fluid a tiny bit less space on the side wouldn't change much. Maybe a screenshot or an onlin example could help explain the problem. Link to comment Share on other sites More sharing options...
rhishi20 Posted December 14, 2013 Author Share Posted December 14, 2013 (edited) http://www.imapg.com/vtrial/myimg/problemIE.bmp this is where i have put screenshot of website where you can see at right side blurred vertical scrollbar. and now i have found another interesting thing i thought that blur vertical scrollbar came because of i have done overflow:hidden on body but this is not a case. see following link on which my login page also came with blurred vertical scrollbar. http://www.imapg.com/vtrial/myimg/loginpageIE.bmp and now see my Firefox login page on following link http://www.imapg.com/vtrial/myimg/loginpagefirefox.bmp here you can see no vertical scrollbar. also see website's perfect view as i wanted done in Firefox below http://www.imapg.com/vtrial/myimg/perfectfirefox.bmp Edited December 14, 2013 by rhishi20 Link to comment Share on other sites More sharing options...
Ingolme Posted December 14, 2013 Share Posted December 14, 2013 I don't see how the scrollbar is interfering with anything. Link to comment Share on other sites More sharing options...
rhishi20 Posted December 14, 2013 Author Share Posted December 14, 2013 (edited) have you seen my all 4 images ? if you compare 1st & 4th image you can see alignment of gridview header and Gridview not matching with each other in 1st image. and now consider that vertical scrollbar is not present there. you can imagine gridview header and gridview will perfectly match with each other. you can see 4th image that vertical scrollbar is not present on body, it is on div in which gridview is present. and alignment of Gridview and Gridview Header perfectly match with each other. just consider i want to just delete that blurred vertical scrollbar which is coming in only IE with every single page (loginpage, assemblypage)which is appearing without any coding Edited December 14, 2013 by rhishi20 Link to comment Share on other sites More sharing options...
davej Posted December 14, 2013 Share Posted December 14, 2013 Your content is not taller than the window? Link to comment Share on other sites More sharing options...
rhishi20 Posted December 14, 2013 Author Share Posted December 14, 2013 (edited) if you are asking about my gridview content, that's not the issue i have just keep div's height less that's why lesser content showing. if i increase size of div it will be full of page. I also thought that may be because of extra height of background image, vertical scrollbar is coming. so i have removed background image from login page but strange thing is vertical scrollbar is still showing on login page. Edited December 14, 2013 by rhishi20 Link to comment Share on other sites More sharing options...
dsonesuk Posted December 14, 2013 Share Posted December 14, 2013 This only issue with IE7 and below isn't it? four options 1) use IE browser above version 7 2) seriously, use a IE browser above version 7 3) make the scrollbar appear on all browsers 4) or try something like <!--[if lte IE 7]> <style type="text/css">html, body{min-height:100%;margin:0px;padding:0px;overflow:hidden;} html:hover,body:hover {overflow:auto;} </style><![endif]--> Link to comment Share on other sites More sharing options...
rhishi20 Posted December 16, 2013 Author Share Posted December 16, 2013 It works for me thanks a lot. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now