Computing.Net > Forums > Web Development > Unwanted scrollbar in Firefox

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Unwanted scrollbar in Firefox

Reply to Message Icon

Name: Zenno
Date: August 31, 2006 at 07:56:28 Pacific
OS: Windows XP SP2
CPU/Ram: P4 3.0 Ghz / 1 Meg DDR
Product: Abit
Comment:

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.



Sponsored Link
Ads by Google

Response Number 1
Name: Michael J (by mjdamato)
Date: August 31, 2006 at 08:27:03 Pacific
Reply:

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


0

Response Number 2
Name: Zenno
Date: August 31, 2006 at 08:41:18 Pacific
Reply:

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.


0

Response Number 3
Name: Michael J (by mjdamato)
Date: August 31, 2006 at 10:29:25 Pacific
Reply:

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


0

Response Number 4
Name: Laler
Date: August 31, 2006 at 18:05:41 Pacific
Reply:

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.

---


0

Response Number 5
Name: Zenno
Date: September 1, 2006 at 03:48:53 Pacific
Reply:

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.


0

Related Posts

See More



Response Number 6
Name: Laler
Date: September 1, 2006 at 05:33:39 Pacific
Reply:

Try doing it in the html property :-D Test

---
Fubar


0

Response Number 7
Name: Laler
Date: September 1, 2006 at 05:37:49 Pacific
Reply:

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


0

Response Number 8
Name: Zenno
Date: September 1, 2006 at 05:56:01 Pacific
Reply:

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



0

Response Number 9
Name: Michael J (by mjdamato)
Date: September 1, 2006 at 07:35:38 Pacific
Reply:

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


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

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


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: Unwanted scrollbar in Firefox

horizontal scrollbar problem www.computing.net/answers/webdevel/horizontal-scrollbar-problem-/3250.html

Experts: Scrollbar behavior firefox www.computing.net/answers/webdevel/experts-scrollbar-behavior-firefox/3787.html

Blank Page in Firefox www.computing.net/answers/webdevel/blank-page-in-firefox/1984.html