472,958 Members | 1,627 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 software developers and data experts.

vertical scrollbar showing when contents do not exceed bounds

I am using a div tag to make an element that contains some text. I
have specified overflow: auto; in my stylesheet. If I use
font-size/line-height to specify the font information I get a vertical
scrollbar in firefox/netscape (not IE) , even though the text I have
in the element does not exceed the bounds. The simple example below
casues this behaviour. How do I fix this?

<div style="overflow:auto; height:100px; width:100px; border:1px
#000000 solid; font:10px/10px Times;">
overflow set to auto.
overflow set to auto.
</div>

The text clearly is within the box, and yet the scrollbar is there.
Any help appreciated.

Rob
Jul 24 '05 #1
4 13510
Rob T. wrote:
I am using a div tag to make an element that contains some text. I
have specified overflow: auto; in my stylesheet. If I use
font-size/line-height to specify the font information I get a vertical
scrollbar in firefox/netscape (not IE) , even though the text I have
in the element does not exceed the bounds. The simple example below
casues this behaviour. How do I fix this?

<div style="overflow:auto; height:100px; width:100px; border:1px
#000000 solid; font:10px/10px Times;">
overflow set to auto.
overflow set to auto.
</div>

The text clearly is within the box, and yet the scrollbar is there.
Any help appreciated.

Rob


Google (and Peter-Paul Koch!) is your friend:

<URL:http://www.quirksmode.org/bugreports/archives/2005/04/When_an_li_element_is_set_to_overflow_auto_Firefox .html>
--
Rob
Jul 24 '05 #2
On Thu, 19 May 2005 06:42:49 GMT, RobG <rg***@iinet.net.auau> wrote:
Rob T. wrote:
I am using a div tag to make an element that contains some text. I
have specified overflow: auto; in my stylesheet. If I use
font-size/line-height to specify the font information I get a vertical
scrollbar in firefox/netscape (not IE) , even though the text I have
in the element does not exceed the bounds. The simple example below
casues this behaviour. How do I fix this?

<div style="overflow:auto; height:100px; width:100px; border:1px
#000000 solid; font:10px/10px Times;">
overflow set to auto.
overflow set to auto.
</div>

The text clearly is within the box, and yet the scrollbar is there.
Any help appreciated.

Rob


Google (and Peter-Paul Koch!) is your friend:

<URL:http://www.quirksmode.org/bugreports/archives/2005/04/When_an_li_element_is_set_to_overflow_auto_Firefox .html>


Thanks for taking a look. It seems like this person is having a
different problem though. I'm seeing a vertical not horizontal
scrollbar and I'm using div tags. If the font-size is specified
without the line-height the vertical scrollbar goes away. I tried
adding the font information to p in the stylesheet instead of my text
div tag but I get the same results. IE has no problems with this.

Rob
Jul 24 '05 #3
"Rob T." wrote:

I am using a div tag to make an element that contains some text. I
have specified overflow: auto; in my stylesheet. If I use
font-size/line-height to specify the font information I get a vertical
scrollbar in firefox/netscape (not IE) , even though the text I have
in the element does not exceed the bounds. The simple example below
casues this behaviour. How do I fix this?

<div style="overflow:auto; height:100px; width:100px; border:1px
#000000 solid; font:10px/10px Times;">
overflow set to auto.
overflow set to auto.
</div>

The text clearly is within the box, and yet the scrollbar is there.
Any help appreciated.

Rob


In the CSS2.1 specification, see 11.1.1 "Overflow: the 'overflow'
property":

"auto
This value indicates that the content is clipped and that if the
user agent uses a scrolling mechanism that is VISIBLE ON THE SCREEN
(such as a scroll bar or a panner), that mechanism should be
displayed for a box whether or not any of its content is clipped.
This avoids any problem with scrollbars appearing and disappearing
in a dynamic environment. When this value is specified and the
target medium is 'print', overflowing content may be printed."
[emphasis added]

Thus, the lack of a scrollbar in IE is an error. Firefox and
Netscape (both clones of Mozilla) are correct.

--

David E. Ross
<URL:http://www.rossde.com/>

I use Mozilla as my Web browser because I want a browser that
complies with Web standards. See <URL:http://www.mozilla.org/>.
Jul 24 '05 #4
DU
Rob T. wrote:
On Thu, 19 May 2005 06:42:49 GMT, RobG <rg***@iinet.net.auau> wrote:

Rob T. wrote:
I am using a div tag to make an element that contains some text. I
have specified overflow: auto; in my stylesheet. If I use
font-size/line-height to specify the font information I get a vertical
scrollbar in firefox/netscape (not IE) , even though the text I have
in the element does not exceed the bounds. The simple example below
casues this behaviour. How do I fix this?

<div style="overflow:auto; height:100px; width:100px; border:1px
#000000 solid; font:10px/10px Times;">
overflow set to auto.
overflow set to auto.
</div>

The text clearly is within the box, and yet the scrollbar is there.
Any help appreciated.

Rob


Google (and Peter-Paul Koch!) is your friend:

<URL:http://www.quirksmode.org/bugreports/archives/2005/04/When_an_li_element_is_set_to_overflow_auto_Firefox .html>

Thanks for taking a look. It seems like this person is having a
different problem though. I'm seeing a vertical not horizontal
scrollbar and I'm using div tags. If the font-size is specified
without the line-height the vertical scrollbar goes away.


The default value for line-height in Mozilla-based browsers is 1.2. So
your content should fit without causing an overflow into a line box 20%
longer.

My recommendation is to never play with line-height values unless you
know well what you're doing.

DU
--
The site said to use Internet Explorer 5 or better... so I switched to
Firefox 1.0.4 :)
Jul 24 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Z | last post by:
Hi, I have problem with auto-scrolling frames in IE (6.0 on Xp, but same happens with IE 5.5 on Win2k): If I set scrolling="auto" to frame, IE reserves space where vertical scrollbar normally...
7
by: Barbara de Zoete | last post by:
On one of my pages http://home.wanadoo.nl/b.de.zoete/html/tekeningen.html I have a div containing thumbnails (who ever came up with that word?) to select a larger view of a picture. The div is...
2
by: Nathan Wallace | last post by:
When in quirks mode, IE seems to be able to display pages without any vertical scrollbar: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <style> body {...
3
by: buht | last post by:
Hello Everyone, Fairly new to c# here and have a question regarding scrollbars, particularly a vertical scrollbar. It looks like my options are restricted for the textbox scrollbars being...
1
by: scott8000 | last post by:
hi all Access 2K/2003, Win XP Pro I need to be able to detect when a subform datasheet is currently displaying a vertical scrollbar. I.e if the subform datasheet is showing more records...
1
by: Tom | last post by:
First, I posted a similar request for help in another group and now don't find the posting. Problem with my newsreader perhaps ... but apologies if this appears as a cross posting. My code is...
1
by: webdev1 | last post by:
Hi, I have set scrolling="auto" in my iframe, so when the height of iframe(Content) is more than the allocated height, vertical scrollbar appears.....Works perfect in Firefox, but when it comes...
10
by: quddusaliquddus | last post by:
I am running this: http://www.dynamicdrive.com/dynamicindex3/scrolltop.htm It works fine except the vertical scrollbar disappears when the image is clicked. What should I do?
0
by: yatinbvn | last post by:
hi , my name is yatin i have creating swt text with vertical scroll bar in shell, my question is: vertical scroll bar thumb is still visible in swt text when its size is not increase , i want...
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.