|
Posted by DU on May 30, 2005, 5:19 am
Please log in for more thread options
Rob T. 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 :)
|