Hi!
I'm having issues with css in FF and IE regarding overflow: auto and font-size.
If I have a div like this:
<div style="overflow : auto">
<span>ipsumlore ndictowhateveri psumlorendictow hateveripsumlor endictowhatevea sdasdripsumlore ndictowhatevera sdasdasdjasjdio asjiosdjasiojdo asjisdojiasojdo
</span>
</div>
I get a nice horizontal scrollbar in the div as expected.
However if I add a font-size declaration like:
<div style="overflow : auto">
<span style="font-size: 12px">
ipsumlorendicto whateveripsumlo rendictowhateve ripsumlorendict owhateveasdasdr ipsumlorendicto whateverasdasda sdjasjdioasjios djasiojdoasjisd ojiasojdo
</span>
</div>
It seems to revert to "overflow: hidden" behaviour (in FF - IE seems to add a horizontal scrollbar to the whole page). Further testing seems to indicate if the font is on the larger side, you might get a scrollbar, but smaller settings you lose it, so I'm thinking it might be some kind of browser issue with it miscalculating the width of the content inside the div.
Has anyone else encountered this, and figured out a way around it? Preferably not a JavaScript hack :)
Thanks a lot!
I'm having issues with css in FF and IE regarding overflow: auto and font-size.
If I have a div like this:
<div style="overflow : auto">
<span>ipsumlore ndictowhateveri psumlorendictow hateveripsumlor endictowhatevea sdasdripsumlore ndictowhatevera sdasdasdjasjdio asjiosdjasiojdo asjisdojiasojdo
</span>
</div>
I get a nice horizontal scrollbar in the div as expected.
However if I add a font-size declaration like:
<div style="overflow : auto">
<span style="font-size: 12px">
ipsumlorendicto whateveripsumlo rendictowhateve ripsumlorendict owhateveasdasdr ipsumlorendicto whateverasdasda sdjasjdioasjios djasiojdoasjisd ojiasojdo
</span>
</div>
It seems to revert to "overflow: hidden" behaviour (in FF - IE seems to add a horizontal scrollbar to the whole page). Further testing seems to indicate if the font is on the larger side, you might get a scrollbar, but smaller settings you lose it, so I'm thinking it might be some kind of browser issue with it miscalculating the width of the content inside the div.
Has anyone else encountered this, and figured out a way around it? Preferably not a JavaScript hack :)
Thanks a lot!
Comment