Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi !
I use this code to get rid of unwanted scrollbar in Internet Explorer:
http://www.familleboutet.com/code.txt
(it's on a link because because it would not appear correctly on the computing.net message)
But, of course, it doesn't work in Firefox, is there an equivalent and simple code that i could use for Firefox ?
Thank you.

overflow-x and overflow-y are not part of the CSS standard. I'm assuming MS implemented them to allows control for horizontal vs. vertical.
The correct way to remove scrollbars is as follows:
overflow: hidden;
More info here: http://www.w3schools.com/css/pr_pos_overflow.asp
Michael J

Thanks but, i tried it using examples on the w3schools website you provide and this time it doesn't work at all even for IE.

I just tested it in IE and FF and it works perfectly. Must be something wrong in your implementation.
Try creating a new page with the code below. Resize the page so the conent "disappears" and you should not see scroll bars.
<html>
<head>
<style type="text/css"></style>
</head>
<body>
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
</body>
</html>Michael J

I agree with michael, overflow: hidden; will hde IE's scrollbars also... but the -x and -y value is proprietary to IE.
I just want to add, in case you need to have separate things for IE, you can do this
<!--[if IE]>
-- code here --
<![endif]-->before the head tag...
everything -- code here --- will only be read by IE, you can add link to css files, javascripts, or even hardcode any css/javascript in it.

Ok Michael, yes, my implementation was not right so i corrected it, i use your example (which does not appear completely in your message due to restriction in this forum) and made this: http://www.familleboutet.com/scrollbar.htm
As you can see, it works perfectly in IE but not at all in Firefox.

btw,
IE forgives many coding error. You missed a semi-colon after the attribute value.
---
CSS:
tag/id/class/etc {
property: value;
property: value1 value2;}
---
Fubar

You mean that all this time i was using this code, i miss a semi-colon....grrrrrr
Thank you very much, i just saved your code since it worked like a charm.
i still have a lot to learn :-p

Actually it looks liek an extra semi-colon to me. I was looking at the code on your example page before I read these last two posts and saw that myself.
Unfortunately the one part of my example code above that would have prevented this was consumed by the forum. Doh!
Michael J

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |