View Full Version : CSS Problem with overflow and padding

Nov 7th, 2009, 05:48 PM

I have a problem with CSS overflow property used together with padding.

Testcase: http://gamca.informacie.sk/betatest/overflow/

This page has a container with overflow: auto and min-width. Inside are few <p> tags that have white-space: nowrap, left+right padding and center text align (These also trigger parent container scrollbar). Problem is that Firefox 3.5 and Chrome 3.0 don't extend container width enough and ignore right padding. Opera 10 and IE8 render it correctly.

Thanks for your help.

Nov 7th, 2009, 06:11 PM
I don't think FF is ignoring the padding, it's a difference in the white-space:nowrap implementation.

How about using overflow:scroll instead of overflow:auto? This seems to produce slightly more consistent cross browser display albeit with a horizontal scrollbar.

In IE7 on your test page I am unable to scroll down at all.

Nov 7th, 2009, 07:20 PM
Opera 10 and IE8 render it correctly.

something's definitely wrong with the css then :)