Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Apr 2007
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CSS Problem with overflow and padding

    Hello,

    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.

  • #2
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,956
    Thanks
    9
    Thanked 727 Times in 721 Posts
    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.

  • #3
    met
    met is offline
    Regular Coder
    Join Date
    Oct 2009
    Location
    United Kingdom
    Posts
    728
    Thanks
    4
    Thanked 119 Times in 119 Posts
    Opera 10 and IE8 render it correctly.

    something's definitely wrong with the css then


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •