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

Unwanted scrollbar in Firefox

Reply to Message Icon

Original Message
Name: Zenno
Date: August 31, 2006 at 07:56:28 Pacific
Subject: Unwanted scrollbar in Firefox
OS: Windows XP SP2
CPU/Ram: P4 3.0 Ghz / 1 Meg DDR
Model/Manufacturer: 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.


Report Offensive Message For Removal


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

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


Report Offensive Follow Up For Removal

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

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.


Report Offensive Follow Up For Removal

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

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


Report Offensive Follow Up For Removal

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

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.

---


Report Offensive Follow Up For Removal

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

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.


Report Offensive Follow Up For Removal


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

Try doing it in the html property :-D Test

---
Fubar


Report Offensive Follow Up For Removal

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

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


Report Offensive Follow Up For Removal

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

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



Report Offensive Follow Up For Removal

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

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


Report Offensive Follow Up For Removal






Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Unwanted scrollbar in Firefox

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 5 Days.
Discuss in The Lounge